Loading core/java/android/window/flags/windowing_frontend.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,17 @@ flag { bug: "291870756" } flag { name: "reduce_keyguard_transitions" namespace: "windowing_frontend" description: "Avoid setting keyguard transitions ready unless there are no other changes" bug: "354647472" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } flag { name: "transit_ready_tracking" namespace: "windowing_frontend" Loading services/core/java/com/android/server/wm/KeyguardController.java +29 −17 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import static android.view.WindowManagerPolicyConstants.KEYGUARD_GOING_AWAY_FLAG import static android.view.WindowManagerPolicyConstants.KEYGUARD_GOING_AWAY_FLAG_TO_SHADE; import static android.view.WindowManagerPolicyConstants.KEYGUARD_GOING_AWAY_FLAG_WITH_WALLPAPER; import static com.android.window.flags.Flags.reduceKeyguardTransitions; import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_ATM; import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_WITH_CLASS_NAME; Loading Loading @@ -417,31 +418,42 @@ class KeyguardController { final TransitionController tc = mRootWindowContainer.mTransitionController; final KeyguardDisplayState state = getDisplayState(displayId); final DisplayContent dc = mRootWindowContainer.getDisplayContent(displayId); final boolean occluded = state.mOccluded; final boolean performTransition = isKeyguardLocked(displayId); final boolean executeTransition = performTransition && !tc.isCollecting(); final boolean locked = isKeyguardLocked(displayId); final boolean executeTransition = !tc.isShellTransitionsEnabled() || (locked && !tc.isCollecting() && !reduceKeyguardTransitions()); mWindowManager.mPolicy.onKeyguardOccludedChangedLw(occluded); final int transitType, transitFlags, notFlags; if (state.mOccluded) { transitType = TRANSIT_KEYGUARD_OCCLUDE; transitFlags = TRANSIT_FLAG_KEYGUARD_OCCLUDING; notFlags = TRANSIT_FLAG_KEYGUARD_UNOCCLUDING; } else { transitType = TRANSIT_KEYGUARD_UNOCCLUDE; transitFlags = TRANSIT_FLAG_KEYGUARD_UNOCCLUDING; notFlags = TRANSIT_FLAG_KEYGUARD_OCCLUDING; } mWindowManager.mPolicy.onKeyguardOccludedChangedLw(state.mOccluded); mService.deferWindowLayout(); try { if (isKeyguardLocked(displayId)) { final int type = occluded ? TRANSIT_KEYGUARD_OCCLUDE : TRANSIT_KEYGUARD_UNOCCLUDE; final int flag = occluded ? TRANSIT_FLAG_KEYGUARD_OCCLUDING : TRANSIT_FLAG_KEYGUARD_UNOCCLUDING; if (locked) { if (tc.isShellTransitionsEnabled()) { final Task trigger = (occluded && topActivity != null) final Task trigger = (state.mOccluded && topActivity != null) ? topActivity.getRootTask() : null; Transition transition = tc.requestTransitionIfNeeded(type, flag, trigger, mRootWindowContainer.getDefaultDisplay()); if (trigger != null) { if (transition == null) { transition = tc.getCollectingTransition(); tc.requestTransitionIfNeeded(transitType, transitFlags, trigger, dc); final Transition transition = tc.getCollectingTransition(); if ((transition.getFlags() & notFlags) != 0 && reduceKeyguardTransitions()) { transition.removeFlag(notFlags); } else { transition.addFlag(transitFlags); } if (trigger != null) { transition.collect(trigger); } } else { mRootWindowContainer.getDefaultDisplay().prepareAppTransition(type, flag); dc.prepareAppTransition(transitType, transitFlags); } } else { if (tc.inTransition()) { Loading @@ -451,8 +463,8 @@ class KeyguardController { } } updateKeyguardSleepToken(displayId); if (performTransition && executeTransition) { mWindowManager.executeAppTransition(); if (executeTransition) { dc.executeAppTransition(); } } finally { mService.continueWindowLayout(); Loading services/core/java/com/android/server/wm/Transition.java +6 −2 Original line number Diff line number Diff line Loading @@ -358,8 +358,12 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { return mToken; } void addFlag(int flag) { mFlags |= flag; void addFlag(@TransitionFlags int flags) { mFlags |= flags; } void removeFlag(@TransitionFlags int flags) { mFlags &= ~flags; } void calcParallelCollectType(WindowContainerTransaction wct) { Loading Loading
core/java/android/window/flags/windowing_frontend.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,17 @@ flag { bug: "291870756" } flag { name: "reduce_keyguard_transitions" namespace: "windowing_frontend" description: "Avoid setting keyguard transitions ready unless there are no other changes" bug: "354647472" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } flag { name: "transit_ready_tracking" namespace: "windowing_frontend" Loading
services/core/java/com/android/server/wm/KeyguardController.java +29 −17 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import static android.view.WindowManagerPolicyConstants.KEYGUARD_GOING_AWAY_FLAG import static android.view.WindowManagerPolicyConstants.KEYGUARD_GOING_AWAY_FLAG_TO_SHADE; import static android.view.WindowManagerPolicyConstants.KEYGUARD_GOING_AWAY_FLAG_WITH_WALLPAPER; import static com.android.window.flags.Flags.reduceKeyguardTransitions; import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_ATM; import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_WITH_CLASS_NAME; Loading Loading @@ -417,31 +418,42 @@ class KeyguardController { final TransitionController tc = mRootWindowContainer.mTransitionController; final KeyguardDisplayState state = getDisplayState(displayId); final DisplayContent dc = mRootWindowContainer.getDisplayContent(displayId); final boolean occluded = state.mOccluded; final boolean performTransition = isKeyguardLocked(displayId); final boolean executeTransition = performTransition && !tc.isCollecting(); final boolean locked = isKeyguardLocked(displayId); final boolean executeTransition = !tc.isShellTransitionsEnabled() || (locked && !tc.isCollecting() && !reduceKeyguardTransitions()); mWindowManager.mPolicy.onKeyguardOccludedChangedLw(occluded); final int transitType, transitFlags, notFlags; if (state.mOccluded) { transitType = TRANSIT_KEYGUARD_OCCLUDE; transitFlags = TRANSIT_FLAG_KEYGUARD_OCCLUDING; notFlags = TRANSIT_FLAG_KEYGUARD_UNOCCLUDING; } else { transitType = TRANSIT_KEYGUARD_UNOCCLUDE; transitFlags = TRANSIT_FLAG_KEYGUARD_UNOCCLUDING; notFlags = TRANSIT_FLAG_KEYGUARD_OCCLUDING; } mWindowManager.mPolicy.onKeyguardOccludedChangedLw(state.mOccluded); mService.deferWindowLayout(); try { if (isKeyguardLocked(displayId)) { final int type = occluded ? TRANSIT_KEYGUARD_OCCLUDE : TRANSIT_KEYGUARD_UNOCCLUDE; final int flag = occluded ? TRANSIT_FLAG_KEYGUARD_OCCLUDING : TRANSIT_FLAG_KEYGUARD_UNOCCLUDING; if (locked) { if (tc.isShellTransitionsEnabled()) { final Task trigger = (occluded && topActivity != null) final Task trigger = (state.mOccluded && topActivity != null) ? topActivity.getRootTask() : null; Transition transition = tc.requestTransitionIfNeeded(type, flag, trigger, mRootWindowContainer.getDefaultDisplay()); if (trigger != null) { if (transition == null) { transition = tc.getCollectingTransition(); tc.requestTransitionIfNeeded(transitType, transitFlags, trigger, dc); final Transition transition = tc.getCollectingTransition(); if ((transition.getFlags() & notFlags) != 0 && reduceKeyguardTransitions()) { transition.removeFlag(notFlags); } else { transition.addFlag(transitFlags); } if (trigger != null) { transition.collect(trigger); } } else { mRootWindowContainer.getDefaultDisplay().prepareAppTransition(type, flag); dc.prepareAppTransition(transitType, transitFlags); } } else { if (tc.inTransition()) { Loading @@ -451,8 +463,8 @@ class KeyguardController { } } updateKeyguardSleepToken(displayId); if (performTransition && executeTransition) { mWindowManager.executeAppTransition(); if (executeTransition) { dc.executeAppTransition(); } } finally { mService.continueWindowLayout(); Loading
services/core/java/com/android/server/wm/Transition.java +6 −2 Original line number Diff line number Diff line Loading @@ -358,8 +358,12 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { return mToken; } void addFlag(int flag) { mFlags |= flag; void addFlag(@TransitionFlags int flags) { mFlags |= flags; } void removeFlag(@TransitionFlags int flags) { mFlags &= ~flags; } void calcParallelCollectType(WindowContainerTransaction wct) { Loading