Change some initializations in am tests for ARC
This CL upstreams the following changes in ARC. These changes do not affect the behavior on phones, but should be upstreamed to avoid future merge conflicts. Changes to be upstreamed: - Fix com.android.server.am.TaskRecordTests(ag/4488735) This Cl initializes task.realActivity, which is used in ActivityManagerInjectorArc#onTaskCreated(). - Create user as guest in TaskPersisterTest(ag/4477502) In ARC, the maximum number of supported users is one, which is different from the ones of most phones (more than 4). This prevents TaskPersisterTest from creating another user for test. However, since guest users can be added as much as possible, we create guest user in the test. - Change taskId in ActivityTestBase from 0 to 1(ag/4474682) In ActivityTestBase, taskId is set as 0 by default. However, since 0 is reserved in ARC, currently assertion failure occurs in wayland_service.cpp. This CL shifts the id to 1 and makes all the tests in ActivityStackTests pass. Bug: 72843139 Test: atest TaskPersisterTest Test: atest TaskRecordTests Test: atest ActivityStackTests Change-Id: I6ba49547ae3b34a752e401150caeb1d786f199cf
Loading
Please register or sign in to comment