Merge "Don't let PIP window control system bars"
This commit is contained in:
committed by
Android (Google) Code Review
commit
1be545d8c3
@@ -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