diff options
| author | 2024-04-08 13:08:11 +0200 | |
|---|---|---|
| committer | 2024-04-08 11:30:09 +0000 | |
| commit | d2bfeca17b595ffbfb9dee034eafcff25d36a104 (patch) | |
| tree | 112e4b451d1c50dfc5bc1bebe82764b6a3f03741 | |
| parent | 7ca67e0fc015cf060a76ff120ba2a35cc251ce5f (diff) | |
Reset IME visible types only when losing control
This partially resets a change from [1], as we should only reset the
requested visible types for the IME when we are losing the control,
regardless of whether the IME window is currently available (signaled
by the leash being available).
[1]: I2fb3bf1dc057f85a9f8ad0166ec25519aa004905
Bug: 328374719
Test: n/a
Change-Id: I83c24c7c05b828b26ef51b9ae2fbf69366a3b1dc
| -rw-r--r-- | core/java/android/view/ImeInsetsSourceConsumer.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/view/ImeInsetsSourceConsumer.java b/core/java/android/view/ImeInsetsSourceConsumer.java index b30002228d54..6caf4d6ff992 100644 --- a/core/java/android/view/ImeInsetsSourceConsumer.java +++ b/core/java/android/view/ImeInsetsSourceConsumer.java @@ -196,11 +196,11 @@ public final class ImeInsetsSourceConsumer extends InsetsSourceConsumer { if (!super.setControl(control, showTypes, hideTypes)) { return false; } - final boolean hasLeash = control != null && control.getLeash() != null; - if (!hasLeash && !mIsRequestedVisibleAwaitingLeash) { + if (control == null && !mIsRequestedVisibleAwaitingLeash) { mController.setRequestedVisibleTypes(0 /* visibleTypes */, getType()); removeSurface(); } + final boolean hasLeash = control != null && control.getLeash() != null; if (hasLeash) { mIsRequestedVisibleAwaitingLeash = false; } |