diff options
author | Adnan Begovic <adnan@cyngn.com> | 2015-10-14 12:44:53 -0700 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2015-10-15 15:18:58 -0700 |
commit | 307e587a3ae7b29849cc76b6a63ec1a0a699e064 (patch) | |
tree | 987f6ef535836f3270a18ad5688ee988ad5e9ad5 /src/com/cyanogenmod/setupwizard/setup | |
parent | f29f92dcac6ee1eb711c20f6eb40325e61278e8f (diff) | |
download | packages_apps_SetupWizard-307e587a3ae7b29849cc76b6a63ec1a0a699e064.zip packages_apps_SetupWizard-307e587a3ae7b29849cc76b6a63ec1a0a699e064.tar.gz packages_apps_SetupWizard-307e587a3ae7b29849cc76b6a63ec1a0a699e064.tar.bz2 |
SetupWizard: Temporary compile fixes.
Change-Id: Iffdbb3b38aef75f14dcb0957df8dda13f844159b
Diffstat (limited to 'src/com/cyanogenmod/setupwizard/setup')
4 files changed, 26 insertions, 29 deletions
diff --git a/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java b/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java index 3e51bdb..79e2469 100644 --- a/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java +++ b/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java @@ -87,9 +87,7 @@ public class CMSetupWizardData extends AbstractSetupData { showHideSimMissingPage(); showHideMobileDataPage(); } else if (intent.getAction() - .equals(ConnectivityManager.CONNECTIVITY_ACTION) || - intent.getAction() - .equals(ConnectivityManager.CONNECTIVITY_ACTION_IMMEDIATE)) { + .equals(ConnectivityManager.CONNECTIVITY_ACTION)) { showHideMobileDataPage(); showHideAccountPages(); } else if (intent.getAction() @@ -165,7 +163,6 @@ public class CMSetupWizardData extends AbstractSetupData { filter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED); filter.addAction(TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED); } - filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION_IMMEDIATE); filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); filter.addAction(Intent.ACTION_TIMEZONE_CHANGED); filter.addAction(Intent.ACTION_TIME_CHANGED); diff --git a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java index b117898..6184055 100644 --- a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java @@ -24,9 +24,9 @@ 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; @@ -104,20 +104,20 @@ public class CyanogenSettingsPage extends SetupPage { private static void writeDisableNavkeysOption(Context context, boolean enabled) { final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); - final int defaultBrightness = context.getResources().getInteger( - com.android.internal.R.integer.config_buttonBrightnessSettingDefault); + /*final int defaultBrightness = context.getResources().getInteger( + com.android.internal.R.integer.config_buttonBrightnessSettingDefault);*/ - Settings.Secure.putInt(context.getContentResolver(), + /*Settings.Secure.putInt(context.getContentResolver(), Settings.Secure.DEV_FORCE_SHOW_NAVBAR, enabled ? 1 : 0); final CMHardwareManager hardware = CMHardwareManager.getInstance(context); - hardware.set(CMHardwareManager.FEATURE_KEY_DISABLE, enabled); + hardware.set(CMHardwareManager.FEATURE_KEY_DISABLE, enabled);*/ /* Save/restore button timeouts to disable them in softkey mode */ SharedPreferences.Editor editor = prefs.edit(); if (enabled) { int currentBrightness = CMSettings.Secure.getInt(context.getContentResolver(), - CMSettings.Secure.BUTTON_BRIGHTNESS, defaultBrightness); + CMSettings.Secure.BUTTON_BRIGHTNESS, 100); if (!prefs.contains("pre_navbar_button_backlight")) { editor.putInt("pre_navbar_button_backlight", currentBrightness); } @@ -178,7 +178,7 @@ public class CyanogenSettingsPage extends SetupPage { } private void handleDefaultThemeSetup() { - Bundle privacyData = getData(); + /*Bundle privacyData = getData(); if (!ThemeUtils.getDefaultThemePackageName(mContext).equals(ThemeConfig.SYSTEM_DEFAULT) && privacyData != null && privacyData.getBoolean(KEY_APPLY_DEFAULT_THEME)) { SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED, @@ -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,9 @@ public class CyanogenSettingsPage extends SetupPage { SetupWizardUtils.isSimMissing(context)); } - private static boolean hideThemeSwitch(Context context) { + /*private static boolean hideThemeSwitch(Context context) { return ThemeUtils.getDefaultThemePackageName(context).equals(ThemeConfig.SYSTEM_DEFAULT); - } + }*/ public static class CyanogenSettingsFragment extends SetupPageFragment { @@ -333,7 +333,7 @@ public class CyanogenSettingsPage extends SetupPage { mMetrics = (CheckBox) mRootView.findViewById(R.id.enable_metrics_checkbox); mDefaultThemeRow = mRootView.findViewById(R.id.theme); - mHideThemeRow = hideThemeSwitch(getActivity()); + mHideThemeRow = true; // hideThemeSwitch(getActivity()); if (mHideThemeRow) { mDefaultThemeRow.setVisibility(View.GONE); } else { @@ -356,11 +356,11 @@ public class CyanogenSettingsPage extends SetupPage { mNavKeysRow.setOnClickListener(mNavKeysClickListener); mNavKeys = (CheckBox) mRootView.findViewById(R.id.nav_keys_checkbox); boolean needsNavBar = true; - try { + /*try { IWindowManager windowManager = WindowManagerGlobal.getWindowManagerService(); needsNavBar = windowManager.needsNavigationBar(); } catch (RemoteException e) { - } + }*/ mHideNavKeysRow = hideKeyDisabler(getActivity()); if (mHideNavKeysRow || needsNavBar) { mNavKeysRow.setVisibility(View.GONE); @@ -396,7 +396,7 @@ public class CyanogenSettingsPage extends SetupPage { @Override public void onResume() { super.onResume(); - updateDisableNavkeysOption(); + /*updateDisableNavkeysOption();*/ updateMetricsOption(); updateThemeOption(); updateSmsOption(); @@ -437,7 +437,7 @@ public class CyanogenSettingsPage extends SetupPage { } } - private void updateDisableNavkeysOption() { + /*private void updateDisableNavkeysOption() { if (!mHideNavKeysRow) { final Bundle myPageBundle = mPage.getData(); boolean enabled = Settings.Secure.getInt(getActivity().getContentResolver(), @@ -448,7 +448,7 @@ public class CyanogenSettingsPage extends SetupPage { mNavKeys.setChecked(checked); myPageBundle.putBoolean(KEY_ENABLE_NAV_KEYS, checked); } - } + }*/ private static boolean hideKillSwitch() { return !SetupWizardUtils.hasKillSwitch(); diff --git a/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java b/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java index 0f76582..890a4f6 100644 --- a/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java @@ -104,7 +104,7 @@ public class FingerprintSetupPage extends SetupPage { intent.putExtra(SetupWizardApp.EXTRA_USE_IMMERSIVE, true); intent.putExtra(SetupWizardApp.EXTRA_THEME, SetupWizardApp.EXTRA_MATERIAL_LIGHT); intent.putExtra(SetupWizardApp.EXTRA_AUTO_FINISH, false); - intent.putExtra(LockPatternUtils.LOCKSCREEN_FINGERPRINT_FALLBACK, true); + /*intent.putExtra(LockPatternUtils.LOCKSCREEN_FINGERPRINT_FALLBACK, true);*/ intent.putExtra(SetupWizardApp.EXTRA_TITLE, getString(R.string.settings_fingerprint_setup_title)); intent.putExtra(SetupWizardApp.EXTRA_DETAILS, diff --git a/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java b/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java index abc4b54..34a344c 100644 --- a/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java @@ -73,12 +73,12 @@ public class GmsAccountPage extends SetupPage { Settings.Secure.BACKUP_ENABLED, 0) == 1); } }; - Cursor settingsCursor = res.query(Settings.Secure.CONTENT_URI, null, - "(" + Settings.System.NAME + "=? OR " + Settings.System.NAME + "=?)", - new String[]{Settings.Secure.BACKUP_AUTO_RESTORE, Settings.Secure.BACKUP_ENABLED}, - null); - mContentQueryMap = new ContentQueryMap(settingsCursor, Settings.System.NAME, true, null); - mContentQueryMap.addObserver(mSettingsObserver); + //Cursor settingsCursor = res.query(Settings.Secure.CONTENT_URI, null, + // "(" + Settings.System.NAME + "=? OR " + Settings.System.NAME + "=?)", + // new String[]{Settings.Secure.BACKUP_AUTO_RESTORE, Settings.Secure.BACKUP_ENABLED}, + // null); + //mContentQueryMap = new ContentQueryMap(settingsCursor, Settings.System.NAME, true, null); + //mContentQueryMap.addObserver(mSettingsObserver); } @Override |