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

Commit 4d92eda6 authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Automerger Merge Worker
Browse files

Merge "Fix other tests be affected by mocked local services." into rvc-dev am:...

Merge "Fix other tests be affected by mocked local services." into rvc-dev am: d1979ef0 am: 46c3b395

Change-Id: I99fa5b97201f04bac1b80c50b96ea558e0b4d894
parents e80d4c2a 46c3b395
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ import com.android.server.LocalServices;
import com.android.server.am.ActivityManagerService;
import com.android.server.pm.PackageManagerService;

import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -161,6 +162,12 @@ public class ActivityStartInterceptorTest {
        mAInfo.packageName = mAInfo.applicationInfo.packageName = TEST_PACKAGE_NAME;
    }

    @After
    public void tearDown() {
        LocalServices.removeServiceForTest(ActivityManagerInternal.class);
        LocalServices.removeServiceForTest(DevicePolicyManagerInternal.class);
    }

    @Test
    public void testSuspendedByAdminPackage() {
        // GIVEN the package we're about to launch is currently suspended