diff options
| author | Adrian Roos <roosa@google.com> | 2020-06-12 18:48:10 +0200 |
|---|---|---|
| committer | Adrian Roos <roosa@google.com> | 2020-06-22 16:55:54 +0200 |
| commit | c22eec9d35e797417b8630fff178ec53e7c29b65 (patch) | |
| tree | 83a64bdab7c328cd3d2e0ad87d54580323f090c2 /core/java/android/view/InsetsAnimationThreadControlRunner.java | |
| parent | 70ad33113fdfcb77edcc2120e108cad4d2e3d7bf (diff) | |
IME animation: hide IME-related navbar icons until perceptible
During transitions and while the IME is controlled by the app,
the IME may be "visible" as far as the IME framework is concerned,
but not actually perceptible by the user due to offsets or alpha
applied to the leash.
This may lead to out-of-place navbar symbols for the IME, especially
in gesture nav.
To avoid this, the ImeInsetsSourceConsumer now notifies the IMF of
whether it has made the IME unperceptible to the user.
For now, we ignore the cases where the IME is controlled by something
other than the client window - in that case, we just revert to the
previous behavior of it being always considered perceptible.
Fixes: 158079255
Test: manual, launch email compose activity, observe that back button only indicates once IME appears
Test: atest InsetsAnimationControlImplTest
Change-Id: I4dc9d6513d0559156f7da39244f3fc5ebc952ed4
Diffstat (limited to 'core/java/android/view/InsetsAnimationThreadControlRunner.java')
| -rw-r--r-- | core/java/android/view/InsetsAnimationThreadControlRunner.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/view/InsetsAnimationThreadControlRunner.java b/core/java/android/view/InsetsAnimationThreadControlRunner.java index 0e71b7643b7d..123604489da4 100644 --- a/core/java/android/view/InsetsAnimationThreadControlRunner.java +++ b/core/java/android/view/InsetsAnimationThreadControlRunner.java @@ -90,6 +90,11 @@ public class InsetsAnimationThreadControlRunner implements InsetsAnimationContro // Since we don't push the SurfaceParams to the RT we can release directly sc.release(); } + + @Override + public void reportPerceptible(int types, boolean perceptible) { + mMainThreadHandler.post(() -> mOuterCallbacks.reportPerceptible(types, perceptible)); + } }; @UiThread |
