Fix Settings test that uses OverlayInfo

Now that targetOverlayableName has been added to OverlayInfo, the tests
that construct the info objects must be fixed.

Bug: 128830059
Test: atest SettingsRoboTestStub
Change-Id: I2cee25e417ec643f758ebe40551cc97b1f0828ac
This commit is contained in:
Ryan Mitchell
2019-03-22 08:10:20 -07:00
parent 252ae8bed0
commit 5f6924761e
3 changed files with 13 additions and 11 deletions

View File

@@ -69,9 +69,9 @@ public class ThemePreferenceControllerTest {
@Test
public void testUpdateState() throws Exception {
OverlayInfo info1 = new OverlayInfo("com.android.Theme1", "android",
OverlayInfo info1 = new OverlayInfo("com.android.Theme1", "android", "",
OverlayInfo.CATEGORY_THEME, "", OverlayInfo.STATE_ENABLED, 0, 0, true);
OverlayInfo info2 = new OverlayInfo("com.android.Theme2", "android",
OverlayInfo info2 = new OverlayInfo("com.android.Theme2", "android", "",
OverlayInfo.CATEGORY_THEME, "", 0, 0, 0, true);
when(mMockPackageManager.getApplicationInfo(any(), anyInt())).thenAnswer(inv -> {
ApplicationInfo info = mock(ApplicationInfo.class);
@@ -105,9 +105,9 @@ public class ThemePreferenceControllerTest {
@Test
public void testUpdateState_withStaticOverlay() throws Exception {
OverlayInfo info1 = new OverlayInfo("com.android.Theme1", "android",
OverlayInfo info1 = new OverlayInfo("com.android.Theme1", "android", "",
OverlayInfo.CATEGORY_THEME, "", OverlayInfo.STATE_ENABLED, 0, 0, true);
OverlayInfo info2 = new OverlayInfo("com.android.Theme2", "android",
OverlayInfo info2 = new OverlayInfo("com.android.Theme2", "android", "",
OverlayInfo.CATEGORY_THEME, "", OverlayInfo.STATE_ENABLED, 0, 0, true);
when(mMockPackageManager.getApplicationInfo(any(), anyInt())).thenAnswer(inv -> {
ApplicationInfo info = mock(ApplicationInfo.class);