Merge "Explicitly allow shell to update listener/assist" into oc-mr1-dev

am: 24a94491e4

Change-Id: Iaefcb277dffd79f0851d759df8afbf3bbc1d14b5
This commit is contained in:
Julia Reynolds
2017-08-11 19:28:29 +00:00
committed by android-build-merger

View File

@@ -2823,7 +2823,7 @@ public class NotificationManagerService extends SystemService {
public void setNotificationListenerAccessGrantedForUser(ComponentName listener, int userId,
boolean granted) throws RemoteException {
Preconditions.checkNotNull(listener);
enforceSystemOrSystemUI("grant notification listener access");
checkCallerIsSystemOrShell();
if (!mActivityManager.isLowRamDevice()) {
mConditionProviders.setPackageOrComponentEnabled(listener.flattenToString(),
userId, false, granted);
@@ -2844,7 +2844,7 @@ public class NotificationManagerService extends SystemService {
public void setNotificationAssistantAccessGrantedForUser(ComponentName assistant,
int userId, boolean granted) throws RemoteException {
Preconditions.checkNotNull(assistant);
enforceSystemOrSystemUI("grant notification assistant access");
checkCallerIsSystemOrShell();
if (!mActivityManager.isLowRamDevice()) {
mConditionProviders.setPackageOrComponentEnabled(assistant.flattenToString(),
userId, false, granted);