Merge "Let notification shade control system bar visibility" into tm-qpr-dev am: a71f02fb60

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19622684

Change-Id: Iae5ba2aa71c0fee9178c00b2e6a44a01ad6f7709
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Tiger Huang
2022-08-19 09:51:28 +00:00
committed by Automerger Merge Worker

View File

@@ -2371,18 +2371,19 @@ public class DisplayPolicy {
return; return;
} }
// The immersive mode confirmation should never affect the system bar visibility, otherwise // Immersive mode confirmation should never affect the system bar visibility, otherwise
// it will unhide the navigation bar and hide itself. // it will unhide the navigation bar and hide itself.
if (winCandidate.getAttrs().token == mImmersiveModeConfirmation.getWindowToken()) { if (winCandidate.getAttrs().token == mImmersiveModeConfirmation.getWindowToken()) {
if (mNotificationShade != null && mNotificationShade.canReceiveKeys()) {
// The immersive mode confirmation took the focus from mLastFocusedWindow which was // Let notification shade control the system bar visibility.
// controlling the system ui visibility. So if mLastFocusedWindow can still receive winCandidate = mNotificationShade;
// keys, we let it keep controlling the visibility. } else if (mLastFocusedWindow != null && mLastFocusedWindow.canReceiveKeys()) {
final boolean lastFocusCanReceiveKeys = // Immersive mode confirmation took the focus from mLastFocusedWindow which was
(mLastFocusedWindow != null && mLastFocusedWindow.canReceiveKeys()); // controlling the system bar visibility. Let it keep controlling the visibility.
winCandidate = isKeyguardShowing() && !isKeyguardOccluded() ? mNotificationShade winCandidate = mLastFocusedWindow;
: lastFocusCanReceiveKeys ? mLastFocusedWindow } else {
: mTopFullscreenOpaqueWindowState; winCandidate = mTopFullscreenOpaqueWindowState;
}
if (winCandidate == null) { if (winCandidate == null) {
return; return;
} }