Loading libs/WindowManager/Shell/src/com/android/wm/shell/transition/RemoteTransitionHandler.java +3 −1 Original line number Diff line number Diff line Loading @@ -94,9 +94,11 @@ public class RemoteTransitionHandler implements Transitions.TransitionHandler { @NonNull SurfaceControl.Transaction startTransaction, @NonNull SurfaceControl.Transaction finishTransaction, @NonNull Transitions.TransitionFinishCallback finishCallback) { if (!Transitions.SHELL_TRANSITIONS_ROTATION && TransitionUtil.hasDisplayChange(info)) { if (!Transitions.SHELL_TRANSITIONS_ROTATION && TransitionUtil.hasDisplayChange(info) && !TransitionUtil.alwaysReportToKeyguard(info)) { // Note that if the remote doesn't have permission ACCESS_SURFACE_FLINGER, some // operations of the start transaction may be ignored. mRequestedRemotes.remove(transition); return false; } RemoteTransition pendingRemote = mRequestedRemotes.get(transition); Loading libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java +1 −18 Original line number Diff line number Diff line Loading @@ -650,7 +650,7 @@ public class Transitions implements RemoteCallable<Transitions> { active.mToken, info, active.mStartT, active.mFinishT); } if (info.getRootCount() == 0 && !alwaysReportToKeyguard(info)) { if (info.getRootCount() == 0 && !TransitionUtil.alwaysReportToKeyguard(info)) { // No root-leashes implies that the transition is empty/no-op, so just do // housekeeping and return. ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, "No transition roots in %s so" Loading Loading @@ -699,23 +699,6 @@ public class Transitions implements RemoteCallable<Transitions> { return true; } /** * Some transitions we always need to report to keyguard even if they are empty. * TODO (b/274954192): Remove this once keyguard dispatching moves to Shell. */ private static boolean alwaysReportToKeyguard(TransitionInfo info) { // occlusion status of activities can change while screen is off so there will be no // visibility change but we still need keyguardservice to be notified. if (info.getType() == TRANSIT_KEYGUARD_UNOCCLUDE) return true; // It's possible for some activities to stop with bad timing (esp. since we can't yet // queue activity transitions initiated by apps) that results in an empty transition for // keyguard going-away. In general, we should should always report Keyguard-going-away. if ((info.getFlags() & TRANSIT_FLAG_KEYGUARD_GOING_AWAY) != 0) return true; return false; } private boolean areTracksIdle() { for (int i = 0; i < mTracks.size(); ++i) { if (!mTracks.get(i).isIdle()) return false; Loading libs/WindowManager/Shell/src/com/android/wm/shell/util/TransitionUtil.java +19 −0 Original line number Diff line number Diff line Loading @@ -24,7 +24,9 @@ import static android.view.WindowManager.LayoutParams.INVALID_WINDOW_TYPE; import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER; import static android.view.WindowManager.TRANSIT_CHANGE; import static android.view.WindowManager.TRANSIT_CLOSE; import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_GOING_AWAY; import static android.view.WindowManager.TRANSIT_KEYGUARD_GOING_AWAY; import static android.view.WindowManager.TRANSIT_KEYGUARD_UNOCCLUDE; import static android.view.WindowManager.TRANSIT_OPEN; import static android.view.WindowManager.TRANSIT_TO_BACK; import static android.view.WindowManager.TRANSIT_TO_FRONT; Loading Loading @@ -77,6 +79,23 @@ public class TransitionUtil { return false; } /** * Some transitions we always need to report to keyguard even if they are empty. * TODO (b/274954192): Remove this once keyguard dispatching moves to Shell. */ public static boolean alwaysReportToKeyguard(TransitionInfo info) { // occlusion status of activities can change while screen is off so there will be no // visibility change but we still need keyguardservice to be notified. if (info.getType() == TRANSIT_KEYGUARD_UNOCCLUDE) return true; // It's possible for some activities to stop with bad timing (esp. since we can't yet // queue activity transitions initiated by apps) that results in an empty transition for // keyguard going-away. In general, we should should always report Keyguard-going-away. if ((info.getFlags() & TRANSIT_FLAG_KEYGUARD_GOING_AWAY) != 0) return true; return false; } /** Returns `true` if `change` is a wallpaper. */ public static boolean isWallpaper(TransitionInfo.Change change) { return (change.getTaskInfo() == null) Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/transition/RemoteTransitionHandler.java +3 −1 Original line number Diff line number Diff line Loading @@ -94,9 +94,11 @@ public class RemoteTransitionHandler implements Transitions.TransitionHandler { @NonNull SurfaceControl.Transaction startTransaction, @NonNull SurfaceControl.Transaction finishTransaction, @NonNull Transitions.TransitionFinishCallback finishCallback) { if (!Transitions.SHELL_TRANSITIONS_ROTATION && TransitionUtil.hasDisplayChange(info)) { if (!Transitions.SHELL_TRANSITIONS_ROTATION && TransitionUtil.hasDisplayChange(info) && !TransitionUtil.alwaysReportToKeyguard(info)) { // Note that if the remote doesn't have permission ACCESS_SURFACE_FLINGER, some // operations of the start transaction may be ignored. mRequestedRemotes.remove(transition); return false; } RemoteTransition pendingRemote = mRequestedRemotes.get(transition); Loading
libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java +1 −18 Original line number Diff line number Diff line Loading @@ -650,7 +650,7 @@ public class Transitions implements RemoteCallable<Transitions> { active.mToken, info, active.mStartT, active.mFinishT); } if (info.getRootCount() == 0 && !alwaysReportToKeyguard(info)) { if (info.getRootCount() == 0 && !TransitionUtil.alwaysReportToKeyguard(info)) { // No root-leashes implies that the transition is empty/no-op, so just do // housekeeping and return. ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, "No transition roots in %s so" Loading Loading @@ -699,23 +699,6 @@ public class Transitions implements RemoteCallable<Transitions> { return true; } /** * Some transitions we always need to report to keyguard even if they are empty. * TODO (b/274954192): Remove this once keyguard dispatching moves to Shell. */ private static boolean alwaysReportToKeyguard(TransitionInfo info) { // occlusion status of activities can change while screen is off so there will be no // visibility change but we still need keyguardservice to be notified. if (info.getType() == TRANSIT_KEYGUARD_UNOCCLUDE) return true; // It's possible for some activities to stop with bad timing (esp. since we can't yet // queue activity transitions initiated by apps) that results in an empty transition for // keyguard going-away. In general, we should should always report Keyguard-going-away. if ((info.getFlags() & TRANSIT_FLAG_KEYGUARD_GOING_AWAY) != 0) return true; return false; } private boolean areTracksIdle() { for (int i = 0; i < mTracks.size(); ++i) { if (!mTracks.get(i).isIdle()) return false; Loading
libs/WindowManager/Shell/src/com/android/wm/shell/util/TransitionUtil.java +19 −0 Original line number Diff line number Diff line Loading @@ -24,7 +24,9 @@ import static android.view.WindowManager.LayoutParams.INVALID_WINDOW_TYPE; import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER; import static android.view.WindowManager.TRANSIT_CHANGE; import static android.view.WindowManager.TRANSIT_CLOSE; import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_GOING_AWAY; import static android.view.WindowManager.TRANSIT_KEYGUARD_GOING_AWAY; import static android.view.WindowManager.TRANSIT_KEYGUARD_UNOCCLUDE; import static android.view.WindowManager.TRANSIT_OPEN; import static android.view.WindowManager.TRANSIT_TO_BACK; import static android.view.WindowManager.TRANSIT_TO_FRONT; Loading Loading @@ -77,6 +79,23 @@ public class TransitionUtil { return false; } /** * Some transitions we always need to report to keyguard even if they are empty. * TODO (b/274954192): Remove this once keyguard dispatching moves to Shell. */ public static boolean alwaysReportToKeyguard(TransitionInfo info) { // occlusion status of activities can change while screen is off so there will be no // visibility change but we still need keyguardservice to be notified. if (info.getType() == TRANSIT_KEYGUARD_UNOCCLUDE) return true; // It's possible for some activities to stop with bad timing (esp. since we can't yet // queue activity transitions initiated by apps) that results in an empty transition for // keyguard going-away. In general, we should should always report Keyguard-going-away. if ((info.getFlags() & TRANSIT_FLAG_KEYGUARD_GOING_AWAY) != 0) return true; return false; } /** Returns `true` if `change` is a wallpaper. */ public static boolean isWallpaper(TransitionInfo.Change change) { return (change.getTaskInfo() == null) Loading