Move visibleBehind activities into stop state when sleeping/powerDown
Bug: 19523564 Change-Id: I95273a659edc91c5636d6a0d9cd7fe5683ec4f3e
This commit is contained in:
@@ -747,6 +747,14 @@ final class ActivityStack {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (hasVisibleBehindActivity()) {
|
||||
// Stop visible behind activity before going to sleep.
|
||||
final ActivityRecord r = mActivityContainer.mActivityDisplay.mVisibleBehindActivity;
|
||||
mStackSupervisor.mStoppingActivities.add(r);
|
||||
if (DEBUG_STATES) Slog.v(TAG, "Sleep still waiting to stop visible behind " + r);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1006,7 +1014,7 @@ final class ActivityStack {
|
||||
// the current instance before starting the new one.
|
||||
if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Destroying after pause: " + prev);
|
||||
destroyActivityLocked(prev, true, "pause-config");
|
||||
} else if (!hasVisibleBehindActivity()) {
|
||||
} else if (!hasVisibleBehindActivity() || mService.isSleepingOrShuttingDown()) {
|
||||
// If we were visible then resumeTopActivities will release resources before
|
||||
// stopping.
|
||||
mStackSupervisor.mStoppingActivities.add(prev);
|
||||
|
||||
Reference in New Issue
Block a user