Merge "Add missing userId arg" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
b0ff7c86df
@@ -775,7 +775,7 @@ public class NotificationManagerService extends SystemService {
|
|||||||
|
|
||||||
ArraySet<String> defaultDnds = mConditionProviders.getDefaultPackages();
|
ArraySet<String> defaultDnds = mConditionProviders.getDefaultPackages();
|
||||||
for (int i = 0; i < defaultDnds.size(); i++) {
|
for (int i = 0; i < defaultDnds.size(); i++) {
|
||||||
allowDndPackage(defaultDnds.valueAt(i));
|
allowDndPackage(userId, defaultDnds.valueAt(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
setDefaultAssistantForUser(userId);
|
setDefaultAssistantForUser(userId);
|
||||||
@@ -875,9 +875,9 @@ public class NotificationManagerService extends SystemService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void allowDndPackage(String packageName) {
|
private void allowDndPackage(int userId, String packageName) {
|
||||||
try {
|
try {
|
||||||
getBinderService().setNotificationPolicyAccessGranted(packageName, true);
|
getBinderService().setNotificationPolicyAccessGrantedForUser(packageName, userId, true);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -478,6 +478,7 @@ public final class NotificationRecord {
|
|||||||
pw.println(prefix + "opPkg=" + getSbn().getOpPkg());
|
pw.println(prefix + "opPkg=" + getSbn().getOpPkg());
|
||||||
pw.println(prefix + "icon=" + notification.getSmallIcon());
|
pw.println(prefix + "icon=" + notification.getSmallIcon());
|
||||||
pw.println(prefix + "flags=0x" + Integer.toHexString(notification.flags));
|
pw.println(prefix + "flags=0x" + Integer.toHexString(notification.flags));
|
||||||
|
pw.println(prefix + "originalFlags=0x" + Integer.toHexString(mOriginalFlags));
|
||||||
pw.println(prefix + "pri=" + notification.priority);
|
pw.println(prefix + "pri=" + notification.priority);
|
||||||
pw.println(prefix + "key=" + getSbn().getKey());
|
pw.println(prefix + "key=" + getSbn().getKey());
|
||||||
pw.println(prefix + "seen=" + mStats.hasSeen());
|
pw.println(prefix + "seen=" + mStats.hasSeen());
|
||||||
@@ -544,6 +545,7 @@ public final class NotificationRecord {
|
|||||||
if (notification == null) {
|
if (notification == null) {
|
||||||
pw.println(prefix + "None");
|
pw.println(prefix + "None");
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
pw.println(prefix + "fullscreenIntent=" + notification.fullScreenIntent);
|
pw.println(prefix + "fullscreenIntent=" + notification.fullScreenIntent);
|
||||||
pw.println(prefix + "contentIntent=" + notification.contentIntent);
|
pw.println(prefix + "contentIntent=" + notification.contentIntent);
|
||||||
|
|||||||
Reference in New Issue
Block a user