summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jerry Chang <chenghsiuchang@google.com> 2021-04-27 12:47:18 +0800
committer Jerry Chang <chenghsiuchang@google.com> 2021-04-27 13:36:45 +0800
commit8bfee40f416e1419a9353206f72cdafc29946d2c (patch)
tree3eb5c68770bb111bed857926a51e54f37a8dd5d2
parent8a170b2edf8a7f0ba691aef118900af8789e7300 (diff)
Prevent caching unexpected IME status while showing keyguard in split
While showing keyguard in split, it hides divder bar surface instead of updating visibility of divider bar view. Updates to make sure DividerImeController only caches IME status when the divider bar surface is shown. Fix: 186466549 Test: manul check password keyguard while in split Change-Id: I64b406ea3d93cc196fe3304720391b8cb5310111
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/legacysplitscreen/DividerImeController.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/legacysplitscreen/DividerImeController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/legacysplitscreen/DividerImeController.java
index 57a9dd2ec6cc..23171bb9575c 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/legacysplitscreen/DividerImeController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/legacysplitscreen/DividerImeController.java
@@ -109,8 +109,9 @@ class DividerImeController implements DisplayImeController.ImePositionProcessor
return mSplits.mSplitScreenController.getSplitLayout();
}
- private boolean isDividerVisible() {
- return mSplits.mSplitScreenController.isDividerVisible();
+ private boolean isDividerHidden() {
+ final DividerView view = mSplits.mSplitScreenController.getDividerView();
+ return view == null || view.isHidden();
}
private boolean getSecondaryHasFocus(int displayId) {
@@ -143,7 +144,7 @@ class DividerImeController implements DisplayImeController.ImePositionProcessor
@ImeAnimationFlags
public int onImeStartPositioning(int displayId, int hiddenTop, int shownTop,
boolean imeShouldShow, boolean imeIsFloating, SurfaceControl.Transaction t) {
- if (!isDividerVisible()) {
+ if (isDividerHidden()) {
return 0;
}
mHiddenTop = hiddenTop;
@@ -263,7 +264,7 @@ class DividerImeController implements DisplayImeController.ImePositionProcessor
@Override
public void onImePositionChanged(int displayId, int imeTop,
SurfaceControl.Transaction t) {
- if (mAnimation != null || !isDividerVisible() || mPaused) {
+ if (mAnimation != null || isDividerHidden() || mPaused) {
// Not synchronized with IME anymore, so return.
return;
}
@@ -275,7 +276,7 @@ class DividerImeController implements DisplayImeController.ImePositionProcessor
@Override
public void onImeEndPositioning(int displayId, boolean cancelled,
SurfaceControl.Transaction t) {
- if (mAnimation != null || !isDividerVisible() || mPaused) {
+ if (mAnimation != null || isDividerHidden() || mPaused) {
// Not synchronized with IME anymore, so return.
return;
}