Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationInfo.java +1 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,7 @@ public class NotificationInfo extends LinearLayout implements NotificationGuts.G | PackageManager.MATCH_DIRECT_BOOT_UNAWARE | PackageManager.MATCH_DIRECT_BOOT_AWARE); if (info != null) { mAppUid = info.uid; mAppUid = sbn.getUid(); mAppName = String.valueOf(pm.getApplicationLabel(info)); pkgicon = pm.getApplicationIcon(info); } Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationInfoTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -121,7 +121,7 @@ public class NotificationInfoTest extends SysuiTestCase { mDefaultNotificationChannel = new NotificationChannel( NotificationChannel.DEFAULT_CHANNEL_ID, TEST_CHANNEL_NAME, NotificationManager.IMPORTANCE_LOW); mSbn = new StatusBarNotification(TEST_PACKAGE_NAME, TEST_PACKAGE_NAME, 0, null, 0, 0, mSbn = new StatusBarNotification(TEST_PACKAGE_NAME, TEST_PACKAGE_NAME, 0, null, TEST_UID, 0, new Notification(), UserHandle.CURRENT, null, 0); } Loading services/core/java/com/android/server/notification/NotificationManagerService.java +11 −1 Original line number Diff line number Diff line Loading @@ -1461,9 +1461,19 @@ public class NotificationManagerService extends SystemService { if (channel.getImportance() == NotificationManager.IMPORTANCE_NONE) { // cancel cancelAllNotificationsInt(MY_UID, MY_PID, pkg, channel.getId(), 0, 0, true, UserHandle.getUserId(Binder.getCallingUid()), REASON_CHANNEL_BANNED, UserHandle.getUserId(uid), REASON_CHANNEL_BANNED, null); if (isUidSystemOrPhone(uid)) { int[] profileIds = mUserProfiles.getCurrentProfileIds(); int N = profileIds.length; for (int i = 0; i < N; i++) { int profileId = profileIds[i]; cancelAllNotificationsInt(MY_UID, MY_PID, pkg, channel.getId(), 0, 0, true, profileId, REASON_CHANNEL_BANNED, null); } } } mRankingHelper.updateNotificationChannel(pkg, uid, channel); if (!fromListener) { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationInfo.java +1 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,7 @@ public class NotificationInfo extends LinearLayout implements NotificationGuts.G | PackageManager.MATCH_DIRECT_BOOT_UNAWARE | PackageManager.MATCH_DIRECT_BOOT_AWARE); if (info != null) { mAppUid = info.uid; mAppUid = sbn.getUid(); mAppName = String.valueOf(pm.getApplicationLabel(info)); pkgicon = pm.getApplicationIcon(info); } Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationInfoTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -121,7 +121,7 @@ public class NotificationInfoTest extends SysuiTestCase { mDefaultNotificationChannel = new NotificationChannel( NotificationChannel.DEFAULT_CHANNEL_ID, TEST_CHANNEL_NAME, NotificationManager.IMPORTANCE_LOW); mSbn = new StatusBarNotification(TEST_PACKAGE_NAME, TEST_PACKAGE_NAME, 0, null, 0, 0, mSbn = new StatusBarNotification(TEST_PACKAGE_NAME, TEST_PACKAGE_NAME, 0, null, TEST_UID, 0, new Notification(), UserHandle.CURRENT, null, 0); } Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +11 −1 Original line number Diff line number Diff line Loading @@ -1461,9 +1461,19 @@ public class NotificationManagerService extends SystemService { if (channel.getImportance() == NotificationManager.IMPORTANCE_NONE) { // cancel cancelAllNotificationsInt(MY_UID, MY_PID, pkg, channel.getId(), 0, 0, true, UserHandle.getUserId(Binder.getCallingUid()), REASON_CHANNEL_BANNED, UserHandle.getUserId(uid), REASON_CHANNEL_BANNED, null); if (isUidSystemOrPhone(uid)) { int[] profileIds = mUserProfiles.getCurrentProfileIds(); int N = profileIds.length; for (int i = 0; i < N; i++) { int profileId = profileIds[i]; cancelAllNotificationsInt(MY_UID, MY_PID, pkg, channel.getId(), 0, 0, true, profileId, REASON_CHANNEL_BANNED, null); } } } mRankingHelper.updateNotificationChannel(pkg, uid, channel); if (!fromListener) { Loading