Home | History | Annotate | Download | only in server

Lines Matching defs:Notification

30 import android.app.Notification;
64 import android.service.notification.INotificationListener;
65 import android.service.notification.NotificationListenerService;
66 import android.service.notification.StatusBarNotification;
122 private static final int SCORE_DISPLAY_THRESHOLD = Notification.PRIORITY_MIN * NOTIFICATION_PRIORITY_MULTIPLIER;
127 Notification.PRIORITY_LOW * NOTIFICATION_PRIORITY_MULTIPLIER;
160 // for enabling and disabling notification pulse behavior
189 // Notification control database. For now just contains disabled packages.
195 private static final String TAG_BODY = "notification-policy";
284 sb.append(" notification");
294 // We don't want to store the heavy bits of the notification in the archive,
435 /** Use this when you actually want to post a notification or toast.
541 * Remove notification access for any services that no longer exist.
564 Slog.w(TAG, "Skipping notification listener service "
637 Slog.v(TAG, "disabling notification listener for user " + oldUser + ": " + component);
644 Slog.v(TAG, "enabling notification listener for user " + currentUser + ": "
651 * Register a listener binder directly with the notification manager.
654 * {@link android.service.notification.NotificationListenerService}.
675 * {@link android.service.notification.NotificationListenerService} to bind to.
737 Slog.v(TAG, "notification listener connection lost: " + name);
805 * asynchronously notify all listeners about a new notification
808 // make a copy in case changes are made to the underlying Notification object
820 * asynchronously notify all listeners about a removed notification
823 // make a copy in case changes are made to the underlying Notification object
824 // NOTE: this copy is lightweight: it doesn't include heavyweight parts of the notification
866 * Allow an INotificationListener to simulate clearing (dismissing) a single notification.
877 Notification.FLAG_ONGOING_EVENT | Notification.FLAG_FOREGROUND_SERVICE,
921 public Notification getNotification() { return sbn.getNotification(); }
926 final Notification notification = sbn.getNotification();
929 pw.println(prefix + " icon=0x" + Integer.toHexString(notification.icon)
930 + " / " + idDebugString(baseContext, sbn.getPackageName(), notification.icon));
931 pw.println(prefix + " pri=" + notification.priority + " score=" + sbn.getScore());
932 pw.println(prefix + " contentIntent=" + notification.contentIntent);
933 pw.println(prefix + " deleteIntent=" + notification.deleteIntent);
934 pw.println(prefix + " tickerText=" + notification.tickerText);
935 pw.println(prefix + " contentView=" + notification.contentView);
937 notification.defaults, notification.flags));
938 pw.println(prefix + " sound=" + notification.sound);
939 pw.println(prefix + " vibrate=" + Arrays.toString(notification.vibrate));
941 notification.ledARGB, notification.ledOnMS, notification.ledOffMS));
942 if (notification.actions != null && notification.actions.length > 0) {
944 final int N = notification.actions.length;
946 final Notification.Action action = notification.actions[i];
956 if (notification.extras != null && notification.extras.size() > 0) {
958 for (String key : notification.extras.keySet()) {
960 Object val = notification.extras.get(key);
1067 cancelNotification(pkg, tag, id, Notification.FLAG_AUTO_CANCEL,
1068 Notification.FLAG_FOREGROUND_SERVICE, false,
1076 Notification.FLAG_ONGOING_EVENT | Notification.FLAG_FOREGROUND_SERVICE,
1122 "Bad notification posted from package " + pkg
1198 // Keep track of screen on/off state, but do not turn off the notification light
1199 // until user passes through the lock screen or views the notification.
1454 Slog.e(TAG, "Not cancelling notification. pkg=" + pkg + " callback=" + callback);
1482 Slog.w(TAG, "Object died trying to show notification " + record.callback
1504 Slog.w(TAG, "Object died trying to hide notification " + record.callback
1590 Notification notification, int[] idOut, int userId)
1593 tag, id, notification, idOut, userId);
1603 int callingPid, String tag, int id, Notification notification, int[] idOut, int userId)
1606 Slog.v(TAG, "enqueueNotificationInternal: pkg=" + pkg + " id=" + id + " notification=" + notification);
1640 notification.toString());
1643 if (pkg == null || notification == null) {
1645 + " id=" + id + " notification=" + notification);
1647 if (notification.icon != 0) {
1648 if (notification.contentView == null) {
1650 + " id=" + id + " notification=" + notification);
1657 notification.priority = clamp(notification.priority, Notification.PRIORITY_MIN, Notification.PRIORITY_MAX);
1658 // Migrate notification flags to scores
1659 if (0 != (notification.flags & Notification.FLAG_HIGH_PRIORITY)) {
1660 if (notification.priority < Notification.PRIORITY_MAX) notification.priority = Notification.PRIORITY_MAX;
1661 } else if (SCORE_ONGOING_HIGHER && 0 != (notification.flags & Notification.FLAG_ONGOING_EVENT)) {
1662 if (notification.priority < Notification.PRIORITY_HIGH) notification.priority = Notification.PRIORITY_HIGH;
1666 int score = notification.priority * NOTIFICATION_PRIORITY_MULTIPLIER; //[-20..20]
1676 Slog.e(TAG, "Suppressing notification from package " + pkg + " by user request.");
1681 Slog.v(TAG, "Assigned score=" + score + " to " + notification);
1685 // Notification will be blocked because the score is too low.
1689 // Should this notification make noise, vibe, or use the LED?
1694 pkg, id, tag, callingUid, callingPid, score, notification, user);
1706 notification.flags |=
1707 old.getNotification().flags&Notification.FLAG_FOREGROUND_SERVICE;
1713 if ((notification.flags&Notification.FLAG_FOREGROUND_SERVICE) != 0) {
1714 notification.flags |= Notification.FLAG_ONGOING_EVENT
1715 | Notification.FLAG_NO_CLEAR;
1726 if (notification.icon != 0) {
1740 if ((n.getNotification().flags & Notification.FLAG_SHOW_LIGHTS) != 0
1751 sendAccessibilityEvent(notification, pkg);
1756 Slog.e(TAG, "Not posting notification with icon==0: " + notification);
1776 && (notification.flags & Notification.FLAG_ONLY_ALERT_ONCE) != 0 ))
1787 // should we use the default notification sound? (indicated either by DEFAULT_SOUND
1788 // or because notification.sound is pointing at Settings.System.NOTIFICATION_SOUND)
1790 (notification.defaults & Notification.DEFAULT_SOUND) != 0
1791 || Settings.System.DEFAULT_NOTIFICATION_URI.equals(notification.sound);
1799 // check to see if the default notification sound is silent
1803 } else if (notification.sound != null) {
1804 soundUri = notification.sound;
1809 boolean looping = (notification.flags & Notification.FLAG_INSISTENT) != 0;
1811 if (notification.audioStreamType >= 0) {
1812 audioStreamType = notification.audioStreamType;
1835 // Does the notification want to specify its own vibration?
1836 final boolean hasCustomVibrate = notification.vibrate != null;
1847 (notification.defaults & Notification.DEFAULT_VIBRATE) != 0;
1861 ((notification.flags & Notification.FLAG_INSISTENT) != 0) ? 0: -1);
1865 } else if (notification.vibrate.length > 1) {
1867 mVibrator.vibrate(r.sbn.getUid(), r.sbn.getBasePkg(), notification.vibrate,
1868 ((notification.flags & Notification.FLAG_INSISTENT) != 0) ? 0: -1);
1879 //Slog.i(TAG, "notification.lights="
1880 // + ((old.notification.lights.flags & Notification.FLAG_SHOW_LIGHTS) != 0));
1881 if ((notification.flags & Notification.FLAG_SHOW_LIGHTS) != 0
1887 && ((old.getFlags() & Notification.FLAG_SHOW_LIGHTS) != 0)) {
1896 private void sendAccessibilityEvent(Notification notification, CharSequence packageName) {
1905 event.setClassName(Notification.class.getName());
1906 event.setParcelableData(notification);
1907 CharSequence tickerText = notification.tickerText;
1980 * Cancels a notification ONLY if it has all of the {@code mustHaveFlags}
2009 * Determine whether the userId applies to the notification in question, either because
2016 // a notification sent to USER_ALL matches any query
2073 ? 0 : Notification.FLAG_FOREGROUND_SERVICE, false, userId);
2084 cancelAllNotificationsInt(pkg, 0, Notification.FLAG_FOREGROUND_SERVICE, true, userId);
2133 if ((r.getFlags() & (Notification.FLAG_ONGOING_EVENT
2134 | Notification.FLAG_NO_CLEAR)) == 0) {
2147 // handle notification lights
2149 // get next notification, if any
2160 final Notification ledno = mLedNotification.sbn.getNotification();
2164 if ((ledno.defaults & Notification.DEFAULT_LIGHTS) != 0) {
2220 pw.println("Current Notification Manager state:");
2252 pw.println(" Notification List:");