am 2a857f00: Merge "Move visibleBehind activities into stop state when sleeping/powerDown" into mnc-dev
* commit '2a857f00110c448d702ffa4ee998dfd78688fa21': Move visibleBehind activities into stop state when sleeping/powerDown
This commit is contained in:
@@ -748,6 +748,14 @@ final class ActivityStack {
|
|||||||
return true;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1007,7 +1015,7 @@ final class ActivityStack {
|
|||||||
// the current instance before starting the new one.
|
// the current instance before starting the new one.
|
||||||
if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Destroying after pause: " + prev);
|
if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Destroying after pause: " + prev);
|
||||||
destroyActivityLocked(prev, true, "pause-config");
|
destroyActivityLocked(prev, true, "pause-config");
|
||||||
} else if (!hasVisibleBehindActivity()) {
|
} else if (!hasVisibleBehindActivity() || mService.isSleepingOrShuttingDown()) {
|
||||||
// If we were visible then resumeTopActivities will release resources before
|
// If we were visible then resumeTopActivities will release resources before
|
||||||
// stopping.
|
// stopping.
|
||||||
mStackSupervisor.mStoppingActivities.add(prev);
|
mStackSupervisor.mStoppingActivities.add(prev);
|
||||||
|
|||||||
Reference in New Issue
Block a user