Use root task ID instead of task ID
In Car UI portrait, task ID might not be the root task ID. The test in ActivityLifecycleTests#testTranslucentMovedIntoStack requires to move another activity to the root task in moveActivityToRootTaskOrOnTop. Get root task ID when getRootTaskIdByActivity instead of the task ID.
Bug: 315540963
Test: atest CtsWindowManagerDeviceActivity:ActivityLifecycleTests
Test: atest CtsWindowManagerDeviceOther:MinimalPostProcessingTests CtsWindowManagerDeviceActivity:ActivityLifecycleTopResumedStateTests#testTopPositionSwitchAcrossDisplaysOnTapSlowDifferentProcess CtsWindowManagerDeviceActivity:ActivityLifecycleTopResumedStateTests#testTopPositionSwitchAcrossDisplaysOnTap CtsWindowManagerDeviceActivity:StartActivityAsUserTests android.packageinstaller.uninstall.cts.UninstallPinnedTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d2a2298b5968b042fa372be02405861e05dfef61)
Merged-In: I6625502c82c63a8779a8c17ab9f92c412328af97
Change-Id: I6625502c82c63a8779a8c17ab9f92c412328af97
1 file changed