Loading services/java/com/android/server/am/ActivityManagerService.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -3334,6 +3334,11 @@ public final class ActivityManagerService extends ActivityManagerNative if ((samePackage || r.task == lastTask) if ((samePackage || r.task == lastTask) && (r.app == null || evenPersistent || !r.app.persistent)) { && (r.app == null || evenPersistent || !r.app.persistent)) { if (!doit) { if (!doit) { if (r.finishing) { // If this activity is just finishing, then it is not // interesting as far as something to stop. continue; } return true; return true; } } didSomething = true; didSomething = true; Loading Loading @@ -3399,6 +3404,7 @@ public final class ActivityManagerService extends ActivityManagerNative } } } } mMainStack.resumeTopActivityLocked(null); mMainStack.resumeTopActivityLocked(null); mMainStack.scheduleIdleLocked(); } } return didSomething; return didSomething; Loading services/java/com/android/server/am/ActivityStack.java +9 −9 Original line number Original line Diff line number Diff line Loading @@ -765,9 +765,7 @@ final class ActivityStack { // Still need to tell some activities to stop; can't sleep yet. // Still need to tell some activities to stop; can't sleep yet. if (DEBUG_PAUSE) Slog.v(TAG, "Sleep still need to stop " if (DEBUG_PAUSE) Slog.v(TAG, "Sleep still need to stop " + mStoppingActivities.size() + " activities"); + mStoppingActivities.size() + " activities"); Message msg = Message.obtain(); scheduleIdleLocked(); msg.what = IDLE_NOW_MSG; mHandler.sendMessage(msg); return; return; } } Loading Loading @@ -978,9 +976,7 @@ final class ActivityStack { // then give up on things going idle and start clearing // then give up on things going idle and start clearing // them out. // them out. if (DEBUG_PAUSE) Slog.v(TAG, "To many pending stops, forcing idle"); if (DEBUG_PAUSE) Slog.v(TAG, "To many pending stops, forcing idle"); Message msg = Message.obtain(); scheduleIdleLocked(); msg.what = IDLE_NOW_MSG; mHandler.sendMessage(msg); } else { } else { checkReadyForSleepLocked(); checkReadyForSleepLocked(); } } Loading Loading @@ -3103,6 +3099,12 @@ final class ActivityStack { return stops; return stops; } } final void scheduleIdleLocked() { Message msg = Message.obtain(); msg.what = IDLE_NOW_MSG; mHandler.sendMessage(msg); } final ActivityRecord activityIdleInternal(IBinder token, boolean fromTimeout, final ActivityRecord activityIdleInternal(IBinder token, boolean fromTimeout, Configuration config) { Configuration config) { if (localLOGV) Slog.v(TAG, "Activity idle: " + token); if (localLOGV) Slog.v(TAG, "Activity idle: " + token); Loading Loading @@ -3413,9 +3415,7 @@ final class ActivityStack { // If we already have a few activities waiting to stop, // If we already have a few activities waiting to stop, // then give up on things going idle and start clearing // then give up on things going idle and start clearing // them out. // them out. Message msg = Message.obtain(); scheduleIdleLocked(); msg.what = IDLE_NOW_MSG; mHandler.sendMessage(msg); } else { } else { checkReadyForSleepLocked(); checkReadyForSleepLocked(); } } Loading services/java/com/android/server/pm/PackageManagerService.java +8 −2 Original line number Original line Diff line number Diff line Loading @@ -4352,7 +4352,10 @@ public class PackageManagerService extends IPackageManager.Stub { if (p != null) { if (p != null) { PackageSetting ps = (PackageSetting)p.mExtras; PackageSetting ps = (PackageSetting)p.mExtras; if (ps != null) { if (ps != null) { return ps.stopped; // System apps are never considered stopped for purposes of // filtering, because there may be no way for the user to // actually re-launch them. return ps.stopped && (ps.pkgFlags&ApplicationInfo.FLAG_SYSTEM) == 0; } } } } return false; return false; Loading Loading @@ -4524,7 +4527,10 @@ public class PackageManagerService extends IPackageManager.Stub { if (p != null) { if (p != null) { PackageSetting ps = (PackageSetting)p.mExtras; PackageSetting ps = (PackageSetting)p.mExtras; if (ps != null) { if (ps != null) { return ps.stopped; // System apps are never considered stopped for purposes of // filtering, because there may be no way for the user to // actually re-launch them. return ps.stopped && (ps.pkgFlags&ApplicationInfo.FLAG_SYSTEM) == 0; } } } } return false; return false; Loading Loading
services/java/com/android/server/am/ActivityManagerService.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -3334,6 +3334,11 @@ public final class ActivityManagerService extends ActivityManagerNative if ((samePackage || r.task == lastTask) if ((samePackage || r.task == lastTask) && (r.app == null || evenPersistent || !r.app.persistent)) { && (r.app == null || evenPersistent || !r.app.persistent)) { if (!doit) { if (!doit) { if (r.finishing) { // If this activity is just finishing, then it is not // interesting as far as something to stop. continue; } return true; return true; } } didSomething = true; didSomething = true; Loading Loading @@ -3399,6 +3404,7 @@ public final class ActivityManagerService extends ActivityManagerNative } } } } mMainStack.resumeTopActivityLocked(null); mMainStack.resumeTopActivityLocked(null); mMainStack.scheduleIdleLocked(); } } return didSomething; return didSomething; Loading
services/java/com/android/server/am/ActivityStack.java +9 −9 Original line number Original line Diff line number Diff line Loading @@ -765,9 +765,7 @@ final class ActivityStack { // Still need to tell some activities to stop; can't sleep yet. // Still need to tell some activities to stop; can't sleep yet. if (DEBUG_PAUSE) Slog.v(TAG, "Sleep still need to stop " if (DEBUG_PAUSE) Slog.v(TAG, "Sleep still need to stop " + mStoppingActivities.size() + " activities"); + mStoppingActivities.size() + " activities"); Message msg = Message.obtain(); scheduleIdleLocked(); msg.what = IDLE_NOW_MSG; mHandler.sendMessage(msg); return; return; } } Loading Loading @@ -978,9 +976,7 @@ final class ActivityStack { // then give up on things going idle and start clearing // then give up on things going idle and start clearing // them out. // them out. if (DEBUG_PAUSE) Slog.v(TAG, "To many pending stops, forcing idle"); if (DEBUG_PAUSE) Slog.v(TAG, "To many pending stops, forcing idle"); Message msg = Message.obtain(); scheduleIdleLocked(); msg.what = IDLE_NOW_MSG; mHandler.sendMessage(msg); } else { } else { checkReadyForSleepLocked(); checkReadyForSleepLocked(); } } Loading Loading @@ -3103,6 +3099,12 @@ final class ActivityStack { return stops; return stops; } } final void scheduleIdleLocked() { Message msg = Message.obtain(); msg.what = IDLE_NOW_MSG; mHandler.sendMessage(msg); } final ActivityRecord activityIdleInternal(IBinder token, boolean fromTimeout, final ActivityRecord activityIdleInternal(IBinder token, boolean fromTimeout, Configuration config) { Configuration config) { if (localLOGV) Slog.v(TAG, "Activity idle: " + token); if (localLOGV) Slog.v(TAG, "Activity idle: " + token); Loading Loading @@ -3413,9 +3415,7 @@ final class ActivityStack { // If we already have a few activities waiting to stop, // If we already have a few activities waiting to stop, // then give up on things going idle and start clearing // then give up on things going idle and start clearing // them out. // them out. Message msg = Message.obtain(); scheduleIdleLocked(); msg.what = IDLE_NOW_MSG; mHandler.sendMessage(msg); } else { } else { checkReadyForSleepLocked(); checkReadyForSleepLocked(); } } Loading
services/java/com/android/server/pm/PackageManagerService.java +8 −2 Original line number Original line Diff line number Diff line Loading @@ -4352,7 +4352,10 @@ public class PackageManagerService extends IPackageManager.Stub { if (p != null) { if (p != null) { PackageSetting ps = (PackageSetting)p.mExtras; PackageSetting ps = (PackageSetting)p.mExtras; if (ps != null) { if (ps != null) { return ps.stopped; // System apps are never considered stopped for purposes of // filtering, because there may be no way for the user to // actually re-launch them. return ps.stopped && (ps.pkgFlags&ApplicationInfo.FLAG_SYSTEM) == 0; } } } } return false; return false; Loading Loading @@ -4524,7 +4527,10 @@ public class PackageManagerService extends IPackageManager.Stub { if (p != null) { if (p != null) { PackageSetting ps = (PackageSetting)p.mExtras; PackageSetting ps = (PackageSetting)p.mExtras; if (ps != null) { if (ps != null) { return ps.stopped; // System apps are never considered stopped for purposes of // filtering, because there may be no way for the user to // actually re-launch them. return ps.stopped && (ps.pkgFlags&ApplicationInfo.FLAG_SYSTEM) == 0; } } } } return false; return false; Loading