Home
last modified time | relevance | path

Searched refs:sbn (Results 1 – 25 of 42) sorted by relevance

12

/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DNotificationGroupManager.java53 public boolean isGroupExpanded(StatusBarNotification sbn) { in isGroupExpanded() argument
54 NotificationGroup group = mGroupMap.get(getGroupKey(sbn)); in isGroupExpanded()
61 public void setGroupExpanded(StatusBarNotification sbn, boolean expanded) { in setGroupExpanded() argument
62 NotificationGroup group = mGroupMap.get(getGroupKey(sbn)); in setGroupExpanded()
89 final StatusBarNotification sbn) { in onEntryRemovedInternal() argument
90 String groupKey = getGroupKey(sbn); in onEntryRemovedInternal()
99 if (isGroupChild(sbn)) { in onEntryRemovedInternal()
116 final StatusBarNotification sbn = added.notification; in onEntryAdded() local
117 boolean isGroupChild = isGroupChild(sbn); in onEntryAdded()
118 String groupKey = getGroupKey(sbn); in onEntryAdded()
[all …]
DNotificationListenerWithPlugins.java83 public boolean onPluginNotificationPosted(StatusBarNotification sbn, in onPluginNotificationPosted() argument
86 if (plugin.onNotificationPosted(sbn, rankingMap)) { in onPluginNotificationPosted()
97 public boolean onPluginNotificationRemoved(StatusBarNotification sbn, in onPluginNotificationRemoved() argument
100 if (plugin.onNotificationRemoved(sbn, rankingMap)) { in onPluginNotificationRemoved()
137 public void addNotification(StatusBarNotification sbn) { in getProvider() argument
138 onNotificationPosted(sbn, getRankingMap()); in getProvider()
142 public void removeNotification(StatusBarNotification sbn) { in getProvider() argument
143 onNotificationRemoved(sbn, getRankingMap()); in getProvider()
DStatusBar.java1769 StatusBarNotification sbn = entry.notification; in removeNotification() local
1772 .recoverBuilder(mContext, sbn.getNotification().clone()); in removeNotification()
1773 CharSequence[] oldHistory = sbn.getNotification().extras in removeNotification()
1790 newNotification.contentView = sbn.getNotification().contentView; in removeNotification()
1791 newNotification.bigContentView = sbn.getNotification().bigContentView; in removeNotification()
1792 newNotification.headsUpContentView = sbn.getNotification().headsUpContentView; in removeNotification()
1794 StatusBarNotification newSbn = new StatusBarNotification(sbn.getPackageName(), in removeNotification()
1795 sbn.getOpPkg(), in removeNotification()
1796 sbn.getId(), sbn.getTag(), sbn.getUid(), sbn.getInitialPid(), in removeNotification()
1797 newNotification, sbn.getUser(), sbn.getOverrideGroupKey(), sbn.getPostTime()); in removeNotification()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DForegroundServiceControllerImpl.java60 public void addNotification(StatusBarNotification sbn, int importance) { in addNotification() argument
61 updateNotification(sbn, importance); in addNotification()
65 public boolean removeNotification(StatusBarNotification sbn) { in removeNotification() argument
67 final UserServices userServices = mUserServices.get(sbn.getUserId()); in removeNotification()
72 sbn.getUserId(), sbn)); in removeNotification()
76 if (isDungeonNotification(sbn)) { in removeNotification()
83 return userServices.removeNotification(sbn.getPackageName(), sbn.getKey()); in removeNotification()
89 public void updateNotification(StatusBarNotification sbn, int newImportance) { in updateNotification() argument
91 UserServices userServices = mUserServices.get(sbn.getUserId()); in updateNotification()
94 mUserServices.put(sbn.getUserId(), userServices); in updateNotification()
[all …]
DForegroundServiceController.java24 void addNotification(StatusBarNotification sbn, int importance); in addNotification() argument
30 void updateNotification(StatusBarNotification sbn, int newImportance); in updateNotification() argument
35 boolean removeNotification(StatusBarNotification sbn); in removeNotification() argument
48 boolean isDungeonNotification(StatusBarNotification sbn); in isDungeonNotification() argument
/frameworks/base/services/core/java/com/android/server/notification/
DGroupHelper.java48 public void onNotificationPosted(StatusBarNotification sbn, boolean autogroupSummaryExists) { in onNotificationPosted() argument
49 if (DEBUG) Log.i(TAG, "POSTED " + sbn.getKey()); in onNotificationPosted()
52 if (!sbn.isAppGroup()) { in onNotificationPosted()
57 = mUngroupedNotifications.get(sbn.getUserId()); in onNotificationPosted()
61 mUngroupedNotifications.put(sbn.getUserId(), ungroupedNotificationsByUser); in onNotificationPosted()
63 = ungroupedNotificationsByUser.get(sbn.getPackageName()); in onNotificationPosted()
68 notificationsForPackage.add(sbn.getKey()); in onNotificationPosted()
69 ungroupedNotificationsByUser.put(sbn.getPackageName(), notificationsForPackage); in onNotificationPosted()
77 adjustAutogroupingSummary(sbn.getUserId(), sbn.getPackageName(), in onNotificationPosted()
83 maybeUngroup(sbn, false, sbn.getUserId()); in onNotificationPosted()
[all …]
DNotificationRecord.java81 final StatusBarNotification sbn; field in NotificationRecord
141 public NotificationRecord(Context context, StatusBarNotification sbn, in NotificationRecord() argument
144 this.sbn = sbn; in NotificationRecord()
145 mOriginalFlags = sbn.getNotification().flags; in NotificationRecord()
147 mCreationTimeMs = sbn.getPostTime(); in NotificationRecord()
165 mContext.getPackageManager().getApplicationInfoAsUser(sbn.getPackageName(), in isPreChannelsNotification()
166 0, UserHandle.getUserId(sbn.getUid())); in isPreChannelsNotification()
178 final Notification n = sbn.getNotification(); in calculateSound()
214 final Notification notification = sbn.getNotification(); in calculateLights()
245 final Notification notification = sbn.getNotification(); in calculateVibration()
[all …]
DNotificationManagerService.java652 StatusBarNotification sbn = r.sbn;
653 cancelNotification(callingUid, callingPid, sbn.getPackageName(), sbn.getTag(),
654 sbn.getId(), Notification.FLAG_AUTO_CANCEL,
857 cancelNotification(record.sbn.getUid(), record.sbn.getInitialPid(),
858 record.sbn.getPackageName(), record.sbn.getTag(),
859 record.sbn.getId(), 0,
1123 if (posted.sbn.isGroup() && posted.getNotification().isGroupSummary()) { in getNotificationRecordCount()
1142 mNotificationsByKey.put(r.sbn.getKey(), r); in addNotification()
1143 if (r.sbn.isGroup()) { in addNotification()
1336 enqueueNotificationInternal(r.sbn.getPackageName(), r.sbn.getOpPkg(), in onStart()
[all …]
DBadgeExtractor.java44 boolean userWantsBadges = mConfig.badgingEnabled(record.sbn.getUser()); in process()
46 mConfig.canShowBadge(record.sbn.getPackageName(), record.sbn.getUid()); in process()
DSnoozeHelper.java133 scheduleRepost(record.sbn.getPackageName(), record.getKey(), record.getUserId(), duration); in snooze()
149 ArrayMap<String, NotificationRecord> pkgRecords = records.get(record.sbn.getPackageName()); in snooze()
154 records.put(record.sbn.getPackageName(), pkgRecords); in snooze()
156 mPackages.put(record.getKey(), record.sbn.getPackageName()); in snooze()
168 final StatusBarNotification sbn = record.getValue().sbn; in cancel() local
169 if (Objects.equals(sbn.getTag(), tag) && sbn.getId() == id) { in cancel()
229 ArrayMap<String, NotificationRecord> pkgRecords = records.get(record.sbn.getPackageName()); in update()
283 if (potentialGroupSummary.sbn.isGroup() in repostGroupSummary()
DNotificationComparator.java109 final int leftPriority = left.sbn.getNotification().priority; in compare()
110 final int rightPriority = right.sbn.getNotification().priority; in compare()
150 return mMessagingUtil.isImportantMessaging(record.sbn, record.getImportance()); in isImportantMessaging()
164 && isDefaultPhoneApp(record.sbn.getPackageName()); in isCall()
DNotificationChannelExtractor.java45 record.updateNotificationChannel(mConfig.getNotificationChannel(record.sbn.getPackageName(), in process()
46 record.sbn.getUid(), record.getChannel().getId(), false)); in process()
/frameworks/base/services/tests/notification/src/com/android/server/notification/
DNotificationManagerServiceTest.java250 StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, id, "tag", mUid, 0, in generateNotificationRecord() local
252 return new NotificationRecord(mContext, sbn, channel); in generateNotificationRecord()
270 StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 1, "tag", mUid, 0, in generateNotificationRecord() local
272 return new NotificationRecord(mContext, sbn, channel); in generateNotificationRecord()
442 final StatusBarNotification sbn = generateNotificationRecord(channel).sbn; in testBlockedNotifications_blockedChannel() local
444 sbn.getId(), sbn.getNotification(), sbn.getUserId()); in testBlockedNotifications_blockedChannel()
446 assertEquals(0, mBinderService.getActiveNotifications(sbn.getPackageName()).length); in testBlockedNotifications_blockedChannel()
459 final StatusBarNotification sbn = generateNotificationRecord(channel).sbn; in testEnqueuedBlockedNotifications_appBlockedChannelForegroundService() local
460 sbn.getNotification().flags |= Notification.FLAG_FOREGROUND_SERVICE; in testEnqueuedBlockedNotifications_appBlockedChannelForegroundService()
462 sbn.getId(), sbn.getNotification(), sbn.getUserId()); in testEnqueuedBlockedNotifications_appBlockedChannelForegroundService()
[all …]
DNotificationRecordTest.java188 StatusBarNotification sbn = getNotification(true /*preO */, true /* noisy */, in testSound_default_preUpgradeUsesNotification() local
192 NotificationRecord record = new NotificationRecord(mMockContext, sbn, defaultChannel); in testSound_default_preUpgradeUsesNotification()
201 StatusBarNotification sbn = getNotification(true /*preO */, true /* noisy */, in testSound_custom_preUpgradeUsesNotification() local
205 NotificationRecord record = new NotificationRecord(mMockContext, sbn, defaultChannel); in testSound_custom_preUpgradeUsesNotification()
215 StatusBarNotification sbn = getNotification(true /*preO */, true /* noisy */, in testSound_default_userLocked_preUpgrade() local
219 NotificationRecord record = new NotificationRecord(mMockContext, sbn, defaultChannel); in testSound_default_userLocked_preUpgrade()
227 StatusBarNotification sbn = getNotification(true /*preO */, false /* noisy */, in testSound_noSound_preUpgrade() local
231 NotificationRecord record = new NotificationRecord(mMockContext, sbn, defaultChannel); in testSound_noSound_preUpgrade()
240 StatusBarNotification sbn = getNotification(false /*preO */, true /* noisy */, in testSound_default_upgradeUsesChannel() local
244 NotificationRecord record = new NotificationRecord(mMockContext, sbn, channel); in testSound_default_upgradeUsesChannel()
[all …]
DSnoozeHelperTest.java79 UserHandle.USER_SYSTEM, r.sbn.getPackageName(), r.getKey())); in testSnoozeForTime()
89 UserHandle.USER_SYSTEM, r.sbn.getPackageName(), r.getKey()));
99 UserHandle.USER_SYSTEM, r.sbn.getPackageName(), r.getKey()));
101 UserHandle.USER_SYSTEM, r2.sbn.getPackageName(), r2.getKey()));
103 mSnoozeHelper.cancel(UserHandle.USER_SYSTEM, r.sbn.getPackageName(), "one", 1);
107 UserHandle.USER_SYSTEM, r.sbn.getPackageName(), r.getKey()));
109 UserHandle.USER_SYSTEM, r2.sbn.getPackageName(), r2.getKey()));
121 UserHandle.USER_SYSTEM, r.sbn.getPackageName(), r.getKey()));
123 UserHandle.USER_SYSTEM, r2.sbn.getPackageName(), r2.getKey()));
125 UserHandle.USER_ALL, r3.sbn.getPackageName(), r3.getKey()));
[all …]
DGroupHelperTest.java160 final StatusBarNotification sbn = getSbn(pkg, i, String.valueOf(i), UserHandle.SYSTEM); in testDropToZeroRemoveGroup() local
161 posted.add(sbn); in testDropToZeroRemoveGroup()
162 mGroupHelper.onNotificationPosted(sbn, false); in testDropToZeroRemoveGroup()
187 final StatusBarNotification sbn = getSbn(pkg, i, String.valueOf(i), UserHandle.SYSTEM); in testAppStartsGrouping() local
188 posted.add(sbn); in testAppStartsGrouping()
189 mGroupHelper.onNotificationPosted(sbn, false); in testAppStartsGrouping()
199 final StatusBarNotification sbn = in testAppStartsGrouping() local
201 mGroupHelper.onNotificationPosted(sbn, false); in testAppStartsGrouping()
208 final StatusBarNotification sbn = in testAppStartsGrouping() local
210 mGroupHelper.onNotificationPosted(sbn, false); in testAppStartsGrouping()
[all …]
DNotificationIntrusivenessExtractorTest.java47 StatusBarNotification sbn = new StatusBarNotification("", "", 0, "", 0, in testNonIntrusive() local
49 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in testNonIntrusive()
64 StatusBarNotification sbn = new StatusBarNotification("", "", 0, "", 0, in testIntrusive_fillScreen() local
67 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in testIntrusive_fillScreen()
82 StatusBarNotification sbn = new StatusBarNotification("", "", 0, "", 0, in testOldNotificationsNotIntrusive() local
86 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in testOldNotificationsNotIntrusive()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DNotificationData.java139 public void createIcons(Context context, StatusBarNotification sbn) in createIcons() argument
141 Notification n = sbn.getNotification(); in createIcons()
145 + sbn.getPackageName()); in createIcons()
150 sbn.getPackageName() + "/0x" + Integer.toHexString(sbn.getId()), sbn); in createIcons()
155 sbn.getPackageName() + "/0x" + Integer.toHexString(sbn.getId()), sbn); in createIcons()
158 sbn.getUser(), in createIcons()
159 sbn.getPackageName(), in createIcons()
191 public void updateIcons(Context context, StatusBarNotification sbn) in updateIcons() argument
195 Notification n = sbn.getNotification(); in updateIcons()
203 icon.setNotification(sbn); in updateIcons()
[all …]
/frameworks/base/core/java/android/service/notification/
DNotificationAssistantService.java78 abstract public void onNotificationSnoozedUntilContext(StatusBarNotification sbn, in onNotificationSnoozedUntilContext() argument
87 abstract public Adjustment onNotificationEnqueued(StatusBarNotification sbn); in onNotificationEnqueued() argument
144 StatusBarNotification sbn; in onNotificationEnqueued() local
146 sbn = sbnHolder.get(); in onNotificationEnqueued()
153 args.arg1 = sbn; in onNotificationEnqueued()
162 StatusBarNotification sbn; in onNotificationSnoozedUntilContext() local
164 sbn = sbnHolder.get(); in onNotificationSnoozedUntilContext()
171 args.arg1 = sbn; in onNotificationSnoozedUntilContext()
191 StatusBarNotification sbn = (StatusBarNotification) args.arg1; in handleMessage() local
193 Adjustment adjustment = onNotificationEnqueued(sbn); in handleMessage()
[all …]
DNotificationListenerService.java303 public void onNotificationPosted(StatusBarNotification sbn) { in onNotificationPosted() argument
316 public void onNotificationPosted(StatusBarNotification sbn, RankingMap rankingMap) { in onNotificationPosted() argument
317 onNotificationPosted(sbn); in onNotificationPosted()
337 public void onNotificationRemoved(StatusBarNotification sbn) { in onNotificationRemoved() argument
361 public void onNotificationRemoved(StatusBarNotification sbn, RankingMap rankingMap) { in onNotificationRemoved() argument
362 onNotificationRemoved(sbn); in onNotificationRemoved()
386 public void onNotificationRemoved(StatusBarNotification sbn, RankingMap rankingMap, in onNotificationRemoved() argument
388 onNotificationRemoved(sbn, rankingMap); in onNotificationRemoved()
864 StatusBarNotification sbn = list.get(i); in cleanUpNotificationList() local
865 Notification notification = sbn.getNotification(); in cleanUpNotificationList()
[all …]
/frameworks/base/core/java/com/android/internal/util/
DNotificationMessagingUtil.java51 private boolean isDefaultMessagingApp(StatusBarNotification sbn) { in isDefaultMessagingApp() argument
52 final int userId = sbn.getUserId(); in isDefaultMessagingApp()
57 return Objects.equals(mDefaultSmsApp.get(userId), sbn.getPackageName()); in isDefaultMessagingApp()
76 public boolean isImportantMessaging(StatusBarNotification sbn, int importance) { in isImportantMessaging() argument
81 Class<? extends Notification.Style> style = sbn.getNotification().getNotificationStyle(); in isImportantMessaging()
86 if (Notification.CATEGORY_MESSAGE.equals(sbn.getNotification().category) in isImportantMessaging()
87 && isDefaultMessagingApp(sbn)) { in isImportantMessaging()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/
DStatusBarTest.java347 StatusBarNotification sbn = new StatusBarNotification("a", "a", 0, "a", 0, 0, n, in testShouldPeek_nonSuppressedGroupSummary() local
349 NotificationData.Entry entry = new NotificationData.Entry(sbn); in testShouldPeek_nonSuppressedGroupSummary()
351 assertTrue(mStatusBar.shouldPeek(entry, sbn)); in testShouldPeek_nonSuppressedGroupSummary()
368 StatusBarNotification sbn = new StatusBarNotification("a", "a", 0, "a", 0, 0, n, in testShouldPeek_suppressedGroupSummary() local
370 NotificationData.Entry entry = new NotificationData.Entry(sbn); in testShouldPeek_suppressedGroupSummary()
372 assertFalse(mStatusBar.shouldPeek(entry, sbn)); in testShouldPeek_suppressedGroupSummary()
388 StatusBarNotification sbn = new StatusBarNotification("a", "a", 0, "a", 0, 0, n, in testShouldPeek_suppressedScreenOn_dozing() local
390 NotificationData.Entry entry = new NotificationData.Entry(sbn); in testShouldPeek_suppressedScreenOn_dozing()
392 assertTrue(mStatusBar.shouldPeek(entry, sbn)); in testShouldPeek_suppressedScreenOn_dozing()
408 StatusBarNotification sbn = new StatusBarNotification("a", "a", 0, "a", 0, 0, n, in testShouldPeek_suppressedScreenOn_noDoze() local
[all …]
/frameworks/base/packages/SystemUI/plugin/src/com/android/systemui/plugins/
DNotificationListenerController.java33 default boolean onNotificationPosted(StatusBarNotification sbn, RankingMap rankingMap) { in onNotificationPosted() argument
36 default boolean onNotificationRemoved(StatusBarNotification sbn, RankingMap rankingMap) { in onNotificationRemoved() argument
58 void addNotification(StatusBarNotification sbn); in addNotification() argument
59 void removeNotification(StatusBarNotification sbn); in removeNotification() argument
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/
DForegroundServiceControllerTest.java271 final StatusBarNotification sbn = mock(StatusBarNotification.class); in makeMockSBN() local
272 when(sbn.getNotification()).thenReturn(n); in makeMockSBN()
273 when(sbn.getId()).thenReturn(id); in makeMockSBN()
274 when(sbn.getPackageName()).thenReturn(pkg); in makeMockSBN()
275 when(sbn.getTag()).thenReturn(null); in makeMockSBN()
276 when(sbn.getUserId()).thenReturn(userid); in makeMockSBN()
277 when(sbn.getUser()).thenReturn(new UserHandle(userid)); in makeMockSBN()
278 when(sbn.getKey()).thenReturn("MOCK:"+userid+"|"+pkg+"|"+id+"|"+tag); in makeMockSBN()
279 return sbn; in makeMockSBN()
291 final StatusBarNotification sbn = makeMockSBN(userid, "android", in makeMockDungeon() local
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/
DNotificationTestHelper.java85 StatusBarNotification sbn = new StatusBarNotification("com.android.systemui", in createRow() local
88 NotificationData.Entry entry = new NotificationData.Entry(sbn); in createRow()
90 entry.createIcons(mContext, sbn); in createRow()

12