- 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
private void showMenu(Rect stackBounds, Rect movementBounds) {
if (!mMenuVisible) {
+ setVisible(true);
updateActionViews(stackBounds);
if (mMenuContainerAnimator != null) {
mMenuContainerAnimator.cancel();
if (animationFinishedRunnable != null) {
animationFinishedRunnable.run();
}
- if (getSystemService(AccessibilityManager.class).isEnabled()) {
- finish();
- }
+ setVisible(false);
}
});
mMenuContainerAnimator.addUpdateListener(mMenuBgUpdateListener);
}
private void updateDismissFraction(float fraction) {
+ setVisible(true);
int alpha;
if (mMenuVisible) {
mMenuContainer.setAlpha(1-fraction);