summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hongwei Wang <hwwang@google.com> 2020-05-08 00:24:02 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-05-08 00:24:02 +0000
commit0a79590d2b8b0e7cc597a46005e96f84a6085f37 (patch)
tree1fb5e28d639ce608bd735efa443292be9a66636b
parentd59670170fd3fd761ac9d403596dfa93ef26275e (diff)
parent290ef34cb0d9e91e29b2e21cae69786997a3bd57 (diff)
Merge "Fixes testResumedWhenRecreatedFromInNonFocusedStack" into rvc-dev
-rw-r--r--services/core/java/com/android/server/wm/ActivityRecord.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java
index e08bfd55011f..ad806c2bcae7 100644
--- a/services/core/java/com/android/server/wm/ActivityRecord.java
+++ b/services/core/java/com/android/server/wm/ActivityRecord.java
@@ -1160,8 +1160,14 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
} else {
mLastReportedMultiWindowMode = inMultiWindowMode;
computeConfigurationAfterMultiWindowModeChange();
- ensureActivityConfiguration(0 /* globalChanges */, PRESERVE_WINDOWS,
- true /* ignoreVisibility */);
+ // If the activity is in stopping or stopped state, for instance, it's in the
+ // split screen task and not the top one, the last configuration it should keep
+ // is the one before multi-window mode change.
+ final ActivityState state = getState();
+ if (state != STOPPED && state != STOPPING) {
+ ensureActivityConfiguration(0 /* globalChanges */, PRESERVE_WINDOWS,
+ true /* ignoreVisibility */);
+ }
}
}
}