diff options
| author | 2024-08-28 14:07:43 +0000 | |
|---|---|---|
| committer | 2024-08-28 14:07:43 +0000 | |
| commit | fa6f24d973d87c3174c8ea742d05a429c697a435 (patch) | |
| tree | 7a52aacdf3991f7534e441159df80969ce244f7b | |
| parent | 98f28c996ce77c5ce76df9f4122c22487a98312d (diff) | |
Fix duration and insetsInterpolator when the IME is shown in landscape
The bug is caused by the wrong condition check. The condition should be !hasZeroInsetsIme instead of hasZeroInsetsIme.
Change-Id: I55edbcc49cdc10fe8641df75936cbc3fe2578832
Test: manual: Open app with animation callback in landscape mode and hide IME
Flag: EXEMPT bugfix
Bug: 349213527
| -rw-r--r-- | core/java/android/view/InsetsController.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/view/InsetsController.java b/core/java/android/view/InsetsController.java index b1df51f7affa..7c8cd932f737 100644 --- a/core/java/android/view/InsetsController.java +++ b/core/java/android/view/InsetsController.java @@ -488,7 +488,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation @Override public Interpolator getInsetsInterpolator(boolean hasZeroInsetsIme) { if ((mRequestedTypes & ime()) != 0) { - if (mHasAnimationCallbacks && hasZeroInsetsIme) { + if (mHasAnimationCallbacks && !hasZeroInsetsIme) { return SYNC_IME_INTERPOLATOR; } else if (mShow) { return LINEAR_OUT_SLOW_IN_INTERPOLATOR; @@ -536,7 +536,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation @Override public long getDurationMs(boolean hasZeroInsetsIme) { if ((mRequestedTypes & ime()) != 0) { - if (mHasAnimationCallbacks && hasZeroInsetsIme) { + if (mHasAnimationCallbacks && !hasZeroInsetsIme) { return ANIMATION_DURATION_SYNC_IME_MS; } else { return ANIMATION_DURATION_UNSYNC_IME_MS; |