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

Commit da59bc3e authored by Danesh Mondegarian's avatar Danesh Mondegarian
Browse files

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
parent fd58bc15
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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() {