diff options
| author | 2015-11-20 09:36:46 -0800 | |
|---|---|---|
| committer | 2015-11-20 10:13:13 -0800 | |
| commit | 3856bf7fb9ed3987cd08760d92ca3e19dc3b5f51 (patch) | |
| tree | 3f71419c07dd83c31e312eec712374047fe84214 | |
| parent | 3f72604be806c0173b5dca0225cadf6e7c872147 (diff) | |
Fixed unexpected configuration change causing activity relaunch
In commit ebcc875f we migrated the setting of the task override
configuration from WM to AM. However, the migration changed the
construction of the override configuration to take in the service
configuration as the starting value. This is incorrect since the
only values that should be set in the override configuration are
the ones that change due to resizing. We now seed the override
configuration with the EMPTY value to make it obvious that the
object should be constructed with the default values.
Also, fixed issue with WM telling activity manager to resize a stack
when the stack is already the size it wants.
Bug: 25776219
Change-Id: I882979aa87b49e7a5dc993bd9223fbd6e6cf6471
| -rw-r--r-- | services/core/java/com/android/server/am/TaskRecord.java | 2 | ||||
| -rw-r--r-- | services/core/java/com/android/server/wm/TaskStack.java | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/am/TaskRecord.java b/services/core/java/com/android/server/am/TaskRecord.java index 3fc6846b812f..02cf87ae82b1 100644 --- a/services/core/java/com/android/server/am/TaskRecord.java +++ b/services/core/java/com/android/server/am/TaskRecord.java @@ -1277,7 +1277,7 @@ final class TaskRecord { } final Configuration serviceConfig = mService.mConfiguration; - mOverrideConfig = new Configuration(serviceConfig); + mOverrideConfig = new Configuration(Configuration.EMPTY); // TODO(multidisplay): Update Dp to that of display stack is on. final float density = serviceConfig.densityDpi * DisplayMetrics.DENSITY_DEFAULT_SCALE; mOverrideConfig.screenWidthDp = diff --git a/services/core/java/com/android/server/wm/TaskStack.java b/services/core/java/com/android/server/wm/TaskStack.java index 8085f13ca7f9..04ab5440ea6e 100644 --- a/services/core/java/com/android/server/wm/TaskStack.java +++ b/services/core/java/com/android/server/wm/TaskStack.java @@ -515,10 +515,11 @@ public class TaskStack implements DimLayer.DimLayerUser { for (int i = 0; i < count; i++) { final TaskStack otherStack = mService.mStackIdToStack.valueAt(i); final int otherStackId = otherStack.mStackId; - if (StackId.isResizeableByDockedStack(otherStackId)) { + if (StackId.isResizeableByDockedStack(otherStackId) + && !otherStack.mBounds.equals(bounds)) { mService.mH.sendMessage( mService.mH.obtainMessage(RESIZE_STACK, otherStackId, - 1 /*allowResizeInDockedMode*/, bounds)); + 1 /*allowResizeInDockedMode*/, fullscreen ? null : bounds)); } } } |