Loading services/core/java/com/android/server/am/ActivityManagerDebugConfig.java +1 −1 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ class ActivityManagerDebugConfig { static final boolean DEBUG_NETWORK = DEBUG_ALL || false; static final boolean DEBUG_OOM_ADJ = DEBUG_ALL || false; static final boolean DEBUG_OOM_ADJ_REASON = DEBUG_ALL || false; static final boolean DEBUG_PAUSE = DEBUG_ALL || true; static final boolean DEBUG_PAUSE = DEBUG_ALL || false; static final boolean DEBUG_POWER = DEBUG_ALL || false; static final boolean DEBUG_POWER_QUICK = DEBUG_POWER || false; static final boolean DEBUG_PROCESS_OBSERVERS = DEBUG_ALL || false; Loading services/core/java/com/android/server/am/ActivityRecord.java +0 −14 Original line number Diff line number Diff line Loading @@ -1625,20 +1625,6 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo // The activity may be waiting for stop, but that is no longer appropriate for it. mStackSupervisor.mStoppingActivities.remove(this); mStackSupervisor.mGoingToSleepActivities.remove(this); // If the activity is stopped or stopping, cycle to the paused state. if (state == STOPPED || state == STOPPING) { // Capture reason before state change final String reason = getLifecycleDescription("makeVisibleIfNeeded"); // An activity must be in the {@link PAUSING} state for the system to validate // the move to {@link PAUSED}. state = PAUSING; service.mLifecycleManager.scheduleTransaction(app.thread, appToken, PauseActivityItem.obtain(finishing, false /* userLeaving */, configChangeFlags, false /* dontReport */) .setDescription(reason)); } } catch (Exception e) { // Just skip on any failure; we'll make it visible when it next restarts. Slog.w(TAG, "Exception thrown making visibile: " + intent.getComponent(), e); Loading services/core/java/com/android/server/am/ActivityStack.java +5 −0 Original line number Diff line number Diff line Loading @@ -1419,6 +1419,11 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai return false; } if (prev == resuming) { Slog.wtf(TAG, "Trying to pause activity that is in process of being resumed"); return false; } if (DEBUG_STATES) Slog.v(TAG_STATES, "Moving to PAUSING: " + prev); else if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Start pausing: " + prev); mResumedActivity = null; Loading services/core/java/com/android/server/am/ActivityStackSupervisor.java +5 −1 Original line number Diff line number Diff line Loading @@ -3341,7 +3341,11 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D stack.goToSleepIfPossible(false /* shuttingDown */); } else { stack.awakeFromSleepingLocked(); if (isFocusedStack(stack)) { if (isFocusedStack(stack) && !mKeyguardController.isKeyguardActive(display.mDisplayId)) { // If there is no keyguard on this display - resume immediately. Otherwise // we'll wait for keyguard visibility callback and resume while ensuring // activities visibility resumeFocusedStackTopActivityLocked(); } } Loading services/core/java/com/android/server/am/KeyguardController.java +13 −2 Original line number Diff line number Diff line Loading @@ -86,8 +86,16 @@ class KeyguardController { * display, false otherwise */ boolean isKeyguardShowing(int displayId) { return mKeyguardShowing && !mKeyguardGoingAway && (displayId == DEFAULT_DISPLAY ? !mOccluded : displayId == mSecondaryDisplayShowing); return isKeyguardActive(displayId) && !mKeyguardGoingAway; } /** * @return true if Keyguard is showing and not occluded. We ignore whether it is going away or * not here. */ boolean isKeyguardActive(int displayId) { return mKeyguardShowing && (displayId == DEFAULT_DISPLAY ? !mOccluded : displayId == mSecondaryDisplayShowing); } /** Loading @@ -114,6 +122,9 @@ class KeyguardController { mDismissalRequested = false; } } if (!showing) { mStackSupervisor.resumeFocusedStackTopActivityLocked(); } mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS); updateKeyguardSleepToken(); } Loading Loading
services/core/java/com/android/server/am/ActivityManagerDebugConfig.java +1 −1 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ class ActivityManagerDebugConfig { static final boolean DEBUG_NETWORK = DEBUG_ALL || false; static final boolean DEBUG_OOM_ADJ = DEBUG_ALL || false; static final boolean DEBUG_OOM_ADJ_REASON = DEBUG_ALL || false; static final boolean DEBUG_PAUSE = DEBUG_ALL || true; static final boolean DEBUG_PAUSE = DEBUG_ALL || false; static final boolean DEBUG_POWER = DEBUG_ALL || false; static final boolean DEBUG_POWER_QUICK = DEBUG_POWER || false; static final boolean DEBUG_PROCESS_OBSERVERS = DEBUG_ALL || false; Loading
services/core/java/com/android/server/am/ActivityRecord.java +0 −14 Original line number Diff line number Diff line Loading @@ -1625,20 +1625,6 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo // The activity may be waiting for stop, but that is no longer appropriate for it. mStackSupervisor.mStoppingActivities.remove(this); mStackSupervisor.mGoingToSleepActivities.remove(this); // If the activity is stopped or stopping, cycle to the paused state. if (state == STOPPED || state == STOPPING) { // Capture reason before state change final String reason = getLifecycleDescription("makeVisibleIfNeeded"); // An activity must be in the {@link PAUSING} state for the system to validate // the move to {@link PAUSED}. state = PAUSING; service.mLifecycleManager.scheduleTransaction(app.thread, appToken, PauseActivityItem.obtain(finishing, false /* userLeaving */, configChangeFlags, false /* dontReport */) .setDescription(reason)); } } catch (Exception e) { // Just skip on any failure; we'll make it visible when it next restarts. Slog.w(TAG, "Exception thrown making visibile: " + intent.getComponent(), e); Loading
services/core/java/com/android/server/am/ActivityStack.java +5 −0 Original line number Diff line number Diff line Loading @@ -1419,6 +1419,11 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai return false; } if (prev == resuming) { Slog.wtf(TAG, "Trying to pause activity that is in process of being resumed"); return false; } if (DEBUG_STATES) Slog.v(TAG_STATES, "Moving to PAUSING: " + prev); else if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Start pausing: " + prev); mResumedActivity = null; Loading
services/core/java/com/android/server/am/ActivityStackSupervisor.java +5 −1 Original line number Diff line number Diff line Loading @@ -3341,7 +3341,11 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D stack.goToSleepIfPossible(false /* shuttingDown */); } else { stack.awakeFromSleepingLocked(); if (isFocusedStack(stack)) { if (isFocusedStack(stack) && !mKeyguardController.isKeyguardActive(display.mDisplayId)) { // If there is no keyguard on this display - resume immediately. Otherwise // we'll wait for keyguard visibility callback and resume while ensuring // activities visibility resumeFocusedStackTopActivityLocked(); } } Loading
services/core/java/com/android/server/am/KeyguardController.java +13 −2 Original line number Diff line number Diff line Loading @@ -86,8 +86,16 @@ class KeyguardController { * display, false otherwise */ boolean isKeyguardShowing(int displayId) { return mKeyguardShowing && !mKeyguardGoingAway && (displayId == DEFAULT_DISPLAY ? !mOccluded : displayId == mSecondaryDisplayShowing); return isKeyguardActive(displayId) && !mKeyguardGoingAway; } /** * @return true if Keyguard is showing and not occluded. We ignore whether it is going away or * not here. */ boolean isKeyguardActive(int displayId) { return mKeyguardShowing && (displayId == DEFAULT_DISPLAY ? !mOccluded : displayId == mSecondaryDisplayShowing); } /** Loading @@ -114,6 +122,9 @@ class KeyguardController { mDismissalRequested = false; } } if (!showing) { mStackSupervisor.resumeFocusedStackTopActivityLocked(); } mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS); updateKeyguardSleepToken(); } Loading