diff options
| author | 2024-11-20 14:04:41 -0800 | |
|---|---|---|
| committer | 2024-12-02 11:25:03 -0800 | |
| commit | 1af65ef7ba362ba9ed1f60914e522913d16da940 (patch) | |
| tree | eccf8d3fbf902c0ac9194f8b065f364c779d991b /libs | |
| parent | 4ec596d66375938c462563a0580c641a55ecdc38 (diff) | |
Update API to only modify specified inset types
When there are multiple controllers that update the visible insets,
explicitly setting all the requested visibilities may cause conflicts
with what is set elsewhere when each controller only cares about a
subset of the inset types. This API change will allow controllers to
only modify the visibility of a specific subset of insets while leaving
the rest as they previously were.
Bug: 376131165
Test: manual
Flag: NONE bugfix
Change-Id: Ia12f8b68ad132cc1e40094ba0680ea53fc7b5c65
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayImeController.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayImeController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayImeController.java index 38b859220256..ec3c0b83fe2d 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayImeController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayImeController.java @@ -228,7 +228,6 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged public class PerDisplay implements DisplayInsetsController.OnInsetsChangedListener { final int mDisplayId; final InsetsState mInsetsState = new InsetsState(); - @InsetsType int mRequestedVisibleTypes = WindowInsets.Type.defaultVisible(); boolean mImeRequestedVisible = (WindowInsets.Type.defaultVisible() & WindowInsets.Type.ime()) != 0; InsetsSourceControl mImeSourceControl = null; @@ -426,12 +425,10 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged */ private void setVisibleDirectly(boolean visible, @Nullable ImeTracker.Token statsToken) { mInsetsState.setSourceVisible(InsetsSource.ID_IME, visible); - mRequestedVisibleTypes = visible - ? mRequestedVisibleTypes | WindowInsets.Type.ime() - : mRequestedVisibleTypes & ~WindowInsets.Type.ime(); + int visibleTypes = visible ? WindowInsets.Type.ime() : 0; try { mWmService.updateDisplayWindowRequestedVisibleTypes(mDisplayId, - mRequestedVisibleTypes, statsToken); + visibleTypes, WindowInsets.Type.ime(), statsToken); } catch (RemoteException e) { } } |