diff options
author | Danesh Mondegarian <daneshm90@gmail.com> | 2013-07-02 14:10:43 -0700 |
---|---|---|
committer | Danesh Mondegarian <daneshm90@gmail.com> | 2013-07-02 14:10:43 -0700 |
commit | da59bc3ef84240480b10520d3ecfc9c074846dbe (patch) | |
tree | 29c81c00af8e83522a40578e38058316b6a8b6ef | |
parent | fd58bc1504b3886b33ff4ad521221e82ebe5ad43 (diff) | |
download | frameworks_base-da59bc3ef84240480b10520d3ecfc9c074846dbe.zip frameworks_base-da59bc3ef84240480b10520d3ecfc9c074846dbe.tar.gz frameworks_base-da59bc3ef84240480b10520d3ecfc9c074846dbe.tar.bz2 |
NotificationManager : Fix security exception
If the call is from a user process, using USER_CURRENT_OR_SELF avoids a security
exception in such cases.
Change-Id: I2f25917ecfabc80d3a193d63020ad11480edf8ec
-rw-r--r-- | services/java/com/android/server/NotificationManagerService.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java index 40b4836..41377d2 100644 --- a/services/java/com/android/server/NotificationManagerService.java +++ b/services/java/com/android/server/NotificationManagerService.java @@ -1363,13 +1363,13 @@ public class NotificationManagerService extends INotificationManager.Stub private boolean shouldConvertSoundToVibration() { return Settings.System.getIntForUser(mContext.getContentResolver(), Settings.System.NOTIFICATION_CONVERT_SOUND_TO_VIBRATION, - 1, UserHandle.USER_CURRENT) != 0; + 1, UserHandle.USER_CURRENT_OR_SELF) != 0; } private boolean canVibrateDuringAlertsDisabled() { return Settings.System.getIntForUser(mContext.getContentResolver(), Settings.System.NOTIFICATION_VIBRATE_DURING_ALERTS_DISABLED, - 0, UserHandle.USER_CURRENT) != 0; + 0, UserHandle.USER_CURRENT_OR_SELF) != 0; } private boolean inQuietHours() { |