diff options
Diffstat (limited to 'packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java')
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java index 3b91a38..153a5ea 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java @@ -45,7 +45,6 @@ public class SettingsHelper { private boolean mSilent; private boolean mVibrate; - private boolean mHasAutoBrightness; public SettingsHelper(Context context) { mContext = context; @@ -54,9 +53,6 @@ public class SettingsHelper { mContentService = ContentResolver.getContentService(); mPowerManager = IPowerManager.Stub.asInterface( ServiceManager.getService("power")); - - mHasAutoBrightness = context.getResources().getBoolean( - com.android.internal.R.bool.config_automatic_brightness_available); } /** @@ -71,18 +67,6 @@ public class SettingsHelper { public boolean restoreValue(String name, String value) { if (Settings.System.SCREEN_BRIGHTNESS.equals(name)) { setBrightness(Integer.parseInt(value)); - } else if (Settings.System.SCREEN_BRIGHTNESS_MODE.equals(name)) { - if (mHasAutoBrightness) { - // When setting auto-brightness, must reset the brightness afterwards - try { - int curBrightness = Settings.System.getInt(mContext.getContentResolver(), - Settings.System.SCREEN_BRIGHTNESS); - setAutoBrightness(Integer.parseInt(value) != 0); - setBrightness(curBrightness); - } catch (Settings.SettingNotFoundException e) { - // no brightness setting at all? weird. skip this then. - } - } } else if (Settings.System.SOUND_EFFECTS_ENABLED.equals(name)) { setSoundEffects(Integer.parseInt(value) == 1); } else if (Settings.Secure.LOCATION_PROVIDERS_ALLOWED.equals(name)) { @@ -92,16 +76,6 @@ public class SettingsHelper { return true; } - private void setAutoBrightness(boolean value) { - if (mPowerManager != null) { - try { - mPowerManager.setAutoBrightness(value); - } catch (RemoteException e) { - // unable to reach the power manager; skip - } - } - } - private void setGpsLocation(String value) { final String GPS = LocationManager.GPS_PROVIDER; boolean enabled = |