Home
last modified time | relevance | path

Searched refs:Notification (Results 1 – 25 of 337) sorted by relevance

12345678910>>...14

/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DNotificationTest.java29 import android.app.Notification;
73 Notification.Builder nb = new Notification.Builder(mContext, "channel"); in testDoesNotStripsExtenders()
74 nb.extend(new Notification.CarExtender().setColor(Color.RED)); in testDoesNotStripsExtenders()
75 nb.extend(new Notification.TvExtender().setChannelId("different channel")); in testDoesNotStripsExtenders()
76 nb.extend(new Notification.WearableExtender().setDismissalId("dismiss")); in testDoesNotStripsExtenders()
77 Notification before = nb.build(); in testDoesNotStripsExtenders()
78 Notification after = Notification.Builder.maybeCloneStrippedForDelivery(before); in testDoesNotStripsExtenders()
82 assertEquals("different channel", new Notification.TvExtender(before).getChannelId()); in testDoesNotStripsExtenders()
83 assertEquals(Color.RED, new Notification.CarExtender(before).getColor()); in testDoesNotStripsExtenders()
84 assertEquals("dismiss", new Notification.WearableExtender(before).getDismissalId()); in testDoesNotStripsExtenders()
[all …]
DNotificationComparatorTest.java29 import android.app.Notification;
119 Notification nonInterruptiveNotif = new Notification.Builder(mContext, TEST_CHANNEL_ID) in setUp()
120 .setCategory(Notification.CATEGORY_CALL) in setUp()
121 .setFlag(Notification.FLAG_FOREGROUND_SERVICE, true) in setUp()
131 Notification n1 = new Notification.Builder(mContext, TEST_CHANNEL_ID) in setUp()
132 .setCategory(Notification.CATEGORY_CALL) in setUp()
133 .setFlag(Notification.FLAG_FOREGROUND_SERVICE, true) in setUp()
141 Notification n2 = new Notification.Builder(mContext, TEST_CHANNEL_ID) in setUp()
142 .setCategory(Notification.CATEGORY_CALL) in setUp()
143 .setFlag(Notification.FLAG_FOREGROUND_SERVICE, true) in setUp()
[all …]
DNotificationShellCmdTest.java35 import android.app.Notification;
116 Notification captureNotification(String aTag) throws Exception { in captureNotification()
117 ArgumentCaptor<Notification> notificationCaptor = in captureNotification()
118 ArgumentCaptor.forClass(Notification.class); in captureNotification()
137 final Notification captured = captureNotification(aTag); in testBasic()
138 assertEquals(aText, captured.extras.getString(Notification.EXTRA_TEXT)); in testBasic()
139 assertEquals(aTitle, captured.extras.getString(Notification.EXTRA_TITLE)); in testBasic()
147 final Notification captured = captureNotification(aTag); in testIcon()
162 final Notification captured = captureNotification(aTag); in testBigText()
163 assertSame(captured.getNotificationStyle(), Notification.BigTextStyle.class); in testBigText()
[all …]
DCriticalNotificationExtractorTest.java26 import android.app.Notification;
60 assertCriticality(Notification.CATEGORY_CAR_EMERGENCY, in testExtractCritically_nonsupporting()
63 assertCriticality(Notification.CATEGORY_CAR_WARNING, CriticalNotificationExtractor.NORMAL); in testExtractCritically_nonsupporting()
65 assertCriticality(Notification.CATEGORY_CAR_INFORMATION, in testExtractCritically_nonsupporting()
68 assertCriticality(Notification.CATEGORY_CALL, in testExtractCritically_nonsupporting()
78 assertCriticality(Notification.CATEGORY_CAR_EMERGENCY, in testExtractCritically()
81 assertCriticality(Notification.CATEGORY_CAR_WARNING, in testExtractCritically()
84 assertCriticality(Notification.CATEGORY_CAR_INFORMATION, in testExtractCritically()
87 assertCriticality(Notification.CATEGORY_CALL, in testExtractCritically()
100 final Notification.Builder builder = new Notification.Builder(getContext()) in generateRecord()
[all …]
DNotificationIntrusivenessExtractorTest.java28 import android.app.Notification;
44 final Notification.Builder builder = new Notification.Builder(getContext()) in testNonIntrusive()
48 Notification n = builder.build(); in testNonIntrusive()
59 final Notification.Builder builder = new Notification.Builder(getContext()) in testIntrusive_fillScreen()
66 Notification n = builder.build(); in testIntrusive_fillScreen()
78 final Notification.Builder builder = new Notification.Builder(getContext()) in testOldNotificationsNotIntrusive()
85 Notification n = builder.build(); in testOldNotificationsNotIntrusive()
DNotificationChannelExtractorTest.java30 import android.app.Notification;
59 final Notification.Builder builder = new Notification.Builder(getContext()) in testExtractsUpdatedChannel()
62 Notification n = builder.build(); in testExtractsUpdatedChannel()
85 final Notification.Builder builder = new Notification.Builder(getContext()) in testInvalidShortcutFlagEnabled_looksUpCorrectChannel()
87 .setStyle(new Notification.MessagingStyle("name")) in testInvalidShortcutFlagEnabled_looksUpCorrectChannel()
89 Notification n = builder.build(); in testInvalidShortcutFlagEnabled_looksUpCorrectChannel()
113 final Notification.Builder builder = new Notification.Builder(getContext()) in testInvalidShortcutFlagDisabled_looksUpCorrectChannel()
115 .setStyle(new Notification.MessagingStyle("name")) in testInvalidShortcutFlagDisabled_looksUpCorrectChannel()
117 Notification n = builder.build(); in testInvalidShortcutFlagDisabled_looksUpCorrectChannel()
/frameworks/base/core/tests/coretests/src/android/app/
DNotificationTest.java70 Notification n = new Notification.Builder(mContext, "test") in testColorizedByPermission()
71 .setFlag(Notification.FLAG_CAN_COLORIZE, true) in testColorizedByPermission()
76 n = new Notification.Builder(mContext, "test") in testColorizedByPermission()
77 .setFlag(Notification.FLAG_CAN_COLORIZE, true) in testColorizedByPermission()
81 n = new Notification.Builder(mContext, "test") in testColorizedByPermission()
82 .setFlag(Notification.FLAG_CAN_COLORIZE, false) in testColorizedByPermission()
90 Notification n = new Notification.Builder(mContext, "test") in testColorizedByForeground()
91 .setFlag(Notification.FLAG_FOREGROUND_SERVICE, true) in testColorizedByForeground()
96 n = new Notification.Builder(mContext, "test") in testColorizedByForeground()
97 .setFlag(Notification.FLAG_FOREGROUND_SERVICE, true) in testColorizedByForeground()
[all …]
/frameworks/base/services/core/java/com/android/server/notification/
DNotificationHistoryProtoHelper.java27 import com.android.server.notification.NotificationHistoryProto.Notification;
98 case (int) NotificationHistoryProto.Notification.PACKAGE: in readNotification()
99 pkg = parser.readString(Notification.PACKAGE); in readNotification()
103 case (int) Notification.PACKAGE_INDEX: in readNotification()
104 pkg = stringPool.get(parser.readInt(Notification.PACKAGE_INDEX) - 1); in readNotification()
107 case (int) Notification.CHANNEL_NAME: in readNotification()
108 String channelName = parser.readString(Notification.CHANNEL_NAME); in readNotification()
112 case (int) Notification.CHANNEL_NAME_INDEX: in readNotification()
114 Notification.CHANNEL_NAME_INDEX) - 1)); in readNotification()
116 case (int) Notification.CHANNEL_ID: in readNotification()
[all …]
/frameworks/base/tests/StatusBar/src/com/android/statusbartest/
DNotificationTestList.java24 import android.app.Notification;
119 Notification n = new Notification.Builder(NotificationTestList.this,
131 Notification n = new Notification.Builder(NotificationTestList.this,
149 Notification n = new Notification.Builder(NotificationTestList.this,
166 Notification n = new Notification.Builder(NotificationTestList.this, "min")
172 n = new Notification.Builder(NotificationTestList.this, "low")
178 n = new Notification.Builder(NotificationTestList.this, "default")
187 n = new Notification.Builder(NotificationTestList.this, "low")
199 Notification n = new Notification.Builder(NotificationTestList.this, "min")
205 n = new Notification.Builder(NotificationTestList.this, "low")
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/people/
DNotificationHelperTest.java18 import static android.app.Notification.CATEGORY_MISSED_CALL;
32 import android.app.Notification;
72 private final Notification mNotification1 = new Notification.Builder(mContext, "test")
76 .setStyle(new Notification.MessagingStyle(PERSON)
77 .addMessage(new Notification.MessagingStyle.Message(
79 .addMessage(new Notification.MessagingStyle.Message(
81 .addMessage(new Notification.MessagingStyle.Message(
86 private final Notification mNotification2 = new Notification.Builder(mContext, "test")
90 .setStyle(new Notification.MessagingStyle(PERSON)
91 .addMessage(new Notification.MessagingStyle.Message(
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/
DNotificationEntryTest.java19 import static android.app.Notification.CATEGORY_ALARM;
20 import static android.app.Notification.CATEGORY_CALL;
21 import static android.app.Notification.CATEGORY_EVENT;
22 import static android.app.Notification.CATEGORY_MESSAGE;
23 import static android.app.Notification.CATEGORY_REMINDER;
35 import android.app.Notification;
79 Notification.Builder n = new Notification.Builder(mContext, "") in setup()
96 mEntry.getSbn().getNotification().flags = Notification.FLAG_FOREGROUND_SERVICE; in testIsExemptFromDndVisualSuppression_foreground()
104 Notification.Builder n = new Notification.Builder(mContext, "") in testIsExemptFromDndVisualSuppression_media()
105 .setStyle(new Notification.MediaStyle() in testIsExemptFromDndVisualSuppression_media()
[all …]
DNotificationRankingManagerTest.kt19 import android.app.Notification in <lambda>()
101 Notification.Builder(mContext, "test") in <lambda>()
115 Notification.Builder(mContext, "test") in <lambda>()
130 val aN = Notification.Builder(mContext, "test") in <lambda>()
131 .setStyle(Notification.MessagingStyle("")) in <lambda>()
145 val bN = Notification.Builder(mContext, "test") in <lambda>()
146 .setStyle(Notification.MessagingStyle("")) in <lambda>()
168 val aN = Notification.Builder(mContext, "test") in <lambda>()
169 .setStyle(Notification.MessagingStyle("")) in <lambda>()
185 val bN = Notification.Builder(mContext, "test") in <lambda>()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/people/
DNotificationHelper.java19 import static android.app.Notification.CATEGORY_MISSED_CALL;
20 import static android.app.Notification.EXTRA_MESSAGES;
21 import static android.app.Notification.EXTRA_PEOPLE_LIST;
24 import android.app.Notification;
69 Notification n1 = e1.getSbn().getNotification();
70 Notification n2 = e2.getSbn().getNotification();
82 List<Notification.MessagingStyle.Message> messages1 =
84 List<Notification.MessagingStyle.Message> messages2 =
88 Notification.MessagingStyle.Message message1 = messages1.get(0);
89 Notification.MessagingStyle.Message message2 = messages2.get(0);
[all …]
/frameworks/base/tests/notification/src/com/android/frameworks/tests/notification/
DNotificationTests.java100 public static Notification makeBigTextNotification(Context context, int update, int id, in makeBigTextNotification()
146 Notification.BigTextStyle bigTextStyle = new Notification.BigTextStyle() in makeBigTextNotification()
148 Notification bigText = new Notification.Builder(context) in makeBigTextNotification()
155 .setPriority(Notification.PRIORITY_HIGH) in makeBigTextNotification()
159 .setDefaults(Notification.DEFAULT_SOUND) in makeBigTextNotification()
165 public static Notification makeUploadNotification(Context context, int progress, long when) { in makeUploadNotification()
166 Notification.Builder uploadNotification = new Notification.Builder(context) in makeUploadNotification()
169 .setPriority(Notification.PRIORITY_MIN) in makeUploadNotification()
241 public static String summarize(Notification n) { in summarize()
243 n.extras.get(Notification.EXTRA_TITLE), in summarize()
[all …]
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/
DBubbleTest.java29 import android.app.Notification;
55 private Notification mNotif;
76 Notification.BubbleMetadata metadata = new Notification.BubbleMetadata.Builder( in setUp()
90 doReturn(Notification.Style.class).when(mNotif).getNotificationStyle(); in testGetUpdateMessage_default()
91 mExtras.putCharSequence(Notification.EXTRA_TEXT, msg); in testGetUpdateMessage_default()
98 doReturn(Notification.BigTextStyle.class).when(mNotif).getNotificationStyle(); in testGetUpdateMessage_bigText()
99 mExtras.putCharSequence(Notification.EXTRA_TEXT, "A small hello there."); in testGetUpdateMessage_bigText()
100 mExtras.putCharSequence(Notification.EXTRA_BIG_TEXT, msg); in testGetUpdateMessage_bigText()
108 doReturn(Notification.MediaStyle.class).when(mNotif).getNotificationStyle(); in testGetUpdateMessage_media()
116 doReturn(Notification.InboxStyle.class).when(mNotif).getNotificationStyle(); in testGetUpdateMessage_inboxStyle()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/
DNotificationPanelLogger.java79 final Notifications.Notification[] proto_array = in toNotificationProto()
80 new Notifications.Notification[visibleNotifications.size()]; in toNotificationProto()
85 final Notifications.Notification proto = new Notifications.Notification(); in toNotificationProto()
113 case BUCKET_MEDIA_CONTROLS : return Notifications.Notification.SECTION_MEDIA_CONTROLS; in toNotificationSection()
114 case BUCKET_HEADS_UP: return Notifications.Notification.SECTION_HEADS_UP; in toNotificationSection()
116 return Notifications.Notification.SECTION_FOREGROUND_SERVICE; in toNotificationSection()
117 case BUCKET_PEOPLE: return Notifications.Notification.SECTION_PEOPLE; in toNotificationSection()
118 case BUCKET_ALERTING: return Notifications.Notification.SECTION_ALERTING; in toNotificationSection()
119 case BUCKET_SILENT: return Notifications.Notification.SECTION_SILENT; in toNotificationSection()
121 return Notifications.Notification.SECTION_UNKNOWN; in toNotificationSection()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/
DNotificationUiAdjustmentTest.java20 import android.app.Notification;
47 Notification.Action action = in needReinflate_differentLength()
62 Notification.Action firstAction = in needReinflate_differentLabels()
64 Notification.Action secondAction = in needReinflate_differentLabels()
80 Notification.Action firstAction = in needReinflate_differentIcons()
82 Notification.Action secondAction = in needReinflate_differentIcons()
102 Notification.Action firstAction = in needReinflate_differentPendingIntent()
105 Notification.Action secondAction = in needReinflate_differentPendingIntent()
128 Notification.Action firstAction = in needReinflate_differentChoices()
132 Notification.Action secondAction = in needReinflate_differentChoices()
[all …]
DSbnBuilder.java20 import android.app.Notification;
39 @Nullable private Notification mNotification;
40 @Nullable private Notification.Builder mNotificationBuilder;
41 private Notification.BubbleMetadata mBubbleMetadata;
65 Notification notification; in build()
71 notification = new Notification(); in build()
125 public SbnBuilder setNotification(Notification notification) { in setNotification()
156 public Notification.Builder modifyNotification(Context context) { in modifyNotification()
158 mNotificationBuilder = new Notification.Builder(context, mNotification); in modifyNotification()
161 mNotificationBuilder = new Notification.Builder(context); in modifyNotification()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/usb/
DStorageNotification.java20 import android.app.Notification;
21 import android.app.Notification.Action;
213 Notification.Builder builder = in updateMissingPrivateVolumes()
214 new Notification.Builder(mContext, NotificationChannels.STORAGE) in updateMissingPrivateVolumes()
221 .setStyle(new Notification.BigTextStyle().bigText(text)) in updateMissingPrivateVolumes()
222 .setVisibility(Notification.VISIBILITY_PUBLIC) in updateMissingPrivateVolumes()
224 .setCategory(Notification.CATEGORY_SYSTEM) in updateMissingPrivateVolumes()
226 .extend(new Notification.TvExtender()); in updateMissingPrivateVolumes()
243 Notification.Builder builder = in onDiskScannedInternal()
244 new Notification.Builder(mContext, NotificationChannels.STORAGE) in onDiskScannedInternal()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/
DNotificationInlineImageResolver.java20 import android.app.Notification;
145 public void preloadImages(Notification notification) { in preloadImages()
170 private void retrieveWantedUriSet(Notification notification) { in retrieveWantedUriSet()
173 List<Notification.MessagingStyle.Message> messageList; in retrieveWantedUriSet()
174 List<Notification.MessagingStyle.Message> historicList; in retrieveWantedUriSet()
182 messages = extras.getParcelableArray(Notification.EXTRA_MESSAGES); in retrieveWantedUriSet()
184 Notification.MessagingStyle.Message.getMessagesFromBundleArray(messages); in retrieveWantedUriSet()
186 for (Notification.MessagingStyle.Message message : messageList) { in retrieveWantedUriSet()
193 historicMessages = extras.getParcelableArray(Notification.EXTRA_HISTORIC_MESSAGES); in retrieveWantedUriSet()
195 Notification.MessagingStyle.Message.getMessagesFromBundleArray(historicMessages); in retrieveWantedUriSet()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/tv/
DVpnStatusObserver.kt21 import android.app.Notification in <lambda>()
114 Notification.Builder(mContext, NOTIFICATION_CHANNEL_TV_VPN) in <lambda>()
116 .setVisibility(Notification.VISIBILITY_PUBLIC) in <lambda>()
117 .setCategory(Notification.CATEGORY_SYSTEM) in <lambda>()
118 .extend(Notification.TvExtender()) in <lambda>()
124 Notification.Builder(mContext, NOTIFICATION_CHANNEL_TV_VPN) in <lambda>()
126 .setVisibility(Notification.VISIBILITY_PUBLIC) in <lambda>()
127 .setCategory(Notification.CATEGORY_SYSTEM) in <lambda>()
128 .extend(Notification.TvExtender()) in <lambda>()
/frameworks/base/packages/SystemUI/src/com/android/systemui/screenrecord/
DRecordingService.java19 import android.app.Notification;
259 extras.putString(Notification.EXTRA_SUBSTITUTE_APP_NAME, in createErrorNotification()
263 Notification.Builder builder = new Notification.Builder(this, CHANNEL_ID) in createErrorNotification()
287 extras.putString(Notification.EXTRA_SUBSTITUTE_APP_NAME, in createRecordingNotification()
299 Notification.Action stopAction = new Notification.Action.Builder( in createRecordingNotification()
303 Notification.Builder builder = new Notification.Builder(this, CHANNEL_ID) in createRecordingNotification()
310 .setForegroundServiceBehavior(Notification.FOREGROUND_SERVICE_IMMEDIATE) in createRecordingNotification()
317 protected Notification createProcessingNotification() { in createProcessingNotification()
324 extras.putString(Notification.EXTRA_SUBSTITUTE_APP_NAME, in createProcessingNotification()
327 Notification.Builder builder = new Notification.Builder(getApplicationContext(), CHANNEL_ID) in createProcessingNotification()
[all …]
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/
DPackageInstalledNotificationUtils.java20 import android.app.Notification;
221 channel.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE); in createChannel()
270 private Notification.Builder getGroupNotificationBuilder() { in getGroupNotificationBuilder()
274 extras.putString(Notification.EXTRA_SUBSTITUTE_APP_NAME, mInstallerAppLabel); in getGroupNotificationBuilder()
276 Notification.Builder builder = in getGroupNotificationBuilder()
277 new Notification.Builder(mContext, mChannelId) in getGroupNotificationBuilder()
282 .setCategory(Notification.CATEGORY_STATUS) in getGroupNotificationBuilder()
295 private Notification.Builder getAppInstalledNotificationBuilder() { in getAppInstalledNotificationBuilder()
299 extras.putString(Notification.EXTRA_SUBSTITUTE_APP_NAME, mInstallerAppLabel); in getAppInstalledNotificationBuilder()
305 Notification.Builder builder = in getAppInstalledNotificationBuilder()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DInflatedSmartRepliesTest.java27 import android.app.Notification;
71 @Mock private Notification mNotification;
115 List<Notification.Action> smartActions = in chooseSmartRepliesAndActions_smartRepliesOff_noAppGeneratedSmartSuggestions()
166 List<Notification.Action> smartActions = in chooseSmartRepliesAndActions_appGeneratedSmartRepliesAndActions()
249 mNotification.actions = new Notification.Action[]{ in chooseSmartRepliesAndActions_sysGeneratedPhishingSmartAction()
260 .setSemanticAction(Notification.Action in chooseSmartRepliesAndActions_sysGeneratedPhishingSmartAction()
283 List<Notification.Action> appGenSmartActions = in chooseSmartRepliesAndActions_appGenPreferredOverSysGen()
370 ArrayList<Notification.Action> actions = new ArrayList<>(); in chooseSmartRepliesAndActions_lockTaskKioskModeEnabled_smartActionsAffected()
419 List<Notification.Action> leftActions = Arrays.asList( in areSuggestionsSimilar_trueForSimilar()
422 List<Notification.Action> rightActions = Arrays.asList( in areSuggestionsSimilar_trueForSimilar()
[all …]
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/
DBubble.java26 import android.app.Notification;
577 return (mFlags & Notification.BubbleMetadata.FLAG_SUPPRESS_BUBBLE) != 0; in isSuppressed()
585 return (mFlags & Notification.BubbleMetadata.FLAG_SUPPRESSABLE_BUBBLE) != 0; in isSuppressable()
602 mFlags |= Notification.BubbleMetadata.FLAG_SUPPRESS_NOTIFICATION; in setSuppressNotification()
604 mFlags &= ~Notification.BubbleMetadata.FLAG_SUPPRESS_NOTIFICATION; in setSuppressNotification()
623 mFlags |= Notification.BubbleMetadata.FLAG_SUPPRESS_BUBBLE; in setSuppressBubble()
625 mFlags &= ~Notification.BubbleMetadata.FLAG_SUPPRESS_BUBBLE; in setSuppressBubble()
765 return isEnabled(Notification.BubbleMetadata.FLAG_SUPPRESS_NOTIFICATION); in shouldSuppressNotification()
769 return isEnabled(Notification.BubbleMetadata.FLAG_AUTO_EXPAND_BUBBLE); in shouldAutoExpand()
774 enable(Notification.BubbleMetadata.FLAG_AUTO_EXPAND_BUBBLE); in setShouldAutoExpand()
[all …]

12345678910>>...14