am 7df411d0: Merge "Clear calling identity before getting the current user." into mnc-dev
* commit '7df411d0cced4a849bcdca58fa3c27eb731e0862': Clear calling identity before getting the current user.
This commit is contained in:
@@ -3615,6 +3615,9 @@ public class NotificationManagerService extends SystemService {
|
|||||||
|
|
||||||
public ArraySet<String> getGrantedPackages() {
|
public ArraySet<String> getGrantedPackages() {
|
||||||
final ArraySet<String> pkgs = new ArraySet<>();
|
final ArraySet<String> pkgs = new ArraySet<>();
|
||||||
|
|
||||||
|
long identity = Binder.clearCallingIdentity();
|
||||||
|
try {
|
||||||
final String setting = Settings.Secure.getStringForUser(
|
final String setting = Settings.Secure.getStringForUser(
|
||||||
getContext().getContentResolver(),
|
getContext().getContentResolver(),
|
||||||
Settings.Secure.ENABLED_NOTIFICATION_POLICY_ACCESS_PACKAGES,
|
Settings.Secure.ENABLED_NOTIFICATION_POLICY_ACCESS_PACKAGES,
|
||||||
@@ -3632,6 +3635,9 @@ public class NotificationManagerService extends SystemService {
|
|||||||
pkgs.add(token);
|
pkgs.add(token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} finally {
|
||||||
|
Binder.restoreCallingIdentity(identity);
|
||||||
|
}
|
||||||
return pkgs;
|
return pkgs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user