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

Commit 8a9da10f authored by DvTonder's avatar DvTonder Committed by Gerrit Code Review
Browse files

Framework: Enable multi-user support for Notification light

Change-Id: I4fb84fdb0c9e1592c2a421011c303a789cde8c8c
parent ce5a0633
Loading
Loading
Loading
Loading
+16 −12
Original line number Diff line number Diff line
@@ -630,27 +630,31 @@ public class NotificationManagerService extends INotificationManager.Stub
        public void update() {
            ContentResolver resolver = mContext.getContentResolver();
            // LED enabled
            mNotificationPulseEnabled = Settings.System.getInt(resolver,
                    Settings.System.NOTIFICATION_LIGHT_PULSE, 0) != 0;
            mNotificationPulseEnabled = Settings.System.getIntForUser(resolver,
                    Settings.System.NOTIFICATION_LIGHT_PULSE, 0, UserHandle.USER_CURRENT) != 0;

            // LED default color
            mDefaultNotificationColor = Settings.System.getInt(resolver,
                    Settings.System.NOTIFICATION_LIGHT_PULSE_DEFAULT_COLOR, mDefaultNotificationColor);
            mDefaultNotificationColor = Settings.System.getIntForUser(resolver,
                    Settings.System.NOTIFICATION_LIGHT_PULSE_DEFAULT_COLOR, mDefaultNotificationColor,
                    UserHandle.USER_CURRENT);

            // LED default on MS
            mDefaultNotificationLedOn = Settings.System.getInt(resolver,
                    Settings.System.NOTIFICATION_LIGHT_PULSE_DEFAULT_LED_ON, mDefaultNotificationLedOn);
            mDefaultNotificationLedOn = Settings.System.getIntForUser(resolver,
                    Settings.System.NOTIFICATION_LIGHT_PULSE_DEFAULT_LED_ON, mDefaultNotificationLedOn,
                    UserHandle.USER_CURRENT);

            // LED default off MS
            mDefaultNotificationLedOff = Settings.System.getInt(resolver,
                    Settings.System.NOTIFICATION_LIGHT_PULSE_DEFAULT_LED_OFF, mDefaultNotificationLedOff);
            mDefaultNotificationLedOff = Settings.System.getIntForUser(resolver,
                    Settings.System.NOTIFICATION_LIGHT_PULSE_DEFAULT_LED_OFF, mDefaultNotificationLedOff,
                    UserHandle.USER_CURRENT);

            // LED custom notification colors
            mNotificationPulseCustomLedValues.clear();
            if (Settings.System.getInt(resolver,
                    Settings.System.NOTIFICATION_LIGHT_PULSE_CUSTOM_ENABLE, 0) != 0) {
                parseNotificationPulseCustomValuesString(Settings.System.getString(resolver,
                        Settings.System.NOTIFICATION_LIGHT_PULSE_CUSTOM_VALUES));
            if (Settings.System.getIntForUser(resolver,
                    Settings.System.NOTIFICATION_LIGHT_PULSE_CUSTOM_ENABLE, 0,
                    UserHandle.USER_CURRENT) != 0) {
                parseNotificationPulseCustomValuesString(Settings.System.getStringForUser(resolver,
                        Settings.System.NOTIFICATION_LIGHT_PULSE_CUSTOM_VALUES, UserHandle.USER_CURRENT));
            }
        }
    }