diff options
-rw-r--r-- | core/java/android/provider/Settings.java | 32 | ||||
-rw-r--r-- | services/core/java/com/android/server/BatteryService.java | 35 |
2 files changed, 18 insertions, 49 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 5b4b51c..342cdaf7 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -3330,38 +3330,6 @@ public final class Settings { "notification_light_pulse_custom_values"; /** - * Whether the battery light should be enabled (if hardware supports it) - * The value is boolean (1 or 0). - * @hide - */ - public static final String BATTERY_LIGHT_ENABLED = "battery_light_enabled"; - - /** - * Whether the battery LED should repeatedly flash when the battery is low - * on charge. The value is boolean (1 or 0). - * @hide - */ - public static final String BATTERY_LIGHT_PULSE = "battery_light_pulse"; - - /** - * What color to use for the battery LED while charging - low - * @hide - */ - public static final String BATTERY_LIGHT_LOW_COLOR = "battery_light_low_color"; - - /** - * What color to use for the battery LED while charging - medium - * @hide - */ - public static final String BATTERY_LIGHT_MEDIUM_COLOR = "battery_light_medium_color"; - - /** - * What color to use for the battery LED while charging - full - * @hide - */ - public static final String BATTERY_LIGHT_FULL_COLOR = "battery_light_full_color"; - - /** * Sprint MWI Quirk: Show message wait indicator notifications * @hide */ diff --git a/services/core/java/com/android/server/BatteryService.java b/services/core/java/com/android/server/BatteryService.java index 94c2e75..2e9cc9c 100644 --- a/services/core/java/com/android/server/BatteryService.java +++ b/services/core/java/com/android/server/BatteryService.java @@ -49,6 +49,7 @@ import android.os.UserHandle; import android.provider.Settings; import android.util.EventLog; import android.util.Slog; +import cyanogenmod.providers.CMSettings; import java.io.File; import java.io.FileDescriptor; @@ -934,12 +935,12 @@ public final class BatteryService extends SystemService { ContentResolver resolver = mContext.getContentResolver(); // Battery light enabled - resolver.registerContentObserver(Settings.System.getUriFor( - Settings.System.BATTERY_LIGHT_ENABLED), false, this, UserHandle.USER_ALL); + resolver.registerContentObserver(CMSettings.System.getUriFor( + CMSettings.System.BATTERY_LIGHT_ENABLED), false, this, UserHandle.USER_ALL); // Low battery pulse - resolver.registerContentObserver(Settings.System.getUriFor( - Settings.System.BATTERY_LIGHT_PULSE), false, this, UserHandle.USER_ALL); + resolver.registerContentObserver(CMSettings.System.getUriFor( + CMSettings.System.BATTERY_LIGHT_PULSE), false, this, UserHandle.USER_ALL); // Notification LED brightness if (mAdjustableNotificationLedBrightness) { @@ -959,13 +960,13 @@ public final class BatteryService extends SystemService { if (mMultiColorLed) { // Register observer if we have a multi color led resolver.registerContentObserver( - Settings.System.getUriFor(Settings.System.BATTERY_LIGHT_LOW_COLOR), + CMSettings.System.getUriFor(CMSettings.System.BATTERY_LIGHT_LOW_COLOR), false, this, UserHandle.USER_ALL); resolver.registerContentObserver( - Settings.System.getUriFor(Settings.System.BATTERY_LIGHT_MEDIUM_COLOR), + CMSettings.System.getUriFor(CMSettings.System.BATTERY_LIGHT_MEDIUM_COLOR), false, this, UserHandle.USER_ALL); resolver.registerContentObserver( - Settings.System.getUriFor(Settings.System.BATTERY_LIGHT_FULL_COLOR), + CMSettings.System.getUriFor(CMSettings.System.BATTERY_LIGHT_FULL_COLOR), false, this, UserHandle.USER_ALL); } @@ -981,22 +982,22 @@ public final class BatteryService extends SystemService { Resources res = mContext.getResources(); // Battery light enabled - mLightEnabled = Settings.System.getInt(resolver, - Settings.System.BATTERY_LIGHT_ENABLED, 1) != 0; + mLightEnabled = CMSettings.System.getInt(resolver, + CMSettings.System.BATTERY_LIGHT_ENABLED, 1) != 0; // Low battery pulse - mLedPulseEnabled = Settings.System.getInt(resolver, - Settings.System.BATTERY_LIGHT_PULSE, 1) != 0; + mLedPulseEnabled = CMSettings.System.getInt(resolver, + CMSettings.System.BATTERY_LIGHT_PULSE, 1) != 0; // Light colors - mBatteryLowARGB = Settings.System.getInt(resolver, - Settings.System.BATTERY_LIGHT_LOW_COLOR, res.getInteger( + mBatteryLowARGB = CMSettings.System.getInt(resolver, + CMSettings.System.BATTERY_LIGHT_LOW_COLOR, res.getInteger( com.android.internal.R.integer.config_notificationsBatteryLowARGB)); - mBatteryMediumARGB = Settings.System.getInt(resolver, - Settings.System.BATTERY_LIGHT_MEDIUM_COLOR, res.getInteger( + mBatteryMediumARGB = CMSettings.System.getInt(resolver, + CMSettings.System.BATTERY_LIGHT_MEDIUM_COLOR, res.getInteger( com.android.internal.R.integer.config_notificationsBatteryMediumARGB)); - mBatteryFullARGB = Settings.System.getInt(resolver, - Settings.System.BATTERY_LIGHT_FULL_COLOR, res.getInteger( + mBatteryFullARGB = CMSettings.System.getInt(resolver, + CMSettings.System.BATTERY_LIGHT_FULL_COLOR, res.getInteger( com.android.internal.R.integer.config_notificationsBatteryFullARGB)); // Notification LED brightness |