Don't let PIP window control system bars
Fix: 267413713
Test: 1. Watch a YouTube video on Chrome.
2. Enter fullscreen mode.
3. Swipe to show navigation bar and go to home screen.
4. Open Calculator while PIP is playing the video.
See if system bars are transiently hidden while opening
Calculator.
Change-Id: I918f35435d125c80d986d6f1c715f0129142edae
This commit is contained in:
@@ -5115,6 +5115,11 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
return mDeferHidingClient;
|
||||
}
|
||||
|
||||
boolean canAffectSystemUiFlags() {
|
||||
return task != null && task.canAffectSystemUiFlags() && isVisible()
|
||||
&& !inPinnedWindowingMode();
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean isVisible() {
|
||||
// If the activity isn't hidden then it is considered visible and there is no need to check
|
||||
|
||||
@@ -2067,12 +2067,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
||||
final boolean exiting = mAnimatingExit || mDestroying;
|
||||
return shown && !exiting;
|
||||
} else {
|
||||
final Task task = getTask();
|
||||
final boolean canFromTask = task != null && task.canAffectSystemUiFlags();
|
||||
return canFromTask && mActivityRecord.isVisible()
|
||||
// Do not let snapshot window control the bar
|
||||
return mActivityRecord.canAffectSystemUiFlags()
|
||||
// Do not let snapshot window control the bar
|
||||
&& (mAttrs.type != TYPE_APPLICATION_STARTING
|
||||
|| !(mStartingData instanceof SnapshotStartingData));
|
||||
|| !(mStartingData instanceof SnapshotStartingData));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user