summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrianDC <radian.dc@gmail.com>2015-11-11 19:16:33 +0100
committerGerrit Code Review <gerrit@cyanogenmod.org>2015-11-16 11:52:23 -0800
commit5ceb8731615dbbd54e027e09e46e724037e3a809 (patch)
tree5a24b750559f9bb1bfe26dc049088201de77c0dc
parente7eb10420c291ee6d83dddcb632e3ce0720110c4 (diff)
downloadframeworks_base-5ceb8731615dbbd54e027e09e46e724037e3a809.zip
frameworks_base-5ceb8731615dbbd54e027e09e46e724037e3a809.tar.gz
frameworks_base-5ceb8731615dbbd54e027e09e46e724037e3a809.tar.bz2
fw: Move Notification LEDs settings to CMSettings
* Lights with Screen On * LEDs Brightness * Multiple LEDs Change-Id: Ife49a2f8077e9361f56990fb4b0b49e1c44bdd5e Signed-off-by: AdrianDC <radian.dc@gmail.com>
-rw-r--r--core/res/res/values/cm_symbols.xml2
-rw-r--r--core/res/res/values/config.xml8
-rw-r--r--packages/SettingsProvider/res/values/defaults.xml8
-rw-r--r--services/core/java/com/android/server/BatteryService.java7
-rwxr-xr-xservices/core/java/com/android/server/notification/NotificationManagerService.java5
5 files changed, 6 insertions, 24 deletions
diff --git a/core/res/res/values/cm_symbols.xml b/core/res/res/values/cm_symbols.xml
index 2e9b306..f216bc4 100644
--- a/core/res/res/values/cm_symbols.xml
+++ b/core/res/res/values/cm_symbols.xml
@@ -32,12 +32,10 @@
<java-symbol type="integer" name="config_longPressOnAppSwitchBehavior" />
<!-- Notification and battery light -->
- <java-symbol type="bool" name="config_adjustableNotificationLedBrightness" />
<java-symbol type="bool" name="config_intrusiveNotificationLed" />
<java-symbol type="bool" name="config_multiColorNotificationLed" />
<java-symbol type="bool" name="config_intrusiveBatteryLed" />
<java-symbol type="bool" name="config_multiColorBatteryLed" />
- <java-symbol type="bool" name="config_multipleNotificationLeds" />
<java-symbol type="array" name="notification_light_package_mapping" />
<java-symbol type="array" name="config_notificationNoAlertsVibePattern" />
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 88f31a4..57938a1 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -905,10 +905,6 @@
<!-- Default value for LED on time when the battery is low on charge in miliseconds -->
<integer name="config_notificationsBatteryLedOn">125</integer>
- <!-- Is the notification LED brightness adjustable ?
- Used to decide if the user can set LED brightness -->
- <bool name="config_adjustableNotificationLedBrightness">false</bool>
-
<!-- Is the notification LED intrusive? Used to decide if there should be a disable option -->
<bool name="config_intrusiveNotificationLed">false</bool>
@@ -923,10 +919,6 @@
Used to decide if the user can change the colors -->
<bool name="config_multiColorBatteryLed">false</bool>
- <!-- Does the device have multiple LEDs ?
- Used to decide if the user can change the multiple LEDs settings -->
- <bool name="config_multipleNotificationLeds">false</bool>
-
<!-- Do the battery/notification LEDs support pulsing?
Used to decide if we show pulse settings -->
<bool name="config_ledCanPulse">true</bool>
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index 22fcb46..4ffa3ad 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -66,14 +66,6 @@
pending notification -->
<bool name="def_notification_pulse">true</bool>
- <!-- Default value for the notification LEDs brightness
- on devices equiped with configurable LED controller -->
- <integer name="def_notification_brightness_level">255</integer>
-
- <!-- Default value for whether or not to use multiple notification LEDs
- on devices equiped with more than one LED -->
- <bool name="def_notification_multiple_leds">false</bool>
-
<bool name="def_mount_play_notification_snd">true</bool>
<bool name="def_mount_ums_autostart">false</bool>
<bool name="def_mount_ums_prompt">true</bool>
diff --git a/services/core/java/com/android/server/BatteryService.java b/services/core/java/com/android/server/BatteryService.java
index 42c1f16..238e9c9 100644
--- a/services/core/java/com/android/server/BatteryService.java
+++ b/services/core/java/com/android/server/BatteryService.java
@@ -64,7 +64,6 @@ import java.io.PrintWriter;
import cyanogenmod.providers.CMSettings;
-
/**
* <p>BatteryService monitors the charging status, and charge level of the device
* battery. When these values change this service broadcasts the new values
@@ -770,11 +769,11 @@ public final class BatteryService extends SystemService {
// Is the notification LED brightness changeable ?
mAdjustableNotificationLedBrightness = context.getResources().getBoolean(
- com.android.internal.R.bool.config_adjustableNotificationLedBrightness);
+ org.cyanogenmod.platform.internal.R.bool.config_adjustableNotificationLedBrightness);
// Does the Device have multiple LEDs ?
mMultipleNotificationLeds = context.getResources().getBoolean(
- com.android.internal.R.bool.config_multipleNotificationLeds);
+ org.cyanogenmod.platform.internal.R.bool.config_multipleNotificationLeds);
mBatteryLedOn = context.getResources().getInteger(
com.android.internal.R.integer.config_notificationsBatteryLedOn);
@@ -1011,7 +1010,7 @@ public final class BatteryService extends SystemService {
// Multiple LEDs enabled
if (mMultipleNotificationLeds) {
- mMultipleLedsEnabled = Settings.System.getInt(resolver,
+ mMultipleLedsEnabled = CMSettings.System.getInt(resolver,
CMSettings.System.NOTIFICATION_LIGHT_MULTIPLE_LEDS_ENABLE,
mMultipleNotificationLeds ? 1 : 0) != 0;
}
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index 97758c7..cb1cf47 100755
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -124,6 +124,7 @@ import com.android.server.notification.ManagedServices.UserProfiles;
import com.android.server.statusbar.StatusBarManagerInternal;
import cyanogenmod.providers.CMSettings;
+
import libcore.io.IoUtils;
import org.json.JSONArray;
@@ -1202,9 +1203,9 @@ public class NotificationManagerService extends SystemService {
DEFAULT_VIBRATE_PATTERN);
mAdjustableNotificationLedBrightness = resources.getBoolean(
- com.android.internal.R.bool.config_adjustableNotificationLedBrightness);
+ org.cyanogenmod.platform.internal.R.bool.config_adjustableNotificationLedBrightness);
mMultipleNotificationLeds = resources.getBoolean(
- com.android.internal.R.bool.config_multipleNotificationLeds);
+ org.cyanogenmod.platform.internal.R.bool.config_multipleNotificationLeds);
mUseAttentionLight = resources.getBoolean(R.bool.config_useAttentionLight);