From d703c63c5f7a7caf1f71515da71276ae90bcbef0 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Wed, 15 Mar 2017 16:07:53 -0700 Subject: [PATCH] Fixing issue with IME not showing after PiP menu is shown. - Because the PiP menu activity needs to be always-focusable, it would always be found as the input focus target even after the menu is animated away. This CL ensures that main activity window is hidden when the menu is also hidden so that we don't prevent the new focused app windows from getting focus - This also allows us to not finish the activity when accessibility is enabled as the hidden window will not be reported to accessibility services Bug: 36225602 Test: Expand pip, tap on qsb Change-Id: Ifa4f47ef25afc0ff73a9206e3c8bc45277d274f6 --- .../src/com/android/systemui/pip/phone/PipMenuActivity.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java index 2f9c3fc3368a..a64ef62d7b83 100644 --- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java +++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java @@ -249,6 +249,7 @@ public class PipMenuActivity extends Activity { private void showMenu(Rect stackBounds, Rect movementBounds) { if (!mMenuVisible) { + setVisible(true); updateActionViews(stackBounds); if (mMenuContainerAnimator != null) { mMenuContainerAnimator.cancel(); @@ -292,9 +293,7 @@ public class PipMenuActivity extends Activity { if (animationFinishedRunnable != null) { animationFinishedRunnable.run(); } - if (getSystemService(AccessibilityManager.class).isEnabled()) { - finish(); - } + setVisible(false); } }); mMenuContainerAnimator.addUpdateListener(mMenuBgUpdateListener); @@ -398,6 +397,7 @@ public class PipMenuActivity extends Activity { } private void updateDismissFraction(float fraction) { + setVisible(true); int alpha; if (mMenuVisible) { mMenuContainer.setAlpha(1-fraction); -- 2.11.0