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

Commit d6236bda authored by Steve Kondik's avatar Steve Kondik
Browse files

nms: Only generate LED colors if the device has a multicolored LED

 * Check the overlay value before doing any of this stuff.

Change-Id: Iedfceba6bfc86b2761d8af57ecab51026bfa4c19
parent 374bff16
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -339,6 +339,8 @@ public class NotificationManagerService extends SystemService {
    private boolean mDisableDuckingWhileMedia;
    private boolean mActiveMedia;

    private boolean mMultiColorNotificationLed;

    private static final int MY_UID = Process.myUid();
    private static final int MY_PID = Process.myPid();
    private static final int REASON_DELEGATE_CLICK = 1;
@@ -1200,6 +1202,9 @@ public class NotificationManagerService extends SystemService {
        mDefaultNotificationLedOff = resources.getInteger(
                R.integer.config_defaultNotificationLedOff);

        mMultiColorNotificationLed = resources.getBoolean(
                R.bool.config_multiColorNotificationLed);

        mNotificationPulseCustomLedValues = new HashMap<String, NotificationLedValues>();

        mPackageNameMappings = new HashMap<String, String>();
@@ -3518,6 +3523,9 @@ public class NotificationManagerService extends SystemService {
        if (!mAutoGenerateNotificationColor) {
            return mDefaultNotificationColor;
        }
        if (!mMultiColorNotificationLed) {
            return mDefaultNotificationColor;
        }
        final String packageName = ledNotification.sbn.getPackageName();
        final String mapping = mapPackage(packageName);
        int color = mDefaultNotificationColor;