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
This commit is contained in:
Winson Chung
2017-03-15 16:07:53 -07:00
parent d7bc388f30
commit d703c63c5f

View 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);