Loading services/java/com/android/server/am/ActivityManagerService.java +3 −1 Original line number Diff line number Diff line Loading @@ -2341,6 +2341,8 @@ public final class ActivityManagerService extends ActivityManagerNative } void updateUsageStats(ActivityRecord resumedComponent, boolean resumed) { if (DEBUG_SWITCH) Slog.d(TAG, "updateUsageStats: comp=" + resumedComponent + "res=" + resumed); if (resumed) { mUsageStatsService.noteResumeComponent(resumedComponent.realActivity); } else { Loading Loading @@ -6781,7 +6783,7 @@ public final class ActivityManagerService extends ActivityManagerNative if (DEBUG_PROVIDER) { RuntimeException e = new RuntimeException("here"); Slog.w(TAG, "LAUNCHING REMOTE PROVIDER (myuid " + r.uid Slog.w(TAG, "LAUNCHING REMOTE PROVIDER (myuid " + (r != null ? r.uid : null) + " pruid " + cpr.appInfo.uid + "): " + cpr.info.name, e); } Loading services/java/com/android/server/am/ActivityStack.java +27 −22 Original line number Diff line number Diff line Loading @@ -668,7 +668,6 @@ final class ActivityStack { checkReadyForSleepLocked(); } // Checked. void checkReadyForSleepLocked() { if (!mService.isSleepingOrShuttingDown()) { // Do not care. Loading Loading @@ -1003,7 +1002,6 @@ final class ActivityStack { prev.cpuTimeAtResume = 0; // reset it } // Checked. /** * Once we know that we have asked an application to put an activity in * the resumed state (either by launching it or explicitly telling it), Loading Loading @@ -1034,13 +1032,28 @@ final class ActivityStack { } } // Checked. /** * Version of ensureActivitiesVisible that can easily be called anywhere. */ final boolean ensureActivitiesVisibleLocked(ActivityRecord starting, int configChanges) { return ensureActivitiesVisibleLocked(starting, configChanges, false); } final boolean ensureActivitiesVisibleLocked(ActivityRecord starting, int configChanges, boolean forceHomeShown) { ActivityRecord r = topRunningActivityLocked(null); if (r != null) { return ensureActivitiesVisibleLocked(r, starting, null, configChanges, forceHomeShown); } return false; } /** * Make sure that all activities that need to be visible (that is, they * currently can be seen by the user) actually are. */ final void ensureActivitiesVisibleLocked(ActivityRecord top, ActivityRecord starting, String onlyThisProcess, int configChanges) { final boolean ensureActivitiesVisibleLocked(ActivityRecord top, ActivityRecord starting, String onlyThisProcess, int configChanges, boolean forceHomeShown) { if (DEBUG_VISBILITY) Slog.v( TAG, "ensureActivitiesVisible behind " + top + " configChanges=0x" + Integer.toHexString(configChanges)); Loading @@ -1048,7 +1061,9 @@ final class ActivityStack { // If the top activity is not fullscreen, then we need to // make sure any activities under it are now visible. boolean aboveTop = true; boolean behindFullscreen = !mStackSupervisor.isFrontStack(this); boolean showHomeBehindStack = false; boolean behindFullscreen = !mStackSupervisor.isFrontStack(this) && !(forceHomeShown && isHomeStack()); int taskNdx; for (taskNdx = mTaskHistory.size() - 1; taskNdx >= 0; --taskNdx) { final ArrayList<ActivityRecord> activities = mTaskHistory.get(taskNdx).mActivities; Loading Loading @@ -1129,8 +1144,11 @@ final class ActivityStack { if (r.fullscreen) { // At this point, nothing else needs to be shown if (DEBUG_VISBILITY) Slog.v( TAG, "Stopping: fullscreen at " + r); if (DEBUG_VISBILITY) Slog.v(TAG, "Fullscreen: at " + r); behindFullscreen = true; } else if (r.mLaunchHomeTaskNext) { if (DEBUG_VISBILITY) Slog.v(TAG, "Showing home: at " + r); showHomeBehindStack = true; behindFullscreen = true; } } else { Loading Loading @@ -1163,18 +1181,7 @@ final class ActivityStack { } } } } // Checked. /** * Version of ensureActivitiesVisible that can easily be called anywhere. */ final void ensureActivitiesVisibleLocked(ActivityRecord starting, int configChanges) { ActivityRecord r = topRunningActivityLocked(null); if (r != null) { ensureActivitiesVisibleLocked(r, starting, null, configChanges); } return showHomeBehindStack; } /** Loading @@ -1190,7 +1197,6 @@ final class ActivityStack { return resumeTopActivityLocked(prev, null); } // Checked. final boolean resumeTopActivityLocked(ActivityRecord prev, Bundle options) { // Find the first activity that is not finishing. ActivityRecord next = topRunningActivityLocked(null); Loading Loading @@ -2173,7 +2179,6 @@ final class ActivityStack { } } // Checked. final ActivityRecord activityIdleInternalLocked(final IBinder token, boolean fromTimeout, Configuration config) { if (localLOGV) Slog.v(TAG, "Activity idle: " + token); Loading services/java/com/android/server/am/ActivityStackSupervisor.java +15 −2 Original line number Diff line number Diff line Loading @@ -346,7 +346,7 @@ public class ActivityStackSupervisor { throw e; } } else { stack.ensureActivitiesVisibleLocked(hr, null, processName, 0); stack.ensureActivitiesVisibleLocked(hr, null, processName, 0, false); } } } Loading Loading @@ -1941,8 +1941,21 @@ public class ActivityStackSupervisor { } void ensureActivitiesVisibleLocked(ActivityRecord starting, int configChanges) { // First the front stacks. In case any are not fullscreen and are in front of home. boolean showHomeBehindStack = false; for (int stackNdx = mStacks.size() - 1; stackNdx >= 0; --stackNdx) { mStacks.get(stackNdx).ensureActivitiesVisibleLocked(starting, configChanges); final ActivityStack stack = mStacks.get(stackNdx); if (isFrontStack(stack)) { showHomeBehindStack = stack.ensureActivitiesVisibleLocked(starting, configChanges); } } // Now do back stacks. for (int stackNdx = mStacks.size() - 1; stackNdx >= 0; --stackNdx) { final ActivityStack stack = mStacks.get(stackNdx); if (!isFrontStack(stack)) { stack.ensureActivitiesVisibleLocked(starting, configChanges, showHomeBehindStack); } } } Loading Loading
services/java/com/android/server/am/ActivityManagerService.java +3 −1 Original line number Diff line number Diff line Loading @@ -2341,6 +2341,8 @@ public final class ActivityManagerService extends ActivityManagerNative } void updateUsageStats(ActivityRecord resumedComponent, boolean resumed) { if (DEBUG_SWITCH) Slog.d(TAG, "updateUsageStats: comp=" + resumedComponent + "res=" + resumed); if (resumed) { mUsageStatsService.noteResumeComponent(resumedComponent.realActivity); } else { Loading Loading @@ -6781,7 +6783,7 @@ public final class ActivityManagerService extends ActivityManagerNative if (DEBUG_PROVIDER) { RuntimeException e = new RuntimeException("here"); Slog.w(TAG, "LAUNCHING REMOTE PROVIDER (myuid " + r.uid Slog.w(TAG, "LAUNCHING REMOTE PROVIDER (myuid " + (r != null ? r.uid : null) + " pruid " + cpr.appInfo.uid + "): " + cpr.info.name, e); } Loading
services/java/com/android/server/am/ActivityStack.java +27 −22 Original line number Diff line number Diff line Loading @@ -668,7 +668,6 @@ final class ActivityStack { checkReadyForSleepLocked(); } // Checked. void checkReadyForSleepLocked() { if (!mService.isSleepingOrShuttingDown()) { // Do not care. Loading Loading @@ -1003,7 +1002,6 @@ final class ActivityStack { prev.cpuTimeAtResume = 0; // reset it } // Checked. /** * Once we know that we have asked an application to put an activity in * the resumed state (either by launching it or explicitly telling it), Loading Loading @@ -1034,13 +1032,28 @@ final class ActivityStack { } } // Checked. /** * Version of ensureActivitiesVisible that can easily be called anywhere. */ final boolean ensureActivitiesVisibleLocked(ActivityRecord starting, int configChanges) { return ensureActivitiesVisibleLocked(starting, configChanges, false); } final boolean ensureActivitiesVisibleLocked(ActivityRecord starting, int configChanges, boolean forceHomeShown) { ActivityRecord r = topRunningActivityLocked(null); if (r != null) { return ensureActivitiesVisibleLocked(r, starting, null, configChanges, forceHomeShown); } return false; } /** * Make sure that all activities that need to be visible (that is, they * currently can be seen by the user) actually are. */ final void ensureActivitiesVisibleLocked(ActivityRecord top, ActivityRecord starting, String onlyThisProcess, int configChanges) { final boolean ensureActivitiesVisibleLocked(ActivityRecord top, ActivityRecord starting, String onlyThisProcess, int configChanges, boolean forceHomeShown) { if (DEBUG_VISBILITY) Slog.v( TAG, "ensureActivitiesVisible behind " + top + " configChanges=0x" + Integer.toHexString(configChanges)); Loading @@ -1048,7 +1061,9 @@ final class ActivityStack { // If the top activity is not fullscreen, then we need to // make sure any activities under it are now visible. boolean aboveTop = true; boolean behindFullscreen = !mStackSupervisor.isFrontStack(this); boolean showHomeBehindStack = false; boolean behindFullscreen = !mStackSupervisor.isFrontStack(this) && !(forceHomeShown && isHomeStack()); int taskNdx; for (taskNdx = mTaskHistory.size() - 1; taskNdx >= 0; --taskNdx) { final ArrayList<ActivityRecord> activities = mTaskHistory.get(taskNdx).mActivities; Loading Loading @@ -1129,8 +1144,11 @@ final class ActivityStack { if (r.fullscreen) { // At this point, nothing else needs to be shown if (DEBUG_VISBILITY) Slog.v( TAG, "Stopping: fullscreen at " + r); if (DEBUG_VISBILITY) Slog.v(TAG, "Fullscreen: at " + r); behindFullscreen = true; } else if (r.mLaunchHomeTaskNext) { if (DEBUG_VISBILITY) Slog.v(TAG, "Showing home: at " + r); showHomeBehindStack = true; behindFullscreen = true; } } else { Loading Loading @@ -1163,18 +1181,7 @@ final class ActivityStack { } } } } // Checked. /** * Version of ensureActivitiesVisible that can easily be called anywhere. */ final void ensureActivitiesVisibleLocked(ActivityRecord starting, int configChanges) { ActivityRecord r = topRunningActivityLocked(null); if (r != null) { ensureActivitiesVisibleLocked(r, starting, null, configChanges); } return showHomeBehindStack; } /** Loading @@ -1190,7 +1197,6 @@ final class ActivityStack { return resumeTopActivityLocked(prev, null); } // Checked. final boolean resumeTopActivityLocked(ActivityRecord prev, Bundle options) { // Find the first activity that is not finishing. ActivityRecord next = topRunningActivityLocked(null); Loading Loading @@ -2173,7 +2179,6 @@ final class ActivityStack { } } // Checked. final ActivityRecord activityIdleInternalLocked(final IBinder token, boolean fromTimeout, Configuration config) { if (localLOGV) Slog.v(TAG, "Activity idle: " + token); Loading
services/java/com/android/server/am/ActivityStackSupervisor.java +15 −2 Original line number Diff line number Diff line Loading @@ -346,7 +346,7 @@ public class ActivityStackSupervisor { throw e; } } else { stack.ensureActivitiesVisibleLocked(hr, null, processName, 0); stack.ensureActivitiesVisibleLocked(hr, null, processName, 0, false); } } } Loading Loading @@ -1941,8 +1941,21 @@ public class ActivityStackSupervisor { } void ensureActivitiesVisibleLocked(ActivityRecord starting, int configChanges) { // First the front stacks. In case any are not fullscreen and are in front of home. boolean showHomeBehindStack = false; for (int stackNdx = mStacks.size() - 1; stackNdx >= 0; --stackNdx) { mStacks.get(stackNdx).ensureActivitiesVisibleLocked(starting, configChanges); final ActivityStack stack = mStacks.get(stackNdx); if (isFrontStack(stack)) { showHomeBehindStack = stack.ensureActivitiesVisibleLocked(starting, configChanges); } } // Now do back stacks. for (int stackNdx = mStacks.size() - 1; stackNdx >= 0; --stackNdx) { final ActivityStack stack = mStacks.get(stackNdx); if (!isFrontStack(stack)) { stack.ensureActivitiesVisibleLocked(starting, configChanges, showHomeBehindStack); } } } Loading