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

Commit 3b577c45 authored by AdrianDC's avatar AdrianDC Committed by Steve Kondik
Browse files

LEDs Brightness [2/2]: Lights notifications brightness support



Implement the support of an overall brightness control for the LEDs.

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
  packages/Apps/Settings

Change-Id: I1c0de01b1c6a2a2cf1432028a2e69f90b2373b2c
Signed-off-by: default avatarAdrianDC <radian.dc@gmail.com>
parent 8c5d4a82
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -3033,6 +3033,13 @@ public class Intent implements Parcelable, Cloneable {
    public static final String ACTION_SHOW_BRIGHTNESS_DIALOG =
            "android.intent.action.SHOW_BRIGHTNESS_DIALOG";

    /**
     * Activity Action: Shows the notification brightness setting dialog.
     * @hide
     */
    public static final String ACTION_SHOW_NOTIFICATION_BRIGHTNESS_DIALOG =
            "android.intent.action.SHOW_NOTIFICATION_BRIGHTNESS_DIALOG";

    /**
     * Broadcast Action:  A global button was pressed.  Includes a single
     * extra field, {@link #EXTRA_KEY_EVENT}, containing the key event that
+8 −2
Original line number Diff line number Diff line
@@ -3330,6 +3330,13 @@ public final class Settings {
        /** @hide */
        public static final Validator SHOW_WEB_SUGGESTIONS_VALIDATOR = sBooleanValidator;

        /**
         * Contains the notifications light maximum brightness to use.
         * @hide
         */
        public static final String NOTIFICATION_LIGHT_BRIGHTNESS_LEVEL =
                "notification_light_brightness_level";

        /**
         * Whether to allow notifications with the screen on or DayDreams.
         * The value is boolean (1 or 0). Default will always be false.
@@ -3741,8 +3748,7 @@ public final class Settings {
            RINGTONE,
            LOCK_TO_APP_ENABLED,
            NOTIFICATION_SOUND,
            ACCELEROMETER_ROTATION,
            NOTIFICATION_LIGHT_SCREEN_ON
            ACCELEROMETER_ROTATION
        };

        /**
+9 −0
Original line number Diff line number Diff line
@@ -20,6 +20,15 @@
         SDK.  Instead, put them here. -->
    <private-symbols package="com.android.internal" />

    <!-- 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="array" name="notification_light_package_mapping" />
    <java-symbol type="array" name="config_notificationNoAlertsVibePattern" />

    <!-- LED pulse -->
    <java-symbol type="bool" name="config_ledCanPulse" />
</resources>
+4 −0
Original line number Diff line number Diff line
@@ -928,6 +928,10 @@
    <!-- 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>

+0 −8
Original line number Diff line number Diff line
@@ -2625,12 +2625,4 @@
  <!-- Gesture Sensor -->
  <java-symbol type="bool" name="config_enableGestureService" />

  <!-- Notification and battery light -->
  <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="array" name="notification_light_package_mapping" />
  <java-symbol type="array" name="config_notificationNoAlertsVibePattern" />

</resources>
Loading