Loading services/core/java/com/android/server/am/ActivityManagerService.java +20 −17 Original line number Diff line number Diff line Loading @@ -1886,7 +1886,7 @@ public class ActivityManagerService extends IActivityManager.Stub int exitInfoReason = (int) args.arg3; args.recycle(); forceStopPackageLocked(pkg, appId, false, false, true, false, false, userId, reason, exitInfoReason); false, false, userId, reason, exitInfoReason); } } break; Loading Loading @@ -3914,7 +3914,10 @@ public class ActivityManagerService extends IActivityManager.Stub + packageName + ": " + e); } if (mUserController.isUserRunning(user, userRunningFlags)) { forceStopPackageLocked(packageName, pkgUid, forceStopPackageLocked(packageName, UserHandle.getAppId(pkgUid), false /* callerWillRestart */, false /* purgeCache */, true /* doIt */, false /* evenPersistent */, false /* uninstalling */, true /* packageStateStopped */, user, reason == null ? ("from pid " + callingPid) : reason); finishForceStopPackageLocked(packageName, pkgUid); } Loading Loading @@ -4163,7 +4166,7 @@ public class ActivityManagerService extends IActivityManager.Stub @GuardedBy("this") private void forceStopPackageLocked(final String packageName, int uid, String reason) { forceStopPackageLocked(packageName, UserHandle.getAppId(uid), false, false, true, false, false, UserHandle.getUserId(uid), reason); false, true, false, false, false, UserHandle.getUserId(uid), reason); } @GuardedBy("this") Loading Loading @@ -4349,20 +4352,20 @@ public class ActivityManagerService extends IActivityManager.Stub @GuardedBy("this") final boolean forceStopPackageLocked(String packageName, int appId, boolean callerWillRestart, boolean purgeCache, boolean doit, boolean evenPersistent, boolean uninstalling, int userId, String reasonString) { boolean evenPersistent, boolean uninstalling, boolean packageStateStopped, int userId, String reasonString) { int reason = packageName == null ? ApplicationExitInfo.REASON_USER_STOPPED : ApplicationExitInfo.REASON_USER_REQUESTED; return forceStopPackageLocked(packageName, appId, callerWillRestart, purgeCache, doit, evenPersistent, uninstalling, userId, reasonString, reason); evenPersistent, uninstalling, packageStateStopped, userId, reasonString, reason); } @GuardedBy("this") final boolean forceStopPackageLocked(String packageName, int appId, boolean callerWillRestart, boolean purgeCache, boolean doit, boolean evenPersistent, boolean uninstalling, int userId, String reasonString, int reason) { boolean evenPersistent, boolean uninstalling, boolean packageStateStopped, int userId, String reasonString, int reason) { int i; if (userId == UserHandle.USER_ALL && packageName == null) { Loading Loading @@ -4443,7 +4446,7 @@ public class ActivityManagerService extends IActivityManager.Stub } } if (packageName == null || uninstalling) { if (packageName == null || uninstalling || packageStateStopped) { didSomething |= mPendingIntentController.removePendingIntentsForPackage( packageName, userId, appId, doit); } Loading Loading @@ -5148,7 +5151,7 @@ public class ActivityManagerService extends IActivityManager.Stub for (String pkg : pkgs) { synchronized (ActivityManagerService.this) { if (forceStopPackageLocked(pkg, -1, false, false, false, false, false, 0, "query restart")) { false, 0, "query restart")) { setResultCode(Activity.RESULT_OK); return; } Loading Loading @@ -7342,7 +7345,7 @@ public class ActivityManagerService extends IActivityManager.Stub mDebugTransient = !persistent; if (packageName != null) { forceStopPackageLocked(packageName, -1, false, false, true, true, false, UserHandle.USER_ALL, "set debug app"); false, false, UserHandle.USER_ALL, "set debug app"); } } } finally { Loading Loading @@ -14918,7 +14921,7 @@ public class ActivityManagerService extends IActivityManager.Stub if (list != null && list.length > 0) { for (int i = 0; i < list.length; i++) { forceStopPackageLocked(list[i], -1, false, true, true, false, false, userId, "storage unmount"); false, false, false, userId, "storage unmount"); } mAtmInternal.cleanupRecentTasksForUser(UserHandle.USER_ALL); sendPackageBroadcastLocked( Loading @@ -14945,8 +14948,8 @@ public class ActivityManagerService extends IActivityManager.Stub if (killProcess) { forceStopPackageLocked(ssp, UserHandle.getAppId( intent.getIntExtra(Intent.EXTRA_UID, -1)), false, true, true, false, fullUninstall, userId, "pkg removed"); false, true, true, false, fullUninstall, false, userId, "pkg removed"); getPackageManagerInternal() .onPackageProcessKilledForUninstall(ssp); } else { Loading Loading @@ -15864,7 +15867,7 @@ public class ActivityManagerService extends IActivityManager.Stub } else { // Instrumentation can kill and relaunch even persistent processes forceStopPackageLocked(ii.targetPackage, -1, true, false, true, true, false, userId, "start instr"); false, userId, "start instr"); // Inform usage stats to make the target package active if (mUsageStatsService != null) { mUsageStatsService.reportEvent(ii.targetPackage, userId, Loading Loading @@ -15993,6 +15996,7 @@ public class ActivityManagerService extends IActivityManager.Stub /* doIt= */ true, /* evenPersistent= */ true, /* uninstalling= */ false, /* packageStateStopped= */ false, userId, "start instr"); Loading Loading @@ -16163,8 +16167,7 @@ public class ActivityManagerService extends IActivityManager.Stub } } else if (!instr.mNoRestart) { forceStopPackageLocked(app.info.packageName, -1, false, false, true, true, false, app.userId, "finished inst"); false, app.userId, "finished inst"); } } finally { Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER); services/core/java/com/android/server/am/ProcessList.java +3 −3 Original line number Diff line number Diff line Loading @@ -2040,7 +2040,7 @@ public final class ProcessList { // the package was initially frozen through KILL_APPLICATION_MSG, so // it doesn't hurt to use it again.) mService.forceStopPackageLocked(app.info.packageName, UserHandle.getAppId(app.uid), false, false, true, false, false, app.userId, "start failure"); false, false, true, false, false, false, app.userId, "start failure"); return false; } } Loading Loading @@ -2115,7 +2115,7 @@ public final class ProcessList { + app.processName, e); app.setPendingStart(false); mService.forceStopPackageLocked(app.info.packageName, UserHandle.getAppId(app.uid), false, false, true, false, false, app.userId, "start failure"); false, false, true, false, false, false, app.userId, "start failure"); } return app.getPid() > 0; } Loading Loading @@ -2148,7 +2148,7 @@ public final class ProcessList { app.setPendingStart(false); mService.forceStopPackageLocked(app.info.packageName, UserHandle.getAppId(app.uid), false, false, true, false, false, app.userId, "start failure"); false, false, true, false, false, false, app.userId, "start failure"); } } }; Loading services/core/java/com/android/server/am/UserController.java +1 −1 Original line number Diff line number Diff line Loading @@ -3629,7 +3629,7 @@ class UserController implements Handler.Callback { void activityManagerForceStopPackage(@UserIdInt int userId, String reason) { synchronized (mService) { mService.forceStopPackageLocked(null, -1, false, false, true, false, false, mService.forceStopPackageLocked(null, -1, false, false, true, false, false, false, userId, reason); } }; Loading Loading
services/core/java/com/android/server/am/ActivityManagerService.java +20 −17 Original line number Diff line number Diff line Loading @@ -1886,7 +1886,7 @@ public class ActivityManagerService extends IActivityManager.Stub int exitInfoReason = (int) args.arg3; args.recycle(); forceStopPackageLocked(pkg, appId, false, false, true, false, false, userId, reason, exitInfoReason); false, false, userId, reason, exitInfoReason); } } break; Loading Loading @@ -3914,7 +3914,10 @@ public class ActivityManagerService extends IActivityManager.Stub + packageName + ": " + e); } if (mUserController.isUserRunning(user, userRunningFlags)) { forceStopPackageLocked(packageName, pkgUid, forceStopPackageLocked(packageName, UserHandle.getAppId(pkgUid), false /* callerWillRestart */, false /* purgeCache */, true /* doIt */, false /* evenPersistent */, false /* uninstalling */, true /* packageStateStopped */, user, reason == null ? ("from pid " + callingPid) : reason); finishForceStopPackageLocked(packageName, pkgUid); } Loading Loading @@ -4163,7 +4166,7 @@ public class ActivityManagerService extends IActivityManager.Stub @GuardedBy("this") private void forceStopPackageLocked(final String packageName, int uid, String reason) { forceStopPackageLocked(packageName, UserHandle.getAppId(uid), false, false, true, false, false, UserHandle.getUserId(uid), reason); false, true, false, false, false, UserHandle.getUserId(uid), reason); } @GuardedBy("this") Loading Loading @@ -4349,20 +4352,20 @@ public class ActivityManagerService extends IActivityManager.Stub @GuardedBy("this") final boolean forceStopPackageLocked(String packageName, int appId, boolean callerWillRestart, boolean purgeCache, boolean doit, boolean evenPersistent, boolean uninstalling, int userId, String reasonString) { boolean evenPersistent, boolean uninstalling, boolean packageStateStopped, int userId, String reasonString) { int reason = packageName == null ? ApplicationExitInfo.REASON_USER_STOPPED : ApplicationExitInfo.REASON_USER_REQUESTED; return forceStopPackageLocked(packageName, appId, callerWillRestart, purgeCache, doit, evenPersistent, uninstalling, userId, reasonString, reason); evenPersistent, uninstalling, packageStateStopped, userId, reasonString, reason); } @GuardedBy("this") final boolean forceStopPackageLocked(String packageName, int appId, boolean callerWillRestart, boolean purgeCache, boolean doit, boolean evenPersistent, boolean uninstalling, int userId, String reasonString, int reason) { boolean evenPersistent, boolean uninstalling, boolean packageStateStopped, int userId, String reasonString, int reason) { int i; if (userId == UserHandle.USER_ALL && packageName == null) { Loading Loading @@ -4443,7 +4446,7 @@ public class ActivityManagerService extends IActivityManager.Stub } } if (packageName == null || uninstalling) { if (packageName == null || uninstalling || packageStateStopped) { didSomething |= mPendingIntentController.removePendingIntentsForPackage( packageName, userId, appId, doit); } Loading Loading @@ -5148,7 +5151,7 @@ public class ActivityManagerService extends IActivityManager.Stub for (String pkg : pkgs) { synchronized (ActivityManagerService.this) { if (forceStopPackageLocked(pkg, -1, false, false, false, false, false, 0, "query restart")) { false, 0, "query restart")) { setResultCode(Activity.RESULT_OK); return; } Loading Loading @@ -7342,7 +7345,7 @@ public class ActivityManagerService extends IActivityManager.Stub mDebugTransient = !persistent; if (packageName != null) { forceStopPackageLocked(packageName, -1, false, false, true, true, false, UserHandle.USER_ALL, "set debug app"); false, false, UserHandle.USER_ALL, "set debug app"); } } } finally { Loading Loading @@ -14918,7 +14921,7 @@ public class ActivityManagerService extends IActivityManager.Stub if (list != null && list.length > 0) { for (int i = 0; i < list.length; i++) { forceStopPackageLocked(list[i], -1, false, true, true, false, false, userId, "storage unmount"); false, false, false, userId, "storage unmount"); } mAtmInternal.cleanupRecentTasksForUser(UserHandle.USER_ALL); sendPackageBroadcastLocked( Loading @@ -14945,8 +14948,8 @@ public class ActivityManagerService extends IActivityManager.Stub if (killProcess) { forceStopPackageLocked(ssp, UserHandle.getAppId( intent.getIntExtra(Intent.EXTRA_UID, -1)), false, true, true, false, fullUninstall, userId, "pkg removed"); false, true, true, false, fullUninstall, false, userId, "pkg removed"); getPackageManagerInternal() .onPackageProcessKilledForUninstall(ssp); } else { Loading Loading @@ -15864,7 +15867,7 @@ public class ActivityManagerService extends IActivityManager.Stub } else { // Instrumentation can kill and relaunch even persistent processes forceStopPackageLocked(ii.targetPackage, -1, true, false, true, true, false, userId, "start instr"); false, userId, "start instr"); // Inform usage stats to make the target package active if (mUsageStatsService != null) { mUsageStatsService.reportEvent(ii.targetPackage, userId, Loading Loading @@ -15993,6 +15996,7 @@ public class ActivityManagerService extends IActivityManager.Stub /* doIt= */ true, /* evenPersistent= */ true, /* uninstalling= */ false, /* packageStateStopped= */ false, userId, "start instr"); Loading Loading @@ -16163,8 +16167,7 @@ public class ActivityManagerService extends IActivityManager.Stub } } else if (!instr.mNoRestart) { forceStopPackageLocked(app.info.packageName, -1, false, false, true, true, false, app.userId, "finished inst"); false, app.userId, "finished inst"); } } finally { Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
services/core/java/com/android/server/am/ProcessList.java +3 −3 Original line number Diff line number Diff line Loading @@ -2040,7 +2040,7 @@ public final class ProcessList { // the package was initially frozen through KILL_APPLICATION_MSG, so // it doesn't hurt to use it again.) mService.forceStopPackageLocked(app.info.packageName, UserHandle.getAppId(app.uid), false, false, true, false, false, app.userId, "start failure"); false, false, true, false, false, false, app.userId, "start failure"); return false; } } Loading Loading @@ -2115,7 +2115,7 @@ public final class ProcessList { + app.processName, e); app.setPendingStart(false); mService.forceStopPackageLocked(app.info.packageName, UserHandle.getAppId(app.uid), false, false, true, false, false, app.userId, "start failure"); false, false, true, false, false, false, app.userId, "start failure"); } return app.getPid() > 0; } Loading Loading @@ -2148,7 +2148,7 @@ public final class ProcessList { app.setPendingStart(false); mService.forceStopPackageLocked(app.info.packageName, UserHandle.getAppId(app.uid), false, false, true, false, false, app.userId, "start failure"); false, false, true, false, false, false, app.userId, "start failure"); } } }; Loading
services/core/java/com/android/server/am/UserController.java +1 −1 Original line number Diff line number Diff line Loading @@ -3629,7 +3629,7 @@ class UserController implements Handler.Callback { void activityManagerForceStopPackage(@UserIdInt int userId, String reason) { synchronized (mService) { mService.forceStopPackageLocked(null, -1, false, false, true, false, false, mService.forceStopPackageLocked(null, -1, false, false, true, false, false, false, userId, reason); } }; Loading