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

Commit 406e9c7f authored by Vadim Caen's avatar Vadim Caen Committed by Automerger Merge Worker
Browse files

Merge "Fix broken hibernation test" into sc-dev am: 8c2273ef

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14239185

Change-Id: I30b9ac5e5946b5375e6829f7b25e0e8dfc8317ad
parents d29cc440 8c2273ef
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ public final class AppHibernationService extends SystemService {
    private final boolean mOatArtifactDeletionEnabled;

    @VisibleForTesting
    static boolean sIsServiceEnabled;
    public static boolean sIsServiceEnabled;

    /**
     * Initializes the system service.
+2 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.testing.AndroidTestingRunner
import android.testing.TestableLooper
import android.testing.TestableLooper.RunWithLooper
import com.android.server.apphibernation.AppHibernationManagerInternal
import com.android.server.apphibernation.AppHibernationService
import com.android.server.extendedtestutils.wheneverStatic
import com.android.server.testutils.whenever
import org.junit.Assert.assertFalse
@@ -61,6 +62,7 @@ class PackageManagerServiceHibernationTests {
        MockitoAnnotations.initMocks(this)
        wheneverStatic { DeviceConfig.getBoolean(
            NAMESPACE_APP_HIBERNATION, KEY_APP_HIBERNATION_ENABLED, false) }.thenReturn(true)
        AppHibernationService.sIsServiceEnabled = true
        rule.system().stageNominalSystemState()
        whenever(rule.mocks().injector.getLocalService(AppHibernationManagerInternal::class.java))
            .thenReturn(appHibernationManager)