Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ceb8731 authored by AdrianDC's avatar AdrianDC Committed by Gerrit Code Review
Browse files

fw: Move Notification LEDs settings to CMSettings



 * Lights with Screen On
 * LEDs Brightness
 * Multiple LEDs

Change-Id: Ife49a2f8077e9361f56990fb4b0b49e1c44bdd5e
Signed-off-by: default avatarAdrianDC <radian.dc@gmail.com>
parent e7eb1042
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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" />

+0 −8
Original line number Diff line number Diff line
@@ -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>
+0 −8
Original line number Diff line number Diff line
@@ -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>
+3 −4
Original line number Diff line number Diff line
@@ -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;
            }
+3 −2
Original line number Diff line number Diff line
@@ -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);