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

Commit 561ec371 authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Fix the userId used in the test.

The userId needs to be the same as the one
that the test uids belong to.

Fixes: 383319008
Test: atest com.android.server.blob.BlobStoreManagerServiceTest
Flag: TEST_ONLY
Change-Id: I782748bb5efd4604bfcc97e7db6dbbe41011ce12
parent 77598312
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@ import android.content.Context;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.os.UserHandle;
import android.platform.test.annotations.Presubmit;
import android.util.LongSparseArray;

@@ -72,6 +71,7 @@ public class BlobStoreManagerServiceTest {
    private static final String TEST_PKG2 = "com.example2";
    private static final String TEST_PKG3 = "com.example3";

    private static final int TEST_USER_ID = 0;
    private static final int TEST_UID1 = 10001;
    private static final int TEST_UID2 = 10002;
    private static final int TEST_UID3 = 10003;
@@ -98,7 +98,7 @@ public class BlobStoreManagerServiceTest {
        mService = new BlobStoreManagerService(mContext, new TestInjector());
        mUserSessions = new LongSparseArray<>();

        mService.addUserSessionsForTest(mUserSessions, UserHandle.myUserId());
        mService.addUserSessionsForTest(mUserSessions, TEST_USER_ID);
    }

    @After
@@ -360,6 +360,7 @@ public class BlobStoreManagerServiceTest {
        return createBlobStoreSessionMock(ownerPackageName, ownerUid, sessionId, sessionFile,
                mock(BlobHandle.class));
    }

    private BlobStoreSession createBlobStoreSessionMock(String ownerPackageName, int ownerUid,
            long sessionId, File sessionFile, BlobHandle blobHandle) {
        final BlobStoreSession session = mock(BlobStoreSession.class);