Merge "Read setup wizard theme from system properties" into oc-dr1-dev

am: 1fe5766e30

Change-Id: I0e8335e937342bbb1639c24cb44b25639e005b32
This commit is contained in:
Maurice Lam
2017-06-20 20:07:30 +00:00
committed by android-build-merger
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: