Home
last modified time | relevance | path

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

1234567

/packages/modules/ExtServices/tests/src/android/ext/services/notification/
DNotificationEntryTest.java19 import static android.app.Notification.FLAG_CAN_COLORIZE;
20 import static android.app.Notification.FLAG_FOREGROUND_SERVICE;
32 import android.app.Notification;
77 Notification n = new Notification.Builder(mContext, channelId) in generateSbn()
86 Notification n = new Notification.Builder(mContext, channelId) in generateSbn()
94 private StatusBarNotification generateSbn(Notification n) { in generateSbn()
117 sbn.getNotification().extras.putParcelableArrayList(Notification.EXTRA_PEOPLE_LIST, people); in testHasPerson()
155 Notification n = new Notification.Builder(mContext, channel.getId()) in testIsInboxStyle()
156 .setStyle(new Notification.InboxStyle()) in testIsInboxStyle()
160 assertTrue(entry.hasStyle(Notification.InboxStyle.class)); in testIsInboxStyle()
[all …]
DSmartActionsHelperTest.java29 import android.app.Notification;
98 private Notification.Builder mNotificationBuilder;
111 mNotificationBuilder = new Notification.Builder(mContext, "channel"); in setup()
119 private void setStatusBarNotification(Notification n) { in setStatusBarNotification()
126 Notification notification = mNotificationBuilder.setContentText(MESSAGE).build(); in testSuggest_notMessageNotification()
137 Notification notification = in testSuggest_noInlineReply()
140 .setCategory(Notification.CATEGORY_MESSAGE) in testSuggest_noInlineReply()
158 Notification notification = createMessageNotification(); in testSuggest_settingsOff()
171 Notification notification = createMessageNotification(); in testSuggest_settings_repliesOnActionsOff()
188 Notification notification = createMessageNotification(); in testSuggest_settings_repliesOffActionsOn()
[all …]
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/notification/
DNotificationFragment.java4 import android.app.Notification;
121 Notification notification = new Notification in initCarCategoriesButton()
125 .setCategory(Notification.CATEGORY_CAR_EMERGENCY) in initCarCategoriesButton()
133 Notification notification = new Notification in initCarCategoriesButton()
139 .setCategory(Notification.CATEGORY_CAR_WARNING) in initCarCategoriesButton()
148 Notification notification = new Notification in initCarCategoriesButton()
152 .setCategory(Notification.CATEGORY_CAR_INFORMATION) in initCarCategoriesButton()
166 Notification notification1 = new Notification in initImportanceHighBotton()
176 new Notification.Action.Builder( in initImportanceHighBotton()
179 new Notification.Action.Builder( in initImportanceHighBotton()
[all …]
/packages/modules/ExtServices/src/android/ext/services/notification/
DNotificationEntry.java18 import static android.app.Notification.CATEGORY_MESSAGE;
26 import android.app.Notification;
86 private static void lightenNotificationPayload(Notification notification) { in lightenNotificationPayload()
99 || Notification.EXTRA_MESSAGES.equals(key) in lightenNotificationPayload()
100 || Notification.EXTRA_MESSAGING_PERSON.equals(key) in lightenNotificationPayload()
101 || Notification.EXTRA_PEOPLE_LIST.equals(key)) { in lightenNotificationPayload()
117 private Notification cloneNotificationLight(Notification notification) { in cloneNotificationLight()
120 Notification lightNotification = in cloneNotificationLight()
121 Notification.Builder.recoverBuilder(mContext, notification) in cloneNotificationLight()
164 final Notification n = getNotification(); in calculateAudioAttributes()
[all …]
DSmartActionsHelper.java19 import android.app.Notification;
68 Notification.FLAG_ONGOING_EVENT
69 | Notification.FLAG_FOREGROUND_SERVICE
70 | Notification.FLAG_GROUP_SUMMARY
71 | Notification.FLAG_NO_CLEAR;
120 ArrayList<Notification.Action> actions = new ArrayList<>(); in suggest()
125 Notification.Action notificationAction; in suggest()
156 private Notification.Action createNotificationActionWithoutRemoteAction( in createNotificationActionWithoutRemoteAction()
165 private Notification.Action createCopyCodeAction(ConversationAction conversationAction) { in createCopyCodeAction()
211 Notification notification = notificationEntry.getNotification(); in suggestionsMightBeUsedInNotification()
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/compat/
DNotificationCompatUtils.java19 import android.app.Notification;
28 CompatUtils.getMethod(Notification.Builder.class, "setColor", int.class);
30 CompatUtils.getMethod(Notification.Builder.class, "setVisibility", int.class);
32 CompatUtils.getMethod(Notification.Builder.class, "setCategory", String.class);
34 CompatUtils.getMethod(Notification.Builder.class, "setPriority", int.class);
36 CompatUtils.getMethod(Notification.Builder.class, "build");
38 CompatUtils.getField(Notification.class, "VISIBILITY_SECRET");
43 CompatUtils.getField(Notification.class, "CATEGORY_RECOMMENDATION");
48 CompatUtils.getField(Notification.class, "PRIORITY_LOW");
58 public static void setColor(final Notification.Builder builder, final int color) { in setColor()
[all …]
/packages/apps/Car/Notification/tests/robotests/src/com/android/car/notification/
DCarNotificationDiffTest.java21 import android.app.Notification;
61 private Notification.Builder mNotificationBuilder1;
62 private Notification.Builder mNotificationBuilder2;
81 mNotificationBuilder1 = new Notification.Builder(mContext, in setupBaseActivityAndLayout()
85 mNotificationBuilder2 = new Notification.Builder(mContext, in setupBaseActivityAndLayout()
268 Notification.Builder oldNotification = new Notification.Builder(mContext, in areBundleEqual_sameSize_shouldReturnTrue()
273 Notification.Builder newNotification = new Notification.Builder(mContext, in areBundleEqual_sameSize_shouldReturnTrue()
309 Notification.Builder oldNotification = new Notification.Builder(mContext, in areBundleEqual_diffSize_shouldReturnFalse()
317 Notification.Builder newNotification = new Notification.Builder(mContext, in areBundleEqual_diffSize_shouldReturnFalse()
353 Notification.Builder oldNotification = new Notification.Builder(mContext, in areBundleEqual_sameKeySetWithSameValue_shouldReturnTrue()
[all …]
DCarHeadsUpNotificationManagerTest.java31 import android.app.Notification;
124 Notification.Builder mNotificationBuilder1 = new Notification.Builder(mContext, CHANNEL_ID) in setupBaseActivityAndLayout()
126 .setCategory(Notification.CATEGORY_CALL) in setupBaseActivityAndLayout()
128 Notification.Builder mNotificationBuilder2 = new Notification.Builder(mContext, CHANNEL_ID) in setupBaseActivityAndLayout()
130 .setCategory(Notification.CATEGORY_NAVIGATION) in setupBaseActivityAndLayout()
132 Notification.Builder mNotificationBuilder_carInformationHeadsUp = new Notification.Builder( in setupBaseActivityAndLayout()
135 .setCategory(Notification.CATEGORY_CAR_INFORMATION) in setupBaseActivityAndLayout()
137 Notification.Builder mNotificationBuilder_messageHeadsUp = new Notification.Builder( in setupBaseActivityAndLayout()
140 .setCategory(Notification.CATEGORY_MESSAGE) in setupBaseActivityAndLayout()
142 Notification.Builder mNotificationBuilder_navigationHeadsUp = new Notification.Builder( in setupBaseActivityAndLayout()
[all …]
/packages/apps/Car/Notification/src/com/android/car/notification/
DNotificationGroup.java20 import android.app.Notification;
128 (notification.getNotification().flags & Notification.FLAG_FOREGROUND_SERVICE) in isDismissible()
175 if (extras.containsKey(Notification.EXTRA_TITLE)) { in generateChildTitles()
176 titles.add(extras.getString(Notification.EXTRA_TITLE)); in generateChildTitles()
178 } else if (extras.containsKey(Notification.EXTRA_TITLE_BIG)) { in generateChildTitles()
179 titles.add(extras.getString(Notification.EXTRA_TITLE_BIG)); in generateChildTitles()
181 } else if (extras.containsKey(Notification.EXTRA_MESSAGES)) { in generateChildTitles()
182 List<Notification.MessagingStyle.Message> messages = in generateChildTitles()
183 Notification.MessagingStyle.Message.getMessagesFromBundleArray( in generateChildTitles()
184 extras.getParcelableArray(Notification.EXTRA_MESSAGES)); in generateChildTitles()
[all …]
DCarNotificationViewAdapter.java18 import android.app.Notification;
319 Notification notification = in getItemViewType()
326 case Notification.CATEGORY_CALL: in getItemViewType()
328 case Notification.CATEGORY_CAR_EMERGENCY: in getItemViewType()
330 case Notification.CATEGORY_CAR_WARNING: in getItemViewType()
332 case Notification.CATEGORY_CAR_INFORMATION: in getItemViewType()
336 case Notification.CATEGORY_MESSAGE: in getItemViewType()
345 int progressMax = extras.getInt(Notification.EXTRA_PROGRESS_MAX); in getItemViewType()
347 Notification.EXTRA_PROGRESS_INDETERMINATE); in getItemViewType()
349 boolean isProgress = extras.containsKey(Notification.EXTRA_PROGRESS) in getItemViewType()
[all …]
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
DMissedCallNotifierImplTest.java19 import android.app.Notification;
206 Notification.Builder builder1 = makeNotificationBuilder("builder1"); in cancelNotificationTestInternal()
207 Notification.Builder builder2 = makeNotificationBuilder("builder2"); in cancelNotificationTestInternal()
224 requestIdCaptor.capture(), nullable(Notification.class), eq(userHandle)); in cancelNotificationTestInternal()
235 Notification.Builder[] builders = new Notification.Builder[4]; in testNotifyMultipleMissedCalls()
260 ArgumentCaptor<Notification> notificationArgumentCaptor = ArgumentCaptor.forClass( in testNotifyMultipleMissedCalls()
261 Notification.class); in testNotifyMultipleMissedCalls()
265 for (Notification n : notificationArgumentCaptor.getAllValues()) { in testNotifyMultipleMissedCalls()
270 Notification.Builder builder = builders[i]; in testNotifyMultipleMissedCalls()
283 verify(builder, never()).addAction(any(Notification.Action.class)); in testNotifyMultipleMissedCalls()
[all …]
DDisconnectedCallNotifierTest.java15 import android.app.Notification;
85 any(Notification.class), any(UserHandle.class)); in testNotificationShownAfterEmergencyCall()
89 ArgumentCaptor<Notification> captor = ArgumentCaptor.forClass(Notification.class); in testNotificationShownAfterEmergencyCall()
92 Notification notification = captor.getValue(); in testNotificationShownAfterEmergencyCall()
108 any(Notification.class), any(UserHandle.class)); in testNotificationShownForDisconnectedEmergencyCall()
112 ArgumentCaptor<Notification> captor = ArgumentCaptor.forClass(Notification.class); in testNotificationShownForDisconnectedEmergencyCall()
115 Notification notification = captor.getValue(); in testNotificationShownForDisconnectedEmergencyCall()
130 any(Notification.class), any(UserHandle.class)); in testNotificationNotShownAfterCall()
135 any(Notification.class), any(UserHandle.class)); in testNotificationNotShownAfterCall()
/packages/apps/Dialer/java/com/android/incallui/
DStatusBarNotifier.java32 import android.app.Notification;
336 Notification.Builder publicBuilder = new Notification.Builder(context); in buildAndSendNotification()
346 final Notification.Builder builder = getNotificationBuilder(); in buildAndSendNotification()
361 builder.setCategory(Notification.CATEGORY_CALL); in buildAndSendNotification()
363 builder.setPriority(Notification.PRIORITY_MAX); in buildAndSendNotification()
408 Notification notification = builder.build(); in buildAndSendNotification()
411 notification.flags |= Notification.FLAG_INSISTENT; in buildAndSendNotification()
440 DialerCall call, int state, CallAudioState callAudioState, Notification.Builder builder) { in createIncomingCallNotification()
465 private void setNotificationWhen(DialerCall call, int state, Notification.Builder builder) { in setNotificationWhen()
578 Notification.Builder builder, ContactCacheEntry contactInfo, DialerCall call) { in addPersonReference()
[all …]
/packages/apps/DocumentsUI/src/com/android/documentsui/services/
DJob.java33 import android.app.Notification;
34 import android.app.Notification.Builder;
107 final Notification.Builder mProgressBuilder;
185 abstract Notification getSetupNotification(); in getSetupNotification()
186 abstract Notification getProgressNotification(); in getProgressNotification()
187 abstract Notification getFailureNotification(); in getFailureNotification()
189 abstract Notification getWarningNotification(); in getWarningNotification()
278 Notification getSetupNotification(String content) { in getSetupNotification()
284 Notification getFailureNotification(@PluralsRes int titleId, @DrawableRes int icon) { in getFailureNotification()
291 final Notification.Builder errorBuilder = createNotificationBuilder() in getFailureNotification()
[all …]
/packages/services/Telecomm/testapps/src/com/android/server/telecom/testapps/
DCallServiceNotifier.java21 import android.app.Notification;
227 private Notification getPhoneAccountNotification(Context context) { in getPhoneAccountNotification()
228 final Notification.Builder builder = new Notification.Builder(context, CHANNEL_ID); in getPhoneAccountNotification()
233 builder.setPriority(Notification.PRIORITY_HIGH); in getPhoneAccountNotification()
252 private Notification getMainNotification(Context context) { in getMainNotification()
253 final Notification.Builder builder = new Notification.Builder(context, CHANNEL_ID); in getMainNotification()
255 builder.setPriority(Notification.PRIORITY_HIGH); in getMainNotification()
327 private void addAddCallAction(Notification.Builder builder, Context context) { in addAddCallAction()
335 private void addAddOneWayVideoCallAction(Notification.Builder builder, Context context) { in addAddOneWayVideoCallAction()
343 private void addAddTwoWayVideoCallAction(Notification.Builder builder, Context context) { in addAddTwoWayVideoCallAction()
[all …]
/packages/apps/DeskClock/src/com/android/deskclock/alarms/
DAlarmNotifications.java24 import android.app.Notification;
143 final Notification notification = builder.build(); in showUpcomingNotification()
149 private static boolean isGroupSummary(Notification n) { in isGroupSummary()
150 return (n.flags & Notification.FLAG_GROUP_SUMMARY) == Notification.FLAG_GROUP_SUMMARY; in isGroupSummary()
167 private static Notification getFirstActiveNotification(Context context, String group, in getFirstActiveNotification()
168 int canceledNotificationId, Notification postedNotification) { in getFirstActiveNotification()
172 Notification firstActiveNotification = postedNotification; in getFirstActiveNotification()
174 final Notification n = statusBarNotification.getNotification(); in getFirstActiveNotification()
188 private static Notification getActiveGroupSummaryNotification(Context context, String group) { in getActiveGroupSummaryNotification()
193 final Notification n = statusBarNotification.getNotification(); in getActiveGroupSummaryNotification()
[all …]
DAlarmNotifications.kt20 import android.app.Notification
168 val notification: Notification = builder.build() in showLowPriorityNotification()
223 val notification: Notification = builder.build() in showHighPriorityNotification()
229 private fun isGroupSummary(n: Notification): Boolean { in isGroupSummary()
230 return n.flags and Notification.FLAG_GROUP_SUMMARY == Notification.FLAG_GROUP_SUMMARY in isGroupSummary()
251 postedNotification: Notification? in getFirstActiveNotification()
252 ): Notification? { in getFirstActiveNotification()
256 var firstActiveNotification: Notification? = postedNotification in getFirstActiveNotification()
258 val n: Notification = statusBarNotification.getNotification() in getFirstActiveNotification()
271 private fun getActiveGroupSummaryNotification(context: Context, group: String): Notification? { in getActiveGroupSummaryNotification()
[all …]
/packages/apps/Dialer/java/com/android/dialer/app/calllog/
DMissedCallNotifier.java18 import android.app.Notification;
19 import android.app.Notification.Builder;
145 Notification.Builder groupSummary = createNotificationBuilder(); in updateMissedCallNotification()
200 Notification.Builder publicSummaryBuilder = createNotificationBuilder(); in updateMissedCallNotification()
221 Notification notification = groupSummary.build(); in updateMissedCallNotification()
323 private Notification getNotificationForCall( in getNotificationForCall()
335 Notification.Builder publicBuilder = in getNotificationForCall()
338 Notification.Builder builder = createNotificationBuilder(call); in getNotificationForCall()
374 new Notification.Action.Builder( in getNotificationForCall()
382 new Notification.Action.Builder( in getNotificationForCall()
[all …]
/packages/apps/StorageManager/robotests/src/com/android/storagemanager/automatic/
DNotificationControllerTest.java29 import android.app.Notification;
72 verify(mNotificationManager).notify(anyInt(), any(Notification.class)); in testShouldShowNotificationFirstTime()
84 verify(mNotificationManager, times(i)).notify(anyInt(), any(Notification.class)); in testNotificationNotShownIfShownTooManyTimes()
104 verify(mNotificationManager, times(i + 1)).notify(anyInt(), any(Notification.class)); in testNotificationNotShownIfDismissedTooManyTimes()
122 verify(mNotificationManager).notify(anyInt(), any(Notification.class)); in testDismissNotificationDelay()
137 verify(mNotificationManager).notify(anyInt(), any(Notification.class)); in testDismissNotificationDelay()
144 verify(mNotificationManager).notify(anyInt(), any(Notification.class)); in testNoThanksNotificationDelay()
159 verify(mNotificationManager).notify(anyInt(), any(Notification.class)); in testNoThanksNotificationDelay()
176 ArgumentCaptor<Notification> captor = ArgumentCaptor.forClass(Notification.class); in testNotificationIsLocalOnly()
180 assertThat(captor.getValue().flags & Notification.FLAG_LOCAL_ONLY) in testNotificationIsLocalOnly()
[all …]
/packages/apps/Car/LocalMediaPlayer/src/com/android/car/media/localmediaplayer/
DPlayer.java18 import android.app.Notification;
92 private Notification.Builder mPlayingNotificationBuilder;
93 private Notification.Builder mPausedNotificationBuilder;
122 Notification.Action prevAction = makeNotificationAction( in Player()
124 Notification.Action nextAction = makeNotificationAction( in Player()
126 Notification.Action playAction = makeNotificationAction( in Player()
128 Notification.Action pauseAction = makeNotificationAction( in Player()
132 mPlayingNotificationBuilder = new Notification.Builder(context) in Player()
133 .setVisibility(Notification.VISIBILITY_PUBLIC) in Player()
140 mPausedNotificationBuilder = new Notification.Builder(context) in Player()
[all …]
/packages/inputmethods/LatinIME/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/
DNotificationUtils.java19 import android.app.Notification;
50 private static Notification.Builder createNotificationBuilder(Context context) { in createNotificationBuilder()
53 return new Notification.Builder(context); in createNotificationBuilder()
67 return new Notification.Builder(context, CHANNEL_ID); in createNotificationBuilder()
82 final Notification.Action action = in sendDirectReplyNotification()
83 new Notification.Action.Builder(null, "Direct Reply Test", pendingIntent) in sendDirectReplyNotification()
86 final Notification notification = createNotificationBuilder(context) in sendDirectReplyNotification()
103 final Notification.Builder notificationBuilder = in onReceiveDirectReply()
104 new Notification.Builder(context, CHANNEL_ID); in onReceiveDirectReply()
/packages/apps/Contacts/src/com/android/contacts/vcard/
DNotificationImportExportListener.java20 import android.app.Notification;
71 public Notification onImportProcessed(ImportRequest request, int jobId, int sequence) { in onImportProcessed()
98 …public Notification onImportParsed(ImportRequest request, int jobId, VCardEntry entry, int current… in onImportParsed()
134 final Notification notification = in onImportFinished()
153 final Notification notification = in onImportCanceled()
160 public Notification onExportProcessed(ExportRequest request, int jobId) { in onExportProcessed()
182 final Notification notification = constructCancelNotification(mContext, description); in onCancelRequest()
201 /* package */ static Notification constructProgressNotification( in constructProgressNotification()
247 /* package */ static Notification constructCancelNotification( in constructCancelNotification()
271 /* package */ static Notification constructFinishNotification( in constructFinishNotification()
[all …]
/packages/apps/Car/Notification/src/com/android/car/notification/template/
DProgressNotificationViewHolder.java19 import android.app.Notification;
72 Notification notification = statusBarNotification.getNotification(); in bindBody()
75 CharSequence title = extraData.getCharSequence(Notification.EXTRA_TITLE); in bindBody()
76 CharSequence text = extraData.getCharSequence(Notification.EXTRA_TEXT); in bindBody()
81 boolean isIndeterminate = extraData.getBoolean(Notification.EXTRA_PROGRESS_INDETERMINATE); in bindBody()
82 int progress = extraData.getInt(Notification.EXTRA_PROGRESS); in bindBody()
83 int progressMax = extraData.getInt(Notification.EXTRA_PROGRESS_MAX); in bindBody()
89 if (notification.color != Notification.COLOR_DEFAULT) { in bindBody()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/common/
DNotificationHelper.java18 import android.app.Notification;
62 final Notification.Builder notify = new Notification.Builder(mContext) in showResumeNotification()
69 .setVisibility(Notification.VISIBILITY_PUBLIC) in showResumeNotification()
84 final Notification.Builder notify = new Notification.Builder(mContext, CHANNEL_ID) in showPrivacyReminderNotification()
91 .setStyle(new Notification.BigTextStyle().bigText(mContext.getString( in showPrivacyReminderNotification()
94 .setVisibility(Notification.VISIBILITY_PUBLIC) in showPrivacyReminderNotification()
/packages/apps/Dialer/java/com/android/incallui/spam/
DSpamCallListListener.java19 import android.app.Notification;
20 import android.app.Notification.Builder;
250 private Notification.Builder createAfterCallNotificationBuilder(DialerCall call) { in createAfterCallNotificationBuilder()
251 Notification.Builder builder = in createAfterCallNotificationBuilder()
255 .setCategory(Notification.CATEGORY_STATUS) in createAfterCallNotificationBuilder()
256 .setPriority(Notification.PRIORITY_DEFAULT) in createAfterCallNotificationBuilder()
275 Notification.Builder notificationBuilder = in showNonSpamCallNotification()
282 new Notification.BigTextStyle() in showNonSpamCallNotification()
289 new Notification.Action.Builder( in showNonSpamCallNotification()
297 new Notification.Action.Builder( in showNonSpamCallNotification()
[all …]

1234567