Loading services/core/java/com/android/server/wm/ActivityRecord.java +1 −24 Original line number Diff line number Diff line Loading @@ -562,7 +562,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A boolean mClientVisibilityDeferred;// was the visibility change message to client deferred? boolean idle; // has the activity gone idle? boolean hasBeenLaunched;// has this activity ever been launched? boolean frozenBeforeDestroy;// has been frozen but not yet destroyed. boolean immersive; // immersive mode (don't interrupt if possible) boolean forceNewConfig; // force re-create with new config next time boolean supportsEnterPipOnTaskSwitch; // This flag is set by the system to indicate that the Loading Loading @@ -1201,8 +1200,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A pw.print(" noDisplay="); pw.print(noDisplay); pw.print(" immersive="); pw.print(immersive); pw.print(" launchMode="); pw.println(launchMode); pw.print(prefix); pw.print("frozenBeforeDestroy="); pw.print(frozenBeforeDestroy); pw.print(" forceNewConfig="); pw.println(forceNewConfig); pw.print(prefix); pw.print("mActivityType="); pw.println(activityTypeToString(getActivityType())); pw.print(prefix); pw.print("mImeInsetsFrozenUntilStartInput="); Loading Loading @@ -3848,7 +3845,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A // updated for restoring original orientation of the display. if (next == null) { mRootWindowContainer.ensureVisibilityAndConfig(next, getDisplayId(), false /* markFrozenIfConfigChanged */, true /* deferResume */); true /* deferResume */); } if (activityRemoved) { mRootWindowContainer.resumeFocusedTasksTopActivities(); Loading Loading @@ -4090,7 +4087,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A cleanUpSplashScreen(); deferRelaunchUntilPaused = false; frozenBeforeDestroy = false; if (setState) { setState(DESTROYED, "cleanUp"); Loading Loading @@ -6276,7 +6272,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A } void handleAlreadyVisible() { stopFreezingScreenLocked(false); try { if (returningOptions != null) { app.getThread().scheduleOnNewActivityOptions(token, returningOptions.toBundle()); Loading Loading @@ -6710,19 +6705,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A stopFreezingScreen(true, true); } void stopFreezingScreenLocked(boolean force) { if (force || frozenBeforeDestroy) { frozenBeforeDestroy = false; if (getParent() == null) { return; } ProtoLog.v(WM_DEBUG_ORIENTATION, "Clear freezing of %s: visible=%b freezing=%b", token, isVisible(), isFreezingScreen()); stopFreezingScreen(true, force); } } void stopFreezingScreen(boolean unfreezeSurfaceNow, boolean force) { if (!mFreezingScreen) { return; Loading Loading @@ -9569,7 +9551,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A if (finishing) { ProtoLog.v(WM_DEBUG_CONFIGURATION, "Configuration doesn't matter " + "in finishing %s", this); stopFreezingScreenLocked(false); return true; } Loading Loading @@ -9660,7 +9641,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A // pick that up next time it starts. if (!attachedToProcess()) { ProtoLog.v(WM_DEBUG_CONFIGURATION, "Configuration doesn't matter not running %s", this); stopFreezingScreenLocked(false); forceNewConfig = false; return true; } Loading Loading @@ -9723,9 +9703,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A } notifyDisplayCompatPolicyAboutConfigurationChange( mLastReportedConfiguration.getMergedConfiguration(), mTmpConfig); stopFreezingScreenLocked(false); return true; } Loading services/core/java/com/android/server/wm/ActivityStarter.java +1 −2 Original line number Diff line number Diff line Loading @@ -1549,8 +1549,7 @@ class ActivityStarter { final ActivityRecord currentTop = startedActivityRootTask.topRunningActivity(); if (currentTop != null && currentTop.shouldUpdateConfigForDisplayChanged()) { mRootWindowContainer.ensureVisibilityAndConfig( currentTop, currentTop.getDisplayId(), true /* markFrozenIfConfigChanged */, false /* deferResume */); currentTop, currentTop.getDisplayId(), false /* deferResume */); } if (!mAvoidMoveToFront && mDoResume && mRootWindowContainer Loading services/core/java/com/android/server/wm/ActivityTaskSupervisor.java +1 −1 Original line number Diff line number Diff line Loading @@ -843,7 +843,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { // We don't want to perform a redundant launch of the same record while ensuring // configurations and trying to resume top activity of focused root task. mRootWindowContainer.ensureVisibilityAndConfig(r, r.getDisplayId(), false /* markFrozenIfConfigChanged */, true /* deferResume */); true /* deferResume */); } if (mKeyguardController.checkKeyguardVisibility(r) && r.allowMoveToFront()) { Loading services/core/java/com/android/server/wm/DisplayContent.java +0 −1 Original line number Diff line number Diff line Loading @@ -1710,7 +1710,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp final ActivityRecord activityRecord = (ActivityRecord) requestingContainer; final boolean kept = updateDisplayOverrideConfigurationLocked(config, activityRecord, false /* deferResume */, null /* result */); activityRecord.frozenBeforeDestroy = true; if (!kept) { mRootWindowContainer.resumeFocusedTasksTopActivities(); } Loading services/core/java/com/android/server/wm/RootWindowContainer.java +1 −7 Original line number Diff line number Diff line Loading @@ -1741,14 +1741,11 @@ class RootWindowContainer extends WindowContainer<DisplayContent> * @param starting The currently starting activity or {@code null} if there is * none. * @param displayId The id of the display where operation is executed. * @param markFrozenIfConfigChanged Whether to set {@link ActivityRecord#frozenBeforeDestroy} to * {@code true} if config changed. * @param deferResume Whether to defer resume while updating config. * @return 'true' if starting activity was kept or wasn't provided, 'false' if it was relaunched * because of configuration update. */ boolean ensureVisibilityAndConfig(ActivityRecord starting, int displayId, boolean markFrozenIfConfigChanged, boolean deferResume) { boolean ensureVisibilityAndConfig(ActivityRecord starting, int displayId, boolean deferResume) { // First ensure visibility without updating the config just yet. We need this to know what // activities are affecting configuration now. // Passing null here for 'starting' param value, so that visibility of actual starting Loading @@ -1774,9 +1771,6 @@ class RootWindowContainer extends WindowContainer<DisplayContent> if (starting != null) { starting.reportDescendantOrientationChangeIfNeeded(); } if (starting != null && markFrozenIfConfigChanged && config != null) { starting.frozenBeforeDestroy = true; } if (displayContent != null) { // Update the configuration of the activities on the display. Loading Loading
services/core/java/com/android/server/wm/ActivityRecord.java +1 −24 Original line number Diff line number Diff line Loading @@ -562,7 +562,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A boolean mClientVisibilityDeferred;// was the visibility change message to client deferred? boolean idle; // has the activity gone idle? boolean hasBeenLaunched;// has this activity ever been launched? boolean frozenBeforeDestroy;// has been frozen but not yet destroyed. boolean immersive; // immersive mode (don't interrupt if possible) boolean forceNewConfig; // force re-create with new config next time boolean supportsEnterPipOnTaskSwitch; // This flag is set by the system to indicate that the Loading Loading @@ -1201,8 +1200,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A pw.print(" noDisplay="); pw.print(noDisplay); pw.print(" immersive="); pw.print(immersive); pw.print(" launchMode="); pw.println(launchMode); pw.print(prefix); pw.print("frozenBeforeDestroy="); pw.print(frozenBeforeDestroy); pw.print(" forceNewConfig="); pw.println(forceNewConfig); pw.print(prefix); pw.print("mActivityType="); pw.println(activityTypeToString(getActivityType())); pw.print(prefix); pw.print("mImeInsetsFrozenUntilStartInput="); Loading Loading @@ -3848,7 +3845,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A // updated for restoring original orientation of the display. if (next == null) { mRootWindowContainer.ensureVisibilityAndConfig(next, getDisplayId(), false /* markFrozenIfConfigChanged */, true /* deferResume */); true /* deferResume */); } if (activityRemoved) { mRootWindowContainer.resumeFocusedTasksTopActivities(); Loading Loading @@ -4090,7 +4087,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A cleanUpSplashScreen(); deferRelaunchUntilPaused = false; frozenBeforeDestroy = false; if (setState) { setState(DESTROYED, "cleanUp"); Loading Loading @@ -6276,7 +6272,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A } void handleAlreadyVisible() { stopFreezingScreenLocked(false); try { if (returningOptions != null) { app.getThread().scheduleOnNewActivityOptions(token, returningOptions.toBundle()); Loading Loading @@ -6710,19 +6705,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A stopFreezingScreen(true, true); } void stopFreezingScreenLocked(boolean force) { if (force || frozenBeforeDestroy) { frozenBeforeDestroy = false; if (getParent() == null) { return; } ProtoLog.v(WM_DEBUG_ORIENTATION, "Clear freezing of %s: visible=%b freezing=%b", token, isVisible(), isFreezingScreen()); stopFreezingScreen(true, force); } } void stopFreezingScreen(boolean unfreezeSurfaceNow, boolean force) { if (!mFreezingScreen) { return; Loading Loading @@ -9569,7 +9551,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A if (finishing) { ProtoLog.v(WM_DEBUG_CONFIGURATION, "Configuration doesn't matter " + "in finishing %s", this); stopFreezingScreenLocked(false); return true; } Loading Loading @@ -9660,7 +9641,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A // pick that up next time it starts. if (!attachedToProcess()) { ProtoLog.v(WM_DEBUG_CONFIGURATION, "Configuration doesn't matter not running %s", this); stopFreezingScreenLocked(false); forceNewConfig = false; return true; } Loading Loading @@ -9723,9 +9703,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A } notifyDisplayCompatPolicyAboutConfigurationChange( mLastReportedConfiguration.getMergedConfiguration(), mTmpConfig); stopFreezingScreenLocked(false); return true; } Loading
services/core/java/com/android/server/wm/ActivityStarter.java +1 −2 Original line number Diff line number Diff line Loading @@ -1549,8 +1549,7 @@ class ActivityStarter { final ActivityRecord currentTop = startedActivityRootTask.topRunningActivity(); if (currentTop != null && currentTop.shouldUpdateConfigForDisplayChanged()) { mRootWindowContainer.ensureVisibilityAndConfig( currentTop, currentTop.getDisplayId(), true /* markFrozenIfConfigChanged */, false /* deferResume */); currentTop, currentTop.getDisplayId(), false /* deferResume */); } if (!mAvoidMoveToFront && mDoResume && mRootWindowContainer Loading
services/core/java/com/android/server/wm/ActivityTaskSupervisor.java +1 −1 Original line number Diff line number Diff line Loading @@ -843,7 +843,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { // We don't want to perform a redundant launch of the same record while ensuring // configurations and trying to resume top activity of focused root task. mRootWindowContainer.ensureVisibilityAndConfig(r, r.getDisplayId(), false /* markFrozenIfConfigChanged */, true /* deferResume */); true /* deferResume */); } if (mKeyguardController.checkKeyguardVisibility(r) && r.allowMoveToFront()) { Loading
services/core/java/com/android/server/wm/DisplayContent.java +0 −1 Original line number Diff line number Diff line Loading @@ -1710,7 +1710,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp final ActivityRecord activityRecord = (ActivityRecord) requestingContainer; final boolean kept = updateDisplayOverrideConfigurationLocked(config, activityRecord, false /* deferResume */, null /* result */); activityRecord.frozenBeforeDestroy = true; if (!kept) { mRootWindowContainer.resumeFocusedTasksTopActivities(); } Loading
services/core/java/com/android/server/wm/RootWindowContainer.java +1 −7 Original line number Diff line number Diff line Loading @@ -1741,14 +1741,11 @@ class RootWindowContainer extends WindowContainer<DisplayContent> * @param starting The currently starting activity or {@code null} if there is * none. * @param displayId The id of the display where operation is executed. * @param markFrozenIfConfigChanged Whether to set {@link ActivityRecord#frozenBeforeDestroy} to * {@code true} if config changed. * @param deferResume Whether to defer resume while updating config. * @return 'true' if starting activity was kept or wasn't provided, 'false' if it was relaunched * because of configuration update. */ boolean ensureVisibilityAndConfig(ActivityRecord starting, int displayId, boolean markFrozenIfConfigChanged, boolean deferResume) { boolean ensureVisibilityAndConfig(ActivityRecord starting, int displayId, boolean deferResume) { // First ensure visibility without updating the config just yet. We need this to know what // activities are affecting configuration now. // Passing null here for 'starting' param value, so that visibility of actual starting Loading @@ -1774,9 +1771,6 @@ class RootWindowContainer extends WindowContainer<DisplayContent> if (starting != null) { starting.reportDescendantOrientationChangeIfNeeded(); } if (starting != null && markFrozenIfConfigChanged && config != null) { starting.frozenBeforeDestroy = true; } if (displayContent != null) { // Update the configuration of the activities on the display. Loading