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

Commit 203b7b17 authored by Todd Kennedy's avatar Todd Kennedy Committed by Android (Google) Code Review
Browse files

Merge "OMS: rebase settings when overlays update" into pi-dev

parents 4017944d 94fecb94
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -69,9 +69,9 @@ public class ThemePreferenceControllerTest {
    @Test
    public void testUpdateState() throws Exception {
        OverlayInfo info1 = new OverlayInfo("com.android.Theme1", "android",
                "", "", OverlayInfo.STATE_ENABLED, 0);
                "", "", OverlayInfo.STATE_ENABLED, 0, 0, true);
        OverlayInfo info2 = new OverlayInfo("com.android.Theme2", "android",
                "", "", 0, 0);
                "", "", 0, 0, 0, true);
        when(mMockPackageManager.getApplicationInfo(any(), anyInt())).thenAnswer(inv -> {
            ApplicationInfo info = mock(ApplicationInfo.class);
            if ("com.android.Theme1".equals(inv.getArguments()[0])) {
@@ -105,9 +105,9 @@ public class ThemePreferenceControllerTest {
    @Test
    public void testUpdateState_withStaticOverlay() throws Exception {
        OverlayInfo info1 = new OverlayInfo("com.android.Theme1", "android",
                "", "", OverlayInfo.STATE_ENABLED, 0);
                "", "", OverlayInfo.STATE_ENABLED, 0, 0, true);
        OverlayInfo info2 = new OverlayInfo("com.android.Theme2", "android",
                "", "", OverlayInfo.STATE_ENABLED, 0);
                "", "", OverlayInfo.STATE_ENABLED, 0, 0, true);
        when(mMockPackageManager.getApplicationInfo(any(), anyInt())).thenAnswer(inv -> {
            ApplicationInfo info = mock(ApplicationInfo.class);
            if ("com.android.Theme1".equals(inv.getArguments()[0])) {
@@ -145,7 +145,7 @@ public class ThemePreferenceControllerTest {
        when(mMockPackageManager.getPackageInfo(anyString(), anyInt())).thenReturn(
                new PackageInfo());
        when(mMockOverlayManager.getOverlayInfosForTarget(any(), anyInt()))
                .thenReturn(list(new OverlayInfo("", "", "", "", 0, 0)));
                .thenReturn(list(new OverlayInfo("", "", "", "", 0, 0, 0, false)));
        assertThat(mPreferenceController.isAvailable()).isFalse();
    }

@@ -154,8 +154,8 @@ public class ThemePreferenceControllerTest {
        when(mMockPackageManager.getPackageInfo(anyString(), anyInt())).thenReturn(
                 new PackageInfo());
        when(mMockOverlayManager.getOverlayInfosForTarget(any(), anyInt()))
                .thenReturn(list(new OverlayInfo("", "", "", "", 0, 0),
                        new OverlayInfo("", "", "", "", 0, 0)));
                .thenReturn(list(new OverlayInfo("", "", "", "", 0, 0, 0, true),
                        new OverlayInfo("", "", "", "", 0, 0, 0, true)));
        assertThat(mPreferenceController.isAvailable()).isTrue();
    }