summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Matthew Ng <ngmatthew@google.com> 2017-03-22 14:23:25 -0700
committer Matthew Ng <ngmatthew@google.com> 2017-03-31 01:29:19 +0000
commit0e2056057bc53d75fb48a30e0ec996e27f68f7cc (patch)
treece263af514bbc2efed99649be840611f80a581ae
parent1284be68e806917a1ca75c54cd61960c0b1bb64a (diff)
Fixes starting app in docked stack for cts tests
Running command "adb shell am start -n <package/activity name> --stack 3" will allow the app to be docked at the top in split screen and will not minimize and be positioned incorrectly. Passing the last stack will pass the stack that was launched from, in this case it is home stack. Then it will launch recents after app is launched. Test: adb shell am start -n <package/activity name> --stack 3 and cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsServicesHostTestCases android.server.cts.ActivityManagerAppConfigurationTests Fixes: 36233172 Change-Id: Ibe171be9160f9070395ac20f5369dc495f235f20
-rw-r--r--services/core/java/com/android/server/am/ActivityStarter.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/am/ActivityStarter.java b/services/core/java/com/android/server/am/ActivityStarter.java
index 9258539f4268..e9b3e8d9a196 100644
--- a/services/core/java/com/android/server/am/ActivityStarter.java
+++ b/services/core/java/com/android/server/am/ActivityStarter.java
@@ -966,7 +966,7 @@ class ActivityStarter {
mService.mWindowManager.continueSurfaceLayout();
}
- postStartActivityProcessing(r, result, mSupervisor.mFocusedStack.mStackId, mSourceRecord,
+ postStartActivityProcessing(r, result, mSupervisor.getLastStack().mStackId, mSourceRecord,
mTargetStack);
return result;