OSDN Git Service

Fixing issue with IME not showing after PiP menu is shown.
authorWinson Chung <winsonc@google.com>
Wed, 15 Mar 2017 23:07:53 +0000 (16:07 -0700)
committerWinson Chung <winsonc@google.com>
Thu, 16 Mar 2017 18:14:22 +0000 (11:14 -0700)
- 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

packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java

index 2f9c3fc..a64ef62 100644 (file)
@@ -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);