summaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/setupwizard/setup
diff options
context:
space:
mode:
authord34d <clark@cyngn.com>2016-01-25 11:19:15 -0800
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-01-28 08:04:18 -0800
commit06aa3eb165a5fd24472adb80c89add8632fa6b31 (patch)
treed103a38a35f4a12f887bf28efaec43e5e158fabd /src/com/cyanogenmod/setupwizard/setup
parent578df09d02a967e9fbf39eb51ef510445872a099 (diff)
downloadpackages_apps_SetupWizard-06aa3eb165a5fd24472adb80c89add8632fa6b31.zip
packages_apps_SetupWizard-06aa3eb165a5fd24472adb80c89add8632fa6b31.tar.gz
packages_apps_SetupWizard-06aa3eb165a5fd24472adb80c89add8632fa6b31.tar.bz2
Themes: Re-enable applying theme in OOBE
Change-Id: I0b027bff18c3b33fc0a925ee756766ed31740b35 TICKET: OPO-361
Diffstat (limited to 'src/com/cyanogenmod/setupwizard/setup')
-rw-r--r--src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
index 6184055..de0b284 100644
--- a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
+++ b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
@@ -24,14 +24,13 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
-/*import android.content.pm.ThemeUtils;
+import android.content.pm.ThemeUtils;
import android.content.res.ThemeConfig;
-import android.content.res.ThemeManager;*/
+import android.content.res.ThemeManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.RemoteException;
import android.preference.PreferenceManager;
-import android.provider.Settings;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.SpannableStringBuilder;
@@ -178,9 +177,10 @@ public class CyanogenSettingsPage extends SetupPage {
}
private void handleDefaultThemeSetup() {
- /*Bundle privacyData = getData();
- if (!ThemeUtils.getDefaultThemePackageName(mContext).equals(ThemeConfig.SYSTEM_DEFAULT) &&
- privacyData != null && privacyData.getBoolean(KEY_APPLY_DEFAULT_THEME)) {
+ Bundle privacyData = getData();
+ if (!SetupWizardUtils.getDefaultThemePackageName(mContext).equals(
+ ThemeConfig.SYSTEM_DEFAULT) && privacyData != null &&
+ privacyData.getBoolean(KEY_APPLY_DEFAULT_THEME)) {
SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
SetupStats.Action.APPLY_CUSTOM_THEME,
SetupStats.Label.CHECKED,
@@ -189,9 +189,9 @@ public class CyanogenSettingsPage extends SetupPage {
final ThemeManager tm = (ThemeManager) mContext.getSystemService(Context.THEME_SERVICE);
tm.applyDefaultTheme();
- } else { */
+ } else {
getCallbacks().finishSetup();
- //}
+ }
}
private static boolean hideKeyDisabler(Context ctx) {
@@ -221,9 +221,10 @@ public class CyanogenSettingsPage extends SetupPage {
SetupWizardUtils.isSimMissing(context));
}
- /*private static boolean hideThemeSwitch(Context context) {
- return ThemeUtils.getDefaultThemePackageName(context).equals(ThemeConfig.SYSTEM_DEFAULT);
- }*/
+ private static boolean hideThemeSwitch(Context context) {
+ return SetupWizardUtils.getDefaultThemePackageName(context)
+ .equals(ThemeConfig.SYSTEM_DEFAULT);
+ }
public static class CyanogenSettingsFragment extends SetupPageFragment {
@@ -333,7 +334,7 @@ public class CyanogenSettingsPage extends SetupPage {
mMetrics = (CheckBox) mRootView.findViewById(R.id.enable_metrics_checkbox);
mDefaultThemeRow = mRootView.findViewById(R.id.theme);
- mHideThemeRow = true; // hideThemeSwitch(getActivity());
+ mHideThemeRow = hideThemeSwitch(getActivity());
if (mHideThemeRow) {
mDefaultThemeRow.setVisibility(View.GONE);
} else {