Merge "added call notif exemption to PostNotificationRunnable Test: NotificationManagerServiceTest Fixes: 227456870" into tm-dev am: 40c17d6cfd am: a05638117b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17968014 Change-Id: I5733f2c435cbeae7d0e96242ff1a3558f70e6c82 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -7371,6 +7371,7 @@ public class NotificationManagerService extends SystemService {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
boolean appBanned = !areNotificationsEnabledForPackageInt(pkg, uid);
|
boolean appBanned = !areNotificationsEnabledForPackageInt(pkg, uid);
|
||||||
|
boolean isCallNotification = isCallNotification(pkg, uid);
|
||||||
synchronized (mNotificationLock) {
|
synchronized (mNotificationLock) {
|
||||||
try {
|
try {
|
||||||
NotificationRecord r = null;
|
NotificationRecord r = null;
|
||||||
@@ -7389,8 +7390,10 @@ public class NotificationManagerService extends SystemService {
|
|||||||
|
|
||||||
final StatusBarNotification n = r.getSbn();
|
final StatusBarNotification n = r.getSbn();
|
||||||
final Notification notification = n.getNotification();
|
final Notification notification = n.getNotification();
|
||||||
|
boolean isCallNotificationAndCorrectStyle = isCallNotification
|
||||||
|
&& notification.isStyle(Notification.CallStyle.class);
|
||||||
|
|
||||||
if (!notification.isMediaNotification()
|
if (!(notification.isMediaNotification() || isCallNotificationAndCorrectStyle)
|
||||||
&& (appBanned || isRecordBlockedLocked(r))) {
|
&& (appBanned || isRecordBlockedLocked(r))) {
|
||||||
mUsageStats.registerBlocked(r);
|
mUsageStats.registerBlocked(r);
|
||||||
if (DBG) {
|
if (DBG) {
|
||||||
|
|||||||
Reference in New Issue
Block a user