Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c276931 authored by Kazuki Takise's avatar Kazuki Takise Committed by Android (Google) Code Review
Browse files

Merge "Change some initializations in am tests for ARC"

parents 8c8a9a1e c2e17bf7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -265,7 +265,8 @@ public class ActivityTestsBase {
        private ComponentName mComponent;
        private String mPackage;
        private int mFlags = 0;
        private int mTaskId = 0;
        // Task id 0 is reserved in ARC for the home app.
        private int mTaskId = 1;
        private int mUserId = 0;
        private IVoiceInteractionSession mVoiceSession;
        private boolean mCreateStack = true;
+5 −1
Original line number Diff line number Diff line
@@ -44,7 +44,11 @@ public class TaskPersisterTest extends AndroidTestCase {
        super.setUp();
        mUserManager = UserManager.get(getContext());
        mTaskPersister = new TaskPersister(getContext().getFilesDir());
        testUserId = createUser(TEST_USER_NAME, 0);
        // 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.
        testUserId = createUser(TEST_USER_NAME, UserInfo.FLAG_GUEST);
    }

    @Override
+3 −3
Original line number Diff line number Diff line
@@ -156,9 +156,9 @@ public class TaskRecordTests extends ActivityTestsBase {

    private TaskRecord createTaskRecord(int taskId) {
        return new TaskRecord(mService.mActivityTaskManager, taskId, new Intent(), null, null, null,
                null, null, false,
                false, false, 0, 10050, null, new ArrayList<>(), 0, false, null, 0, 0, 0, 0, 0,
                null, 0, false, false, false, 0, 0);
                ActivityBuilder.getDefaultComponent(), null, false, false, false, 0, 10050, null,
                new ArrayList<>(), 0, false, null, 0, 0, 0, 0, 0, null, 0, false, false, false, 0, 0
        );
    }

    private static class TestTaskRecordFactory extends TaskRecordFactory {