Loading core/java/android/window/flags/windowing_frontend.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -272,6 +272,17 @@ flag { is_fixed_read_only: true } flag { name: "fix_show_when_locked_sync_timeout" namespace: "windowing_frontend" description: "Prevent sync timeout from setShowWhenLocked(false) by setting the DisplayContent ready" bug: "411544184" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } flag { name: "predictive_back_priority_system_navigation_observer" namespace: "systemui" Loading services/core/java/com/android/server/wm/ActivityRecord.java +19 −7 Original line number Diff line number Diff line Loading @@ -685,7 +685,7 @@ final class ActivityRecord extends WindowToken { long mInputDispatchingTimeoutMillis = DEFAULT_DISPATCHING_TIMEOUT_MILLIS; private boolean mShowWhenLocked; private boolean mInheritShownWhenLocked; private boolean mInheritShowWhenLocked; private boolean mTurnScreenOn; /** Loading Loading @@ -1880,7 +1880,7 @@ final class ActivityRecord extends WindowToken { mRotationAnimationHint = info.rotationAnimation; mShowWhenLocked = (aInfo.flags & ActivityInfo.FLAG_SHOW_WHEN_LOCKED) != 0; mInheritShownWhenLocked = (aInfo.privateFlags & FLAG_INHERIT_SHOW_WHEN_LOCKED) != 0; mInheritShowWhenLocked = (aInfo.privateFlags & FLAG_INHERIT_SHOW_WHEN_LOCKED) != 0; mTurnScreenOn = (aInfo.flags & FLAG_TURN_SCREEN_ON) != 0; int realTheme = info.getThemeResource(); Loading Loading @@ -4687,13 +4687,25 @@ final class ActivityRecord extends WindowToken { } void setShowWhenLocked(boolean showWhenLocked) { final boolean changed = (mShowWhenLocked != showWhenLocked); mShowWhenLocked = showWhenLocked; if (!Flags.fixShowWhenLockedSyncTimeout()) { mAtmService.mRootWindowContainer.ensureActivitiesVisible(); } else if (changed) { mDisplayContent.notifyKeyguardFlagsChanged(); } } void setInheritShowWhenLocked(boolean inheritShowWhenLocked) { mInheritShownWhenLocked = inheritShowWhenLocked; final boolean changed = (mInheritShowWhenLocked != inheritShowWhenLocked); mInheritShowWhenLocked = inheritShowWhenLocked; if (!Flags.fixShowWhenLockedSyncTimeout()) { mAtmService.mRootWindowContainer.ensureActivitiesVisible(); } else if (changed) { mDisplayContent.notifyKeyguardFlagsChanged(); } } /** Loading @@ -4702,7 +4714,7 @@ final class ActivityRecord extends WindowToken { * contains windows that have {@link LayoutParams#FLAG_SHOW_WHEN_LOCKED} set or if the * activity has set {@link #mShowWhenLocked}, or if its user * is {@link #mIsUserAlwaysVisible always-visible} or b) if the activity has set * {@link #mInheritShownWhenLocked} and the activity behind this satisfies the * {@link #mInheritShowWhenLocked} and the activity behind this satisfies the * conditions a) above. * Multi-windowing mode will be exited if {@code true} is returned. */ Loading @@ -4712,7 +4724,7 @@ final class ActivityRecord extends WindowToken { } if (canShowWhenLockedInner(r)) { return true; } else if (r.mInheritShownWhenLocked) { } else if (r.mInheritShowWhenLocked) { final ActivityRecord activity = r.getTaskFragment().getActivityBelow(r); return activity != null && canShowWhenLockedInner(activity); } else { Loading Loading
core/java/android/window/flags/windowing_frontend.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -272,6 +272,17 @@ flag { is_fixed_read_only: true } flag { name: "fix_show_when_locked_sync_timeout" namespace: "windowing_frontend" description: "Prevent sync timeout from setShowWhenLocked(false) by setting the DisplayContent ready" bug: "411544184" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } flag { name: "predictive_back_priority_system_navigation_observer" namespace: "systemui" Loading
services/core/java/com/android/server/wm/ActivityRecord.java +19 −7 Original line number Diff line number Diff line Loading @@ -685,7 +685,7 @@ final class ActivityRecord extends WindowToken { long mInputDispatchingTimeoutMillis = DEFAULT_DISPATCHING_TIMEOUT_MILLIS; private boolean mShowWhenLocked; private boolean mInheritShownWhenLocked; private boolean mInheritShowWhenLocked; private boolean mTurnScreenOn; /** Loading Loading @@ -1880,7 +1880,7 @@ final class ActivityRecord extends WindowToken { mRotationAnimationHint = info.rotationAnimation; mShowWhenLocked = (aInfo.flags & ActivityInfo.FLAG_SHOW_WHEN_LOCKED) != 0; mInheritShownWhenLocked = (aInfo.privateFlags & FLAG_INHERIT_SHOW_WHEN_LOCKED) != 0; mInheritShowWhenLocked = (aInfo.privateFlags & FLAG_INHERIT_SHOW_WHEN_LOCKED) != 0; mTurnScreenOn = (aInfo.flags & FLAG_TURN_SCREEN_ON) != 0; int realTheme = info.getThemeResource(); Loading Loading @@ -4687,13 +4687,25 @@ final class ActivityRecord extends WindowToken { } void setShowWhenLocked(boolean showWhenLocked) { final boolean changed = (mShowWhenLocked != showWhenLocked); mShowWhenLocked = showWhenLocked; if (!Flags.fixShowWhenLockedSyncTimeout()) { mAtmService.mRootWindowContainer.ensureActivitiesVisible(); } else if (changed) { mDisplayContent.notifyKeyguardFlagsChanged(); } } void setInheritShowWhenLocked(boolean inheritShowWhenLocked) { mInheritShownWhenLocked = inheritShowWhenLocked; final boolean changed = (mInheritShowWhenLocked != inheritShowWhenLocked); mInheritShowWhenLocked = inheritShowWhenLocked; if (!Flags.fixShowWhenLockedSyncTimeout()) { mAtmService.mRootWindowContainer.ensureActivitiesVisible(); } else if (changed) { mDisplayContent.notifyKeyguardFlagsChanged(); } } /** Loading @@ -4702,7 +4714,7 @@ final class ActivityRecord extends WindowToken { * contains windows that have {@link LayoutParams#FLAG_SHOW_WHEN_LOCKED} set or if the * activity has set {@link #mShowWhenLocked}, or if its user * is {@link #mIsUserAlwaysVisible always-visible} or b) if the activity has set * {@link #mInheritShownWhenLocked} and the activity behind this satisfies the * {@link #mInheritShowWhenLocked} and the activity behind this satisfies the * conditions a) above. * Multi-windowing mode will be exited if {@code true} is returned. */ Loading @@ -4712,7 +4724,7 @@ final class ActivityRecord extends WindowToken { } if (canShowWhenLockedInner(r)) { return true; } else if (r.mInheritShownWhenLocked) { } else if (r.mInheritShowWhenLocked) { final ActivityRecord activity = r.getTaskFragment().getActivityBelow(r); return activity != null && canShowWhenLockedInner(activity); } else { Loading