summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2017-04-11 12:46:57 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2017-04-11 12:47:00 +0000
commit2d008a5fc11f607943235cacfaf523eb403b52f2 (patch)
treea0340069c2d2b9a8770f17b4d7246a1c240fa0be
parent62abe8f8027ccc5a98133b93582ad23ff0573d0c (diff)
parent9b7a8272d83cbcaa7dbb0dff80b013bc47f927db (diff)
Merge "Don't ensure config for activity that is about to be invisible" into oc-dev
-rw-r--r--services/core/java/com/android/server/am/ActivityRecord.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/am/ActivityRecord.java b/services/core/java/com/android/server/am/ActivityRecord.java
index 2b953adfde18..85a74b2197f3 100644
--- a/services/core/java/com/android/server/am/ActivityRecord.java
+++ b/services/core/java/com/android/server/am/ActivityRecord.java
@@ -97,6 +97,7 @@ import static com.android.server.am.ActivityStack.ActivityState.STOPPING;
import static com.android.server.am.ActivityStack.LAUNCH_TICK;
import static com.android.server.am.ActivityStack.LAUNCH_TICK_MSG;
import static com.android.server.am.ActivityStack.PAUSE_TIMEOUT_MSG;
+import static com.android.server.am.ActivityStack.STACK_INVISIBLE;
import static com.android.server.am.ActivityStack.STOP_TIMEOUT_MSG;
import static com.android.server.am.EventLogTags.AM_ACTIVITY_FULLY_DRAWN_TIME;
import static com.android.server.am.EventLogTags.AM_ACTIVITY_LAUNCH_TIME;
@@ -2269,6 +2270,20 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo
return true;
}
+ // Skip updating configuration for activity that are stopping or stopped.
+ if (state == STOPPING || state == STOPPED) {
+ if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG_CONFIGURATION,
+ "Skipping config check stopped or stopping: " + this);
+ return true;
+ }
+
+ // 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,
+ "Skipping config check invisible stack: " + this);
+ return true;
+ }
+
if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG_CONFIGURATION,
"Ensuring correct configuration: " + this);