WizardManagerHelper { public static boolean isLightTheme(Intent intent, boolean def) { final String theme = intent.getStringExtra(EXTRA_THEME); return isLightTheme(theme, def); }  static Intent getNextIntent(Intent originalIntent, int resultCode); static Intent getNextIntent(Intent originalIntent, int resultCode, Intent data); static void copyWizardManagerExtras(Intent srcIntent, Intent dstIntent); static boolean isSetupWizardIntent(Intent intent); static boolean isUserSetupComplete(Context context); static boolean isDeviceProvisioned(Context context); static boolean isLightTheme(Intent intent, boolean def); static boolean isLightTheme(String theme, boolean def); static @StyleRes int getThemeRes(Intent intent, @StyleRes int defaultTheme); static @StyleRes int getThemeRes(String theme, @StyleRes int defaultTheme); static final String EXTRA_THEME; static final String EXTRA_USE_IMMERSIVE_MODE; static final String SETTINGS_GLOBAL_DEVICE_PROVISIONED; static final String SETTINGS_SECURE_USER_SETUP_COMPLETE; static final String THEME_HOLO; static final String THEME_HOLO_LIGHT; static final String THEME_MATERIAL; static final String THEME_MATERIAL_LIGHT; static final String THEME_GLIF; static final String THEME_GLIF_LIGHT; static final String THEME_GLIF_PIXEL; static final String THEME_GLIF_PIXEL_LIGHT; }
@Test public void testHoloIsNotLightTheme() { final Intent intent = new Intent(); intent.putExtra("theme", "holo"); assertFalse("Theme holo should not be light theme", WizardManagerHelper.isLightTheme(intent, true)); }
@Test public void testHoloLightIsLightTheme() { final Intent intent = new Intent(); intent.putExtra("theme", "holo_light"); assertTrue("Theme holo_light should be light theme", WizardManagerHelper.isLightTheme(intent, false)); }
@Test public void testMaterialIsNotLightTheme() { final Intent intent = new Intent(); intent.putExtra("theme", "material"); assertFalse("Theme material should not be light theme", WizardManagerHelper.isLightTheme(intent, true)); }
@Test public void testMaterialLightIsLightTheme() { final Intent intent = new Intent(); intent.putExtra("theme", "material_light"); assertTrue("Theme material_light should be light theme", WizardManagerHelper.isLightTheme(intent, false)); }
@Test public void testGlifIsDarkTheme() { final Intent intent = new Intent(); intent.putExtra("theme", "glif"); assertFalse("Theme glif should be dark theme", WizardManagerHelper.isLightTheme(intent, false)); assertFalse("Theme glif should be dark theme", WizardManagerHelper.isLightTheme(intent, true)); }
@Test public void testGlifLightIsLightTheme() { final Intent intent = new Intent(); intent.putExtra("theme", "glif_light"); assertTrue("Theme glif_light should be light theme", WizardManagerHelper.isLightTheme(intent, false)); assertTrue("Theme glif_light should be light theme", WizardManagerHelper.isLightTheme(intent, true)); }
@Test public void testGlifPixelIsDarkTheme() { final Intent intent = new Intent(); intent.putExtra("theme", "glif_pixel"); assertFalse("Theme glif_pixel should be dark theme", WizardManagerHelper.isLightTheme(intent, false)); assertFalse("Theme glif_pixel should be dark theme", WizardManagerHelper.isLightTheme(intent, true)); }
@Test public void testGlifPixelLightIsLightTheme() { final Intent intent = new Intent(); intent.putExtra("theme", "glif_pixel_light"); assertTrue("Theme glif_pixel_light should be light theme", WizardManagerHelper.isLightTheme(intent, false)); assertTrue("Theme glif_pixel_light should be light theme", WizardManagerHelper.isLightTheme(intent, true)); }
@Test public void testIsLightThemeDefault() { final Intent intent = new Intent(); intent.putExtra("theme", "abracadabra"); assertTrue("isLightTheme should return default value true", WizardManagerHelper.isLightTheme(intent, true)); assertFalse("isLightTheme should return default value false", WizardManagerHelper.isLightTheme(intent, false)); }
@Test public void testIsLightThemeUnspecified() { final Intent intent = new Intent(); assertTrue("isLightTheme should return default value true", WizardManagerHelper.isLightTheme(intent, true)); assertFalse("isLightTheme should return default value false", WizardManagerHelper.isLightTheme(intent, false)); }
@Test public void testIsLightThemeString() { assertTrue("isLightTheme should return true for material_light", WizardManagerHelper.isLightTheme("material_light", false)); assertFalse("isLightTheme should return false for material", WizardManagerHelper.isLightTheme("material", false)); assertTrue("isLightTheme should return true for holo_light", WizardManagerHelper.isLightTheme("holo_light", false)); assertFalse("isLightTheme should return false for holo", WizardManagerHelper.isLightTheme("holo", false)); assertTrue("isLightTheme should return default value true", WizardManagerHelper.isLightTheme("abracadabra", true)); assertFalse("isLightTheme should return default value false", WizardManagerHelper.isLightTheme("abracadabra", false)); }