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
This commit is contained in:
Matthew Ng
2017-03-22 14:23:25 -07:00
parent 1284be68e8
commit 0e2056057b

View File

@@ -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;