/frameworks/base/packages/SystemUI/src/com/android/systemui/ |
ForegroundServiceController.java | 23 * @param sbn notification that was just posted 26 void addNotification(StatusBarNotification sbn, int importance); 29 * @param sbn notification that was just changed in some way 32 void updateNotification(StatusBarNotification sbn, int newImportance); 35 * @param sbn notification that was just canceled 37 boolean removeNotification(StatusBarNotification sbn); 47 * @param sbn 48 * @return true if sbn is the system-provided "dungeon" (list of running foreground services). 50 boolean isDungeonNotification(StatusBarNotification sbn); 53 * @return true if sbn is one of the window manager "drawing over other apps" notification [all...] |
ForegroundServiceControllerImpl.java | 109 public void addNotification(StatusBarNotification sbn, int importance) { 110 updateNotification(sbn, importance); 114 public boolean removeNotification(StatusBarNotification sbn) { 116 final UserServices userServices = mUserServices.get(sbn.getUserId()); 121 sbn.getUserId(), sbn)); 125 if (isDungeonNotification(sbn)) { 132 return userServices.removeNotification(sbn.getPackageName(), sbn.getKey()); 138 public void updateNotification(StatusBarNotification sbn, int newImportance) [all...] |
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
CrossProfileNotificationListenerService.java | 34 public void onNotificationPosted(StatusBarNotification sbn) { 35 Log.i(TAG, "onNotificationPosted(" + sbn + ")"); 36 sendBroadcastForNotification(sbn, ACTION_NOTIFICATION_POSTED); 40 public void onNotificationRemoved(StatusBarNotification sbn) { 41 Log.i(TAG, "onNotificationRemoved(" + sbn + ")"); 42 sendBroadcastForNotification(sbn, ACTION_NOTIFICATION_REMOVED); 57 private void sendBroadcastForNotification(StatusBarNotification sbn, String action) { 58 if (NOTIFICATION_CHANNEL.equals(sbn.getNotification().getChannelId())) { 62 + sbn.getNotification().getChannelId());
|
/frameworks/base/services/core/java/com/android/server/notification/ |
GroupHelper.java | 48 public void onNotificationPosted(StatusBarNotification sbn, boolean autogroupSummaryExists) { 49 if (DEBUG) Log.i(TAG, "POSTED " + sbn.getKey()); 52 if (!sbn.isAppGroup()) { 57 = mUngroupedNotifications.get(sbn.getUserId()); 61 mUngroupedNotifications.put(sbn.getUserId(), ungroupedNotificationsByUser); 63 = ungroupedNotificationsByUser.get(sbn.getPackageName()); 68 notificationsForPackage.add(sbn.getKey()); 69 ungroupedNotificationsByUser.put(sbn.getPackageName(), notificationsForPackage); 77 adjustAutogroupingSummary(sbn.getUserId(), sbn.getPackageName() [all...] |
NotificationChannelExtractor.java | 45 record.updateNotificationChannel(mConfig.getNotificationChannel(record.sbn.getPackageName(), 46 record.sbn.getUid(), record.getChannel().getId(), false));
|
/frameworks/base/core/java/com/android/internal/util/ |
NotificationMessagingUtil.java | 49 public boolean isImportantMessaging(StatusBarNotification sbn, int importance) { 54 return hasMessagingStyle(sbn) || (isCategoryMessage(sbn) && isDefaultMessagingApp(sbn)); 57 public boolean isMessaging(StatusBarNotification sbn) { 58 return hasMessagingStyle(sbn) || isDefaultMessagingApp(sbn) || isCategoryMessage(sbn); 62 private boolean isDefaultMessagingApp(StatusBarNotification sbn) { 63 final int userId = sbn.getUserId() [all...] |
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
NotificationGroupManager.java | 59 public boolean isGroupExpanded(StatusBarNotification sbn) { 60 NotificationGroup group = mGroupMap.get(getGroupKey(sbn)); 67 public void setGroupExpanded(StatusBarNotification sbn, boolean expanded) { 68 NotificationGroup group = mGroupMap.get(getGroupKey(sbn)); 91 * @param sbn the notification the entry has, which doesn't need to be the same as it's internal 95 final StatusBarNotification sbn) { 96 String groupKey = getGroupKey(sbn); 105 if (isGroupChild(sbn)) { 122 final StatusBarNotification sbn = added.notification; local 123 boolean isGroupChild = isGroupChild(sbn); 491 final StatusBarNotification sbn = entry.notification; local 497 mIsolatedEntries.put(sbn.getKey(), sbn); local 521 StatusBarNotification sbn = entry.notification; local [all...] |
NotificationListenerWithPlugins.java | 83 public boolean onPluginNotificationPosted(StatusBarNotification sbn, 86 if (plugin.onNotificationPosted(sbn, rankingMap)) { 97 public boolean onPluginNotificationRemoved(StatusBarNotification sbn, 100 if (plugin.onNotificationRemoved(sbn, rankingMap)) { 137 public void addNotification(StatusBarNotification sbn) { 138 onNotificationPosted(sbn, getRankingMap()); 142 public void removeNotification(StatusBarNotification sbn) { 143 onNotificationRemoved(sbn, getRankingMap());
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
NotificationListener.java | 64 for (StatusBarNotification sbn : notifications) { 65 mEntryManager.addNotification(sbn, currentRanking); 71 public void onNotificationPosted(final StatusBarNotification sbn, 73 if (DEBUG) Log.d(TAG, "onNotificationPosted: " + sbn); 74 if (sbn != null && !onPluginNotificationPosted(sbn, rankingMap)) { 76 processForRemoteInput(sbn.getNotification(), mContext); 77 String key = sbn.getKey(); 86 && mPresenter.getGroupManager().isChildInGroupWithSummary(sbn)) { 88 Log.d(TAG, "Ignoring group child due to existing summary: " + sbn); [all...] |
/cts/apps/CtsVerifier/src/com/android/cts/verifier/notifications/ |
MockListener.java | 147 public void onNotificationPosted(StatusBarNotification sbn, RankingMap rankingMap) { 148 if (!mTestPackages.contains(sbn.getPackageName())) { return; } 149 Log.d(TAG, "posted: " + sbn.getTag()); 150 mPosted.add(sbn.getTag()); 151 mPostedNotifications.add(sbn.getNotification()); 154 notification.put(JSON_TAG, sbn.getTag()); 155 notification.put(JSON_ID, sbn.getId()); 156 notification.put(JSON_PACKAGE, sbn.getPackageName()); 157 notification.put(JSON_WHEN, sbn.getNotification().when); 158 notification.put(JSON_ICON, sbn.getNotification().icon) [all...] |
/cts/tests/app/app/src/android/app/stubs/ |
MockNotificationListener.java | 76 public void onNotificationPosted(StatusBarNotification sbn, RankingMap rankingMap) { 77 if (!mTestPackages.contains(sbn.getPackageName())) { return; } 78 mPosted.add(sbn); 82 public void onNotificationRemoved(StatusBarNotification sbn, RankingMap rankingMap) { 83 if (!mTestPackages.contains(sbn.getPackageName())) { return; } 84 mRemoved.add(sbn);
|
/cts/tests/tests/notificationlegacy/src/android/app/notification/legacy/cts/ |
MockNotificationListener.java | 76 public void onNotificationPosted(StatusBarNotification sbn, RankingMap rankingMap) { 77 if (!mTestPackages.contains(sbn.getPackageName())) { return; } 78 mPosted.add(sbn); 82 public void onNotificationRemoved(StatusBarNotification sbn, RankingMap rankingMap) { 83 if (!mTestPackages.contains(sbn.getPackageName())) { return; } 84 mRemoved.add(sbn);
|
/packages/apps/Launcher3/src/com/android/launcher3/notification/ |
NotificationListener.java | 222 public void onNotificationPosted(final StatusBarNotification sbn) { 223 super.onNotificationPosted(sbn); 224 if (sbn == null) { 228 mWorkerHandler.obtainMessage(MSG_NOTIFICATION_POSTED, new NotificationPostedMsg(sbn)) 231 sStatusBarNotificationsChangedListener.onNotificationPosted(sbn); 243 NotificationPostedMsg(StatusBarNotification sbn) { 244 packageUserKey = PackageUserKey.fromNotification(sbn); 245 notificationKey = NotificationKeyData.fromNotification(sbn); 246 shouldBeFilteredOut = shouldBeFilteredOut(sbn); 251 public void onNotificationRemoved(final StatusBarNotification sbn) { [all...] |
/frameworks/base/core/java/android/service/notification/ |
NotificationAssistantService.java | 75 * @param sbn the notification to snooze 78 abstract public void onNotificationSnoozedUntilContext(StatusBarNotification sbn, 84 * @param sbn the new notification 87 abstract public Adjustment onNotificationEnqueued(StatusBarNotification sbn); 103 ** @param sbn A data structure encapsulating at least the original information (tag and id) 112 public void onNotificationRemoved(StatusBarNotification sbn, RankingMap rankingMap, 114 onNotificationRemoved(sbn, rankingMap, reason); 172 StatusBarNotification sbn; local 174 sbn = sbnHolder.get(); 181 args.arg1 = sbn; 190 StatusBarNotification sbn; local 219 StatusBarNotification sbn = (StatusBarNotification) args.arg1; local 236 StatusBarNotification sbn = (StatusBarNotification) args.arg1; local [all...] |
/frameworks/base/packages/ExtServices/tests/src/android/ext/services/notification/ |
AssistantTest.java | 130 StatusBarNotification sbn = new StatusBarNotification(pkg, pkg, 0, tag, uid, uid, n, local 133 return sbn; 136 private Ranking generateRanking(StatusBarNotification sbn, NotificationChannel channel) { 140 when(mockRanking.getKey()).thenReturn(sbn.getKey()); 153 StatusBarNotification sbn = generateSbn(pkg, uid, channel, tag, null); local 154 mAssistant.setFakeRanking(generateRanking(sbn, channel)); 155 mAssistant.onNotificationPosted(sbn, mock(RankingMap.class)); 161 sbn, mock(RankingMap.class), stats, NotificationListenerService.REASON_CANCEL); 166 StatusBarNotification sbn = generateSbn(PKG1, UID1, P1C1, null, null); local 168 mAssistant.setFakeRanking(generateRanking(sbn, P1C1)) 179 StatusBarNotification sbn = generateSbn(PKG1, UID1, P1C1, "new one!", null); local 195 StatusBarNotification sbn = generateSbn(PKG1, UID1, P1C3, "new one!", null); local 206 StatusBarNotification sbn = generateSbn(PKG1, UID1, P1C1, "no", "I HAVE A GROUP"); local 229 StatusBarNotification sbn = generateSbn(PKG1, UID1, P1C1, "no", "I HAVE A GROUP"); local 249 StatusBarNotification sbn = generateSbn(PKG1, UID1, P1C1, "no", null); local 267 StatusBarNotification sbn = generateSbn(PKG1, UID1, P1C1, "no", null); local 287 StatusBarNotification sbn = generateSbn(PKG1, UID1, P1C1, "no", null); local 307 StatusBarNotification sbn = generateSbn(PKG2, UID2, P2C1, "new app!", null); local 319 StatusBarNotification sbn = generateSbn(PKG1, UID1, P1C2, "new app!", null); local [all...] |
/packages/services/Car/tests/InstrumentClusterRendererSample/src/com/android/car/cluster/sample/ |
MessagingNotificationHandler.java | 47 StatusBarNotification sbn = (StatusBarNotification) msg.obj; local 48 Notification notification = sbn.getNotification(); 54 if (MessagingConverter.canConvert(sbn)) { 55 MessageContactDetails data = MessagingConverter.convert(sbn); 59 Log.w(TAG, "Can't convert message: " + sbn);
|
MessagingConverter.java | 34 public static boolean canConvert(StatusBarNotification sbn) { 35 Notification notification = sbn.getNotification(); 42 CarExtender ce = new CarExtender(sbn.getNotification()); 76 public static MessageContactDetails convert(StatusBarNotification sbn) { 77 CarExtender ce = new CarExtender(sbn.getNotification()); 82 largeIcon = sbn.getNotification().largeIcon;
|
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ |
NotificationRecordTest.java | 187 StatusBarNotification sbn = getNotification(PKG_N_MR1, true /* noisy */, local 191 NotificationRecord record = new NotificationRecord(mMockContext, sbn, defaultChannel); 200 StatusBarNotification sbn = getNotification(PKG_N_MR1, true /* noisy */, local 204 NotificationRecord record = new NotificationRecord(mMockContext, sbn, defaultChannel); 214 StatusBarNotification sbn = getNotification(PKG_N_MR1, true /* noisy */, local 218 NotificationRecord record = new NotificationRecord(mMockContext, sbn, defaultChannel); 226 StatusBarNotification sbn = getNotification(PKG_N_MR1, false /* noisy */, local 230 NotificationRecord record = new NotificationRecord(mMockContext, sbn, defaultChannel); 239 StatusBarNotification sbn = getNotification(PKG_O, true /* noisy */, local 243 NotificationRecord record = new NotificationRecord(mMockContext, sbn, channel) 252 StatusBarNotification sbn = getNotification(PKG_N_MR1, false \/* noisy *\/, local 264 StatusBarNotification sbn = getNotification(PKG_N_MR1, false \/* noisy *\/, local 277 StatusBarNotification sbn = getNotification(PKG_N_MR1, false \/* noisy *\/, local 289 StatusBarNotification sbn = getNotification(PKG_O, false \/* noisy *\/, local 299 StatusBarNotification sbn = getNotification(PKG_N_MR1, true \/* noisy *\/, local 310 StatusBarNotification sbn = getNotification(PKG_N_MR1, true \/* noisy *\/, local 322 StatusBarNotification sbn = getNotification(PKG_N_MR1, true \/* noisy *\/, local 332 StatusBarNotification sbn = getNotification(PKG_O, true \/* noisy *\/, local 341 StatusBarNotification sbn = getNotification(PKG_N_MR1, true \/* noisy *\/, local 351 StatusBarNotification sbn = getNotification(PKG_N_MR1, true \/* noisy *\/, local 362 StatusBarNotification sbn = getNotification(PKG_N_MR1, true \/* noisy *\/, local 381 StatusBarNotification sbn = getNotification(PKG_O, true \/* noisy *\/, local 397 StatusBarNotification sbn = getNotification(PKG_O, true \/* noisy *\/, local 406 StatusBarNotification sbn = getNotification(PKG_O, true \/* noisy *\/, local 415 StatusBarNotification sbn = getNotification(PKG_O, true \/* noisy *\/, local 428 StatusBarNotification sbn = getNotification(PKG_O, true \/* noisy *\/, local 439 StatusBarNotification sbn = getNotification(PKG_O, true \/* noisy *\/, local 448 StatusBarNotification sbn = getNotification(PKG_O, true \/* noisy *\/, local 458 StatusBarNotification sbn = getNotification(PKG_O, true \/* noisy *\/, local 469 StatusBarNotification sbn = getNotification(PKG_O, true \/* noisy *\/, local 485 StatusBarNotification sbn = getNotification(PKG_O, true \/* noisy *\/, local 528 StatusBarNotification sbn = getNotification(PKG_O, true \/* noisy *\/, local 546 StatusBarNotification sbn = getNotification(PKG_O, true \/* noisy *\/, local 558 StatusBarNotification sbn = getNotification(PKG_O, true \/* noisy *\/, local 575 StatusBarNotification sbn = getNotification(PKG_O, true \/* noisy *\/, local 593 StatusBarNotification sbn = getNotification(PKG_O, true \/* noisy *\/, local 607 StatusBarNotification sbn = getNotification(PKG_O, false \/* noisy *\/, local 620 StatusBarNotification sbn = getNotification(PKG_O, false \/* noisy *\/, local 634 StatusBarNotification sbn = getNotification(PKG_O, false \/* noisy *\/, local 654 StatusBarNotification sbn = local 676 StatusBarNotification sbn = local 692 StatusBarNotification sbn = local [all...] |
NotificationManagerServiceTest.java | 314 StatusBarNotification sbn = new StatusBarNotification(pkg, pkg, uid, "tag", uid, 0, local 316 return sbn; 327 StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, id, "tag", mUid, 0, local 329 return new NotificationRecord(mContext, sbn, channel); 347 StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 1, "tag", mUid, 0, local 349 return new NotificationRecord(mContext, sbn, channel); 519 final StatusBarNotification sbn = generateNotificationRecord(channel).sbn; local 521 sbn.getId(), sbn.getNotification(), sbn.getUserId()) 536 final StatusBarNotification sbn = generateNotificationRecord(channel).sbn; local 565 StatusBarNotification sbn = generateNotificationRecord(channel).sbn; local 619 final StatusBarNotification sbn = generateNotificationRecord(null).sbn; local 632 final StatusBarNotification sbn = generateNotificationRecord(null).sbn; local 684 final StatusBarNotification sbn = r.sbn; local 697 final StatusBarNotification sbn = generateNotificationRecord(null).sbn; local 749 final StatusBarNotification sbn = generateNotificationRecord(null).sbn; local 790 final StatusBarNotification sbn = generateNotificationRecord(null).sbn; local 804 final StatusBarNotification sbn = generateNotificationRecord(null).sbn; local 818 final StatusBarNotification sbn = generateNotificationRecord(null).sbn; local 831 final StatusBarNotification sbn = generateNotificationRecord(null).sbn; local 845 final StatusBarNotification sbn = generateNotificationRecord(null).sbn; local 932 final StatusBarNotification sbn = generateNotificationRecord(null).sbn; local 946 final StatusBarNotification sbn = generateNotificationRecord(null).sbn; local 1111 final StatusBarNotification sbn = generateNotificationRecord(null).sbn; local 2090 StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 1, "tag", mUid, 0, local 2123 StatusBarNotification sbn = new StatusBarNotification("a", "a", 0, "tag", mUid, 0, local 2290 StatusBarNotification sbn = new StatusBarNotification(preOPkg, preOPkg, 9, "tag", preOUid, local [all...] |
ZenModeFilteringTest.java | 72 StatusBarNotification sbn = mock(StatusBarNotification.class); local 73 when(sbn.getNotification()).thenReturn(mock(Notification.class)); 74 return new NotificationRecord(mContext, sbn, c); 98 r.sbn.getNotification().category = Notification.CATEGORY_ALARM; 105 r.sbn.getNotification().category = Notification.CATEGORY_CALL; 122 when(r.sbn.getPackageName()).thenReturn("android"); 123 when(r.sbn.getId()).thenReturn(SystemMessage.NOTE_ZEN_UPGRADE); 134 when(r.sbn.getPackageName()).thenReturn("android"); 135 when(r.sbn.getId()).thenReturn(SystemMessage.NOTE_ACCOUNT_CREDENTIAL_PERMISSION); 145 when(r.sbn.getPackageName()).thenReturn("android2") [all...] |
NotificationIntrusivenessExtractorTest.java | 49 StatusBarNotification sbn = new StatusBarNotification("", "", 0, "", 0, local 51 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); 66 StatusBarNotification sbn = new StatusBarNotification("", "", 0, "", 0, local 69 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); 84 StatusBarNotification sbn = new StatusBarNotification("", "", 0, "", 0, local 88 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel);
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/car/ |
CarNotificationEntryManager.java | 44 public boolean shouldPeek(NotificationData.Entry entry, StatusBarNotification sbn) { 52 return super.shouldPeek(entry, sbn);
|
/packages/experimental/NotificationListenerSample/src/com/android/example/notificationlistener/ |
Listener.java | 99 public Delta(StatusBarNotification sbn, RankingMap rankingMap) { 100 mSbn = sbn; 206 StatusBarNotification sbn = sNotifications.get(mTmpRanking.getRank()); 207 if ((sbn.getNotification().flags & Notification.FLAG_AUTO_CANCEL) != 0 && 208 sbn.getNotification().contentIntent != null) { 210 sbn.getNotification().contentIntent.send(); 212 Log.d(TAG, "failed to send intent for " + sbn.getKey(), e); 223 StatusBarNotification sbn = sNotifications.get(mTmpRanking.getRank()); 224 if (sbn.getNotification().contentIntent != null) { 226 sbn.getNotification().contentIntent.send() [all...] |
/frameworks/base/packages/SystemUI/plugin/src/com/android/systemui/plugins/ |
NotificationListenerController.java | 33 default boolean onNotificationPosted(StatusBarNotification sbn, RankingMap rankingMap) { 36 default boolean onNotificationRemoved(StatusBarNotification sbn, RankingMap rankingMap) { 58 void addNotification(StatusBarNotification sbn); 59 void removeNotification(StatusBarNotification sbn);
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/ |
SmartReplyControllerTest.java | 72 StatusBarNotification sbn = mock(StatusBarNotification.class); local 73 when(sbn.getNotification()).thenReturn(mNotification); 74 when(sbn.getKey()).thenReturn(TEST_NOTIFICATION_KEY); 75 mEntry = new NotificationData.Entry(sbn); 80 StatusBarNotification sbn = mock(StatusBarNotification.class); local 81 when(sbn.getKey()).thenReturn(TEST_NOTIFICATION_KEY); 84 eq(TEST_CHOICE_TEXT), eq(true))).thenReturn(sbn); 100 StatusBarNotification sbn = mock(StatusBarNotification.class); local 101 when(sbn.getKey()).thenReturn(TEST_NOTIFICATION_KEY); 104 eq(TEST_CHOICE_TEXT), eq(true))).thenReturn(sbn); [all...] |