Loading services/core/java/com/android/server/wm/ActivityRecord.java +15 −18 Original line number Diff line number Diff line Loading @@ -2786,8 +2786,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A } makeFinishingLocked(); final boolean activityRemoved = destroyImmediately(true /* removeFromApp */, "finish-imm:" + reason); final boolean activityRemoved = destroyImmediately("finish-imm:" + reason); // If the display does not have running activity, the configuration may need to be // updated for restoring original orientation of the display. Loading Loading @@ -2835,7 +2834,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A * @return {@code true} if activity was immediately removed from history, {@code false} * otherwise. */ boolean destroyImmediately(boolean removeFromApp, String reason) { boolean destroyImmediately(String reason) { if (DEBUG_SWITCH || DEBUG_CLEANUP) { Slog.v(TAG_SWITCH, "Removing activity from " + reason + ": token=" + this + ", app=" + (hasProcess() ? app.mName : "(null)")); Loading @@ -2857,7 +2856,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A cleanUp(false /* cleanServices */, false /* setState */); if (hasProcess()) { if (removeFromApp) { app.removeActivity(this, true /* keepAssociation */); if (!app.hasActivities()) { mAtmService.clearHeavyWeightProcessIfEquals(app); Loading @@ -2868,7 +2866,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A false /* activityChange */, true /* updateOomAdj */, false /* addPendingTopUid */); } } boolean skipDestroy = false; Loading Loading @@ -2934,7 +2931,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A + " pausing=" + stack.mPausingActivity + " for reason " + reason); } return destroyImmediately(true /* removeFromApp */, reason); return destroyImmediately(reason); } return false; } Loading Loading @@ -5122,7 +5119,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A if (DEBUG_STATES) Slog.v(TAG_STATES, "Stop failed; moving to STOPPED: " + this); setState(STOPPED, "stopIfPossible"); if (deferRelaunchUntilPaused) { destroyImmediately(true /* removeFromApp */, "stop-except"); destroyImmediately("stop-except"); } } } Loading Loading @@ -5163,7 +5160,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A clearOptionsLocked(); } else { if (deferRelaunchUntilPaused) { destroyImmediately(true /* removeFromApp */, "stop-config"); destroyImmediately("stop-config"); mRootWindowContainer.resumeFocusedStacksTopActivities(); } else { mRootWindowContainer.updatePreviousProcess(this); Loading Loading @@ -7113,7 +7110,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A if (!attachedToProcess()) { if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG_CONFIGURATION, "Config is destroying non-running " + this); destroyImmediately(true /* removeFromApp */, "config"); destroyImmediately("config"); } else if (mState == PAUSING) { // A little annoying: we are waiting for this activity to finish pausing. Let's not // do anything now, but just flag that it needs to be restarted when done pausing. Loading services/core/java/com/android/server/wm/ActivityStackSupervisor.java +1 −3 Original line number Diff line number Diff line Loading @@ -41,10 +41,8 @@ import static android.content.pm.PackageManager.PERMISSION_DENIED; import static android.content.pm.PackageManager.PERMISSION_GRANTED; import static android.os.PowerManager.PARTIAL_WAKE_LOCK; import static android.os.Process.INVALID_UID; import static android.os.Process.SYSTEM_UID; import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER; import static android.view.Display.DEFAULT_DISPLAY; import static android.view.Display.TYPE_VIRTUAL; import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_ALL; import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_CLEANUP; Loading Loading @@ -1869,7 +1867,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { for (int i = 0; i < numFinishingActivities; i++) { final ActivityRecord r = finishingActivities.get(i); if (r.isInHistory()) { r.destroyImmediately(true /* removeFromApp */, "finish-" + reason); r.destroyImmediately("finish-" + reason); } } } Loading services/core/java/com/android/server/wm/ActivityTaskManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -3379,7 +3379,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { if (r == null || !r.isDestroyable()) { return false; } r.destroyImmediately(true /* removeFromApp */, "app-req"); r.destroyImmediately("app-req"); return r.isState(DESTROYING, DESTROYED); } finally { Binder.restoreCallingIdentity(origId); Loading services/core/java/com/android/server/wm/RootWindowContainer.java +1 −1 Original line number Diff line number Diff line Loading @@ -2716,7 +2716,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> + " resumed=" + r.getStack().mResumedActivity + " pausing=" + r.getStack().mPausingActivity + " for reason " + mDestroyAllActivitiesReason); r.destroyImmediately(true /* removeFromTask */, mDestroyAllActivitiesReason); r.destroyImmediately(mDestroyAllActivitiesReason); } // Tries to put all activity stacks to sleep. Returns true if all stacks were Loading services/core/java/com/android/server/wm/WindowProcessController.java +1 −1 Original line number Diff line number Diff line Loading @@ -941,7 +941,7 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio final ActivityRecord r = candidates.remove(0); if (DEBUG_RELEASE) Slog.v(TAG_RELEASE, "Destroying " + r + " in state " + r.getState() + " for reason " + reason); r.destroyImmediately(true /*removeFromApp*/, reason); r.destroyImmediately(reason); --maxRelease; } while (maxRelease > 0); } Loading Loading
services/core/java/com/android/server/wm/ActivityRecord.java +15 −18 Original line number Diff line number Diff line Loading @@ -2786,8 +2786,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A } makeFinishingLocked(); final boolean activityRemoved = destroyImmediately(true /* removeFromApp */, "finish-imm:" + reason); final boolean activityRemoved = destroyImmediately("finish-imm:" + reason); // If the display does not have running activity, the configuration may need to be // updated for restoring original orientation of the display. Loading Loading @@ -2835,7 +2834,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A * @return {@code true} if activity was immediately removed from history, {@code false} * otherwise. */ boolean destroyImmediately(boolean removeFromApp, String reason) { boolean destroyImmediately(String reason) { if (DEBUG_SWITCH || DEBUG_CLEANUP) { Slog.v(TAG_SWITCH, "Removing activity from " + reason + ": token=" + this + ", app=" + (hasProcess() ? app.mName : "(null)")); Loading @@ -2857,7 +2856,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A cleanUp(false /* cleanServices */, false /* setState */); if (hasProcess()) { if (removeFromApp) { app.removeActivity(this, true /* keepAssociation */); if (!app.hasActivities()) { mAtmService.clearHeavyWeightProcessIfEquals(app); Loading @@ -2868,7 +2866,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A false /* activityChange */, true /* updateOomAdj */, false /* addPendingTopUid */); } } boolean skipDestroy = false; Loading Loading @@ -2934,7 +2931,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A + " pausing=" + stack.mPausingActivity + " for reason " + reason); } return destroyImmediately(true /* removeFromApp */, reason); return destroyImmediately(reason); } return false; } Loading Loading @@ -5122,7 +5119,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A if (DEBUG_STATES) Slog.v(TAG_STATES, "Stop failed; moving to STOPPED: " + this); setState(STOPPED, "stopIfPossible"); if (deferRelaunchUntilPaused) { destroyImmediately(true /* removeFromApp */, "stop-except"); destroyImmediately("stop-except"); } } } Loading Loading @@ -5163,7 +5160,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A clearOptionsLocked(); } else { if (deferRelaunchUntilPaused) { destroyImmediately(true /* removeFromApp */, "stop-config"); destroyImmediately("stop-config"); mRootWindowContainer.resumeFocusedStacksTopActivities(); } else { mRootWindowContainer.updatePreviousProcess(this); Loading Loading @@ -7113,7 +7110,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A if (!attachedToProcess()) { if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG_CONFIGURATION, "Config is destroying non-running " + this); destroyImmediately(true /* removeFromApp */, "config"); destroyImmediately("config"); } else if (mState == PAUSING) { // A little annoying: we are waiting for this activity to finish pausing. Let's not // do anything now, but just flag that it needs to be restarted when done pausing. Loading
services/core/java/com/android/server/wm/ActivityStackSupervisor.java +1 −3 Original line number Diff line number Diff line Loading @@ -41,10 +41,8 @@ import static android.content.pm.PackageManager.PERMISSION_DENIED; import static android.content.pm.PackageManager.PERMISSION_GRANTED; import static android.os.PowerManager.PARTIAL_WAKE_LOCK; import static android.os.Process.INVALID_UID; import static android.os.Process.SYSTEM_UID; import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER; import static android.view.Display.DEFAULT_DISPLAY; import static android.view.Display.TYPE_VIRTUAL; import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_ALL; import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_CLEANUP; Loading Loading @@ -1869,7 +1867,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { for (int i = 0; i < numFinishingActivities; i++) { final ActivityRecord r = finishingActivities.get(i); if (r.isInHistory()) { r.destroyImmediately(true /* removeFromApp */, "finish-" + reason); r.destroyImmediately("finish-" + reason); } } } Loading
services/core/java/com/android/server/wm/ActivityTaskManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -3379,7 +3379,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { if (r == null || !r.isDestroyable()) { return false; } r.destroyImmediately(true /* removeFromApp */, "app-req"); r.destroyImmediately("app-req"); return r.isState(DESTROYING, DESTROYED); } finally { Binder.restoreCallingIdentity(origId); Loading
services/core/java/com/android/server/wm/RootWindowContainer.java +1 −1 Original line number Diff line number Diff line Loading @@ -2716,7 +2716,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> + " resumed=" + r.getStack().mResumedActivity + " pausing=" + r.getStack().mPausingActivity + " for reason " + mDestroyAllActivitiesReason); r.destroyImmediately(true /* removeFromTask */, mDestroyAllActivitiesReason); r.destroyImmediately(mDestroyAllActivitiesReason); } // Tries to put all activity stacks to sleep. Returns true if all stacks were Loading
services/core/java/com/android/server/wm/WindowProcessController.java +1 −1 Original line number Diff line number Diff line Loading @@ -941,7 +941,7 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio final ActivityRecord r = candidates.remove(0); if (DEBUG_RELEASE) Slog.v(TAG_RELEASE, "Destroying " + r + " in state " + r.getState() + " for reason " + reason); r.destroyImmediately(true /*removeFromApp*/, reason); r.destroyImmediately(reason); --maxRelease; } while (maxRelease > 0); } Loading