Loading services/core/java/com/android/server/wm/ActivityStack.java +0 −2 Original line number Diff line number Diff line Loading @@ -954,8 +954,6 @@ class ActivityStack extends Task { void awakeFromSleepingLocked() { // Ensure activities are no longer sleeping. forAllActivities((Consumer<ActivityRecord>) (r) -> r.setSleeping(false)); ensureActivitiesVisible(null /* starting */, 0 /* configChanges */, false /* preserveWindows */); if (mPausingActivity != null) { Slog.d(TAG, "awakeFromSleepingLocked: previously pausing activity didn't pause"); mPausingActivity.activityPaused(true); Loading services/core/java/com/android/server/wm/DisplayArea.java +1 −0 Original line number Diff line number Diff line Loading @@ -253,6 +253,7 @@ public class DisplayArea<T extends WindowContainer> extends WindowContainer<T> { req = mLastKeyguardForcedOrientation; } } mLastOrientationSource = win; return req; } } Loading services/core/java/com/android/server/wm/DisplayContent.java +16 −3 Original line number Diff line number Diff line Loading @@ -1189,6 +1189,8 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo activity.onRemovedFromDisplay(); if (activity == mFixedRotationLaunchingApp) { // Make sure the states of associated tokens are also cleared. activity.finishFixedRotationTransform(); setFixedRotationLaunchingAppUnchecked(null); } } Loading Loading @@ -1487,6 +1489,12 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo // window was transferred ({@link #mSkipAppTransitionAnimation}). return false; } if ((mAppTransition.getTransitFlags() & WindowManager.TRANSIT_FLAG_KEYGUARD_GOING_AWAY_NO_ANIMATION) != 0) { // The transition may be finished before keyguard hidden. In order to avoid the // intermediate orientation change, it is more stable to freeze the display. return false; } } else if (r != topRunningActivity()) { // If the transition has not started yet, the activity must be the top. return false; Loading Loading @@ -2310,6 +2318,13 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo void onAppTransitionDone() { super.onAppTransitionDone(); mWmService.mWindowsChanged = true; // If the transition finished callback cannot match the token for some reason, make sure the // rotated state is cleared if it is already invisible. if (mFixedRotationLaunchingApp != null && !mFixedRotationLaunchingApp.mVisibleRequested && !mFixedRotationLaunchingApp.isVisible() && !mDisplayRotation.isRotatingSeamlessly()) { clearFixedRotationLaunchingApp(); } } @Override Loading Loading @@ -3011,11 +3026,9 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo final ScreenRotationAnimation rotationAnimation = getRotationAnimation(); if (rotationAnimation != null) { pw.print(subPrefix); pw.println(" mScreenRotationAnimation:"); rotationAnimation.printTo(" ", pw); rotationAnimation.printTo(subPrefix, pw); } else if (dumpAll) { pw.print(subPrefix); pw.println(" no ScreenRotationAnimation "); } Loading services/core/java/com/android/server/wm/RootWindowContainer.java +6 −0 Original line number Diff line number Diff line Loading @@ -2391,6 +2391,12 @@ class RootWindowContainer extends WindowContainer<DisplayContent> // activity here. resumeFocusedStacksTopActivities(); } // The visibility update must not be called before resuming the top, so the // display orientation can be updated first if needed. Otherwise there may // have redundant configuration changes due to apply outdated display // orientation (from keyguard) to activity. stack.ensureActivitiesVisible(null /* starting */, 0 /* configChanges */, false /* preserveWindows */); } } } Loading services/core/java/com/android/server/wm/TaskDisplayArea.java +4 −4 Original line number Diff line number Diff line Loading @@ -1864,14 +1864,14 @@ final class TaskDisplayArea extends DisplayArea<ActivityStack> { @Override void dump(PrintWriter pw, String prefix, boolean dumpAll) { pw.println(prefix + "TaskDisplayArea " + getName()); super.dump(pw, prefix, dumpAll); final String doublePrefix = prefix + " "; super.dump(pw, doublePrefix, dumpAll); if (mPreferredTopFocusableStack != null) { pw.println(prefix + " mPreferredTopFocusableStack=" + mPreferredTopFocusableStack); pw.println(doublePrefix + "mPreferredTopFocusableStack=" + mPreferredTopFocusableStack); } if (mLastFocusedStack != null) { pw.println(prefix + " mLastFocusedStack=" + mLastFocusedStack); pw.println(doublePrefix + "mLastFocusedStack=" + mLastFocusedStack); } final String doublePrefix = prefix + " "; final String triplePrefix = doublePrefix + " "; pw.println(doublePrefix + "Application tokens in top down Z order:"); for (int stackNdx = getChildCount() - 1; stackNdx >= 0; --stackNdx) { Loading Loading
services/core/java/com/android/server/wm/ActivityStack.java +0 −2 Original line number Diff line number Diff line Loading @@ -954,8 +954,6 @@ class ActivityStack extends Task { void awakeFromSleepingLocked() { // Ensure activities are no longer sleeping. forAllActivities((Consumer<ActivityRecord>) (r) -> r.setSleeping(false)); ensureActivitiesVisible(null /* starting */, 0 /* configChanges */, false /* preserveWindows */); if (mPausingActivity != null) { Slog.d(TAG, "awakeFromSleepingLocked: previously pausing activity didn't pause"); mPausingActivity.activityPaused(true); Loading
services/core/java/com/android/server/wm/DisplayArea.java +1 −0 Original line number Diff line number Diff line Loading @@ -253,6 +253,7 @@ public class DisplayArea<T extends WindowContainer> extends WindowContainer<T> { req = mLastKeyguardForcedOrientation; } } mLastOrientationSource = win; return req; } } Loading
services/core/java/com/android/server/wm/DisplayContent.java +16 −3 Original line number Diff line number Diff line Loading @@ -1189,6 +1189,8 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo activity.onRemovedFromDisplay(); if (activity == mFixedRotationLaunchingApp) { // Make sure the states of associated tokens are also cleared. activity.finishFixedRotationTransform(); setFixedRotationLaunchingAppUnchecked(null); } } Loading Loading @@ -1487,6 +1489,12 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo // window was transferred ({@link #mSkipAppTransitionAnimation}). return false; } if ((mAppTransition.getTransitFlags() & WindowManager.TRANSIT_FLAG_KEYGUARD_GOING_AWAY_NO_ANIMATION) != 0) { // The transition may be finished before keyguard hidden. In order to avoid the // intermediate orientation change, it is more stable to freeze the display. return false; } } else if (r != topRunningActivity()) { // If the transition has not started yet, the activity must be the top. return false; Loading Loading @@ -2310,6 +2318,13 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo void onAppTransitionDone() { super.onAppTransitionDone(); mWmService.mWindowsChanged = true; // If the transition finished callback cannot match the token for some reason, make sure the // rotated state is cleared if it is already invisible. if (mFixedRotationLaunchingApp != null && !mFixedRotationLaunchingApp.mVisibleRequested && !mFixedRotationLaunchingApp.isVisible() && !mDisplayRotation.isRotatingSeamlessly()) { clearFixedRotationLaunchingApp(); } } @Override Loading Loading @@ -3011,11 +3026,9 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo final ScreenRotationAnimation rotationAnimation = getRotationAnimation(); if (rotationAnimation != null) { pw.print(subPrefix); pw.println(" mScreenRotationAnimation:"); rotationAnimation.printTo(" ", pw); rotationAnimation.printTo(subPrefix, pw); } else if (dumpAll) { pw.print(subPrefix); pw.println(" no ScreenRotationAnimation "); } Loading
services/core/java/com/android/server/wm/RootWindowContainer.java +6 −0 Original line number Diff line number Diff line Loading @@ -2391,6 +2391,12 @@ class RootWindowContainer extends WindowContainer<DisplayContent> // activity here. resumeFocusedStacksTopActivities(); } // The visibility update must not be called before resuming the top, so the // display orientation can be updated first if needed. Otherwise there may // have redundant configuration changes due to apply outdated display // orientation (from keyguard) to activity. stack.ensureActivitiesVisible(null /* starting */, 0 /* configChanges */, false /* preserveWindows */); } } } Loading
services/core/java/com/android/server/wm/TaskDisplayArea.java +4 −4 Original line number Diff line number Diff line Loading @@ -1864,14 +1864,14 @@ final class TaskDisplayArea extends DisplayArea<ActivityStack> { @Override void dump(PrintWriter pw, String prefix, boolean dumpAll) { pw.println(prefix + "TaskDisplayArea " + getName()); super.dump(pw, prefix, dumpAll); final String doublePrefix = prefix + " "; super.dump(pw, doublePrefix, dumpAll); if (mPreferredTopFocusableStack != null) { pw.println(prefix + " mPreferredTopFocusableStack=" + mPreferredTopFocusableStack); pw.println(doublePrefix + "mPreferredTopFocusableStack=" + mPreferredTopFocusableStack); } if (mLastFocusedStack != null) { pw.println(prefix + " mLastFocusedStack=" + mLastFocusedStack); pw.println(doublePrefix + "mLastFocusedStack=" + mLastFocusedStack); } final String doublePrefix = prefix + " "; final String triplePrefix = doublePrefix + " "; pw.println(doublePrefix + "Application tokens in top down Z order:"); for (int stackNdx = getChildCount() - 1; stackNdx >= 0; --stackNdx) { Loading