From 0e2056057bc53d75fb48a30e0ec996e27f68f7cc Mon Sep 17 00:00:00 2001 From: Matthew Ng Date: Wed, 22 Mar 2017 14:23:25 -0700 Subject: [PATCH] Fixes starting app in docked stack for cts tests Running command "adb shell am start -n --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 --stack 3 and cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsServicesHostTestCases android.server.cts.ActivityManagerAppConfigurationTests Fixes: 36233172 Change-Id: Ibe171be9160f9070395ac20f5369dc495f235f20 --- services/core/java/com/android/server/am/ActivityStarter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/am/ActivityStarter.java b/services/core/java/com/android/server/am/ActivityStarter.java index 9258539f4268b..e9b3e8d9a1963 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;