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

Commit b180ab8e authored by AdrianDC's avatar AdrianDC Committed by Michael Bestas
Browse files

Multiple LEDs [3/3]: Illumination Bars support



Implement the support of a multiple LEDs settings.

The setting is deactivated by default
and will be ignored by the unimplemented phones.
Current LibLights will simply not use the new variable.

Changes includes :
  frameworks/base
  hardware/libhardware
  packages/Apps/Settings

Change-Id: Ie8712c13e43f823996f10ca83b4a9f95fb750e96
Signed-off-by: default avatarAdrianDC <radian.dc@gmail.com>
parent e2920983
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -2828,6 +2828,13 @@ public final class Settings {
        public static final String NOTIFICATION_LIGHT_BRIGHTNESS_LEVEL =
                "notification_light_brightness_level";

        /**
         * Whether to use the all the LEDs for the notifications or just one.
         * @hide
         */
        public static final String NOTIFICATION_LIGHT_MULTIPLE_LEDS_ENABLE =
                "notification_light_multiple_leds_enable";

        /**
         * Whether to allow notifications with the screen on or DayDreams.
         * The value is boolean (1 or 0). Default will always be false.
@@ -3647,6 +3654,7 @@ public final class Settings {
            NONE_IS_SILENT,
            ALLOW_LIGHTS,
            NOTIFICATION_LIGHT_BRIGHTNESS_LEVEL,
            NOTIFICATION_LIGHT_MULTIPLE_LEDS_ENABLE,
            NOTIFICATION_LIGHT_SCREEN_ON
        };

+1 −0
Original line number Diff line number Diff line
@@ -190,6 +190,7 @@
    <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" />

+4 −0
Original line number Diff line number Diff line
@@ -825,6 +825,10 @@
         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>
+4 −0
Original line number Diff line number Diff line
@@ -71,6 +71,10 @@
         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 −0
Original line number Diff line number Diff line
@@ -2553,6 +2553,9 @@ public class DatabaseHelper extends SQLiteOpenHelper {
            loadIntegerSetting(stmt, Settings.System.NOTIFICATION_LIGHT_BRIGHTNESS_LEVEL,
                    R.integer.def_notification_brightness_level);

            loadBooleanSetting(stmt, Settings.System.NOTIFICATION_LIGHT_MULTIPLE_LEDS_ENABLE,
                    R.bool.def_notification_multiple_leds);

            loadBooleanSetting(stmt, Settings.System.SYSTEM_PROFILES_ENABLED,
                    R.bool.def_system_profiles_enabled);

Loading