Read setup wizard theme from system properties

Test: cd tests/robotests && mma
Bug: 62060286
Change-Id: I285638736efa63314fa3e055f72ac021bce40bfe
This commit is contained in:
Maurice Lam
2017-05-24 21:14:49 -07:00
parent 6dfafa5d95
commit 7ffdb046a6
3 changed files with 126 additions and 3 deletions

View File

@@ -17,13 +17,21 @@
package com.android.settings;
import android.content.Intent;
import android.os.SystemProperties;
import android.support.annotation.VisibleForTesting;
import com.android.setupwizardlib.util.WizardManagerHelper;
public class SetupWizardUtils {
@VisibleForTesting
static final String SYSTEM_PROP_SETUPWIZARD_THEME = "setupwizard.theme";
public static int getTheme(Intent intent) {
String theme = intent.getStringExtra(WizardManagerHelper.EXTRA_THEME);
if (theme == null) {
theme = SystemProperties.get(SYSTEM_PROP_SETUPWIZARD_THEME);
}
if (theme != null) {
switch (theme) {
case WizardManagerHelper.THEME_GLIF_V2_LIGHT: