Merge "Don't relaunch activity in TaskRecord.size if caller deferResume" into oc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
25cedc232d
@@ -2328,6 +2328,9 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo
|
||||
return true;
|
||||
}
|
||||
|
||||
// TODO: We should add ActivityRecord.shouldBeVisible() that checks if the activity should
|
||||
// be visible based on the stack, task, and lockscreen state and use that here instead. The
|
||||
// method should be based on the logic in ActivityStack.ensureActivitiesVisibleLocked().
|
||||
// Skip updating configuration for activity is a stack that shouldn't be visible.
|
||||
if (stack.shouldBeVisible(null /* starting */) == STACK_INVISIBLE) {
|
||||
if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG_CONFIGURATION,
|
||||
|
||||
@@ -550,15 +550,11 @@ final class TaskRecord extends ConfigurationContainer implements TaskWindowConta
|
||||
boolean kept = true;
|
||||
if (updatedConfig) {
|
||||
final ActivityRecord r = topRunningActivityLocked();
|
||||
if (r != null) {
|
||||
if (r != null && !deferResume) {
|
||||
kept = r.ensureActivityConfigurationLocked(0 /* globalChanges */, preserveWindow);
|
||||
|
||||
if (!deferResume) {
|
||||
// All other activities must be made visible with their correct configuration.
|
||||
mService.mStackSupervisor.ensureActivitiesVisibleLocked(r, 0, !PRESERVE_WINDOWS);
|
||||
if (!kept) {
|
||||
mService.mStackSupervisor.resumeFocusedStackTopActivityLocked();
|
||||
}
|
||||
mService.mStackSupervisor.ensureActivitiesVisibleLocked(r, 0, !PRESERVE_WINDOWS);
|
||||
if (!kept) {
|
||||
mService.mStackSupervisor.resumeFocusedStackTopActivityLocked();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user