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

Commit f1b576a5 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

Framework: Enable multi-user support for Notification light

Change-Id: I4fb84fdb0c9e1592c2a421011c303a789cde8c8c

Conflicts:
	services/java/com/android/server/NotificationManagerService.java
parent d4925359
Loading
Loading
Loading
Loading
+16 −12
Original line number Diff line number Diff line
@@ -1302,27 +1302,31 @@ public class NotificationManagerService extends INotificationManager.Stub
            ContentResolver resolver = mContext.getContentResolver();
            if (uri == null || NOTIFICATION_LIGHT_PULSE_URI.equals(uri)) {
                // 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));
                }
            }
            if (uri == null || ENABLED_NOTIFICATION_LISTENERS_URI.equals(uri)) {