Lines Matching defs:pkg

155         String pkg;
169 final String pkg;
179 NotificationRecord(String pkg, String tag, int id, int uid, int initialPid,
182 this.pkg = pkg;
193 + " / " + idDebugString(baseContext, this.pkg, notification.icon));
212 + " pkg=" + pkg
221 final String pkg;
225 ToastRecord(int pid, String pkg, ITransientNotification callback, int duration)
228 this.pkg = pkg;
246 + " pkg=" + pkg
283 public void onNotificationClick(String pkg, String tag, int id) {
284 cancelNotification(pkg, tag, id, Notification.FLAG_AUTO_CANCEL,
317 public void onNotificationError(String pkg, String tag, int id,
319 Slog.d(TAG, "onNotification error pkg=" + pkg + " tag=" + tag + " id=" + id
321 cancelNotification(pkg, tag, id, 0, 0);
324 ActivityManagerNative.getDefault().crashApplication(uid, initialPid, pkg,
325 "Bad notification posted from package " + pkg
490 public void enqueueToast(String pkg, ITransientNotification callback, int duration)
492 if (DBG) Slog.i(TAG, "enqueueToast pkg=" + pkg + " callback=" + callback + " duration=" + duration);
494 if (pkg == null || callback == null) {
495 Slog.e(TAG, "Not doing toast. pkg=" + pkg + " callback=" + callback);
504 int index = indexOfToastLocked(pkg, callback);
511 record = new ToastRecord(callingPid, pkg, callback, duration);
529 public void cancelToast(String pkg, ITransientNotification callback) {
530 Slog.i(TAG, "cancelToast pkg=" + pkg + " callback=" + callback);
532 if (pkg == null || callback == null) {
533 Slog.e(TAG, "Not cancelling notification. pkg=" + pkg + " callback=" + callback);
540 int index = indexOfToastLocked(pkg, callback);
544 Slog.w(TAG, "Toast already cancelled. pkg=" + pkg + " callback=" + callback);
555 if (DBG) Slog.d(TAG, "Show pkg=" + record.pkg + " callback=" + record.callback);
562 + " in package " + record.pkg);
584 + " in package " + record.pkg);
608 if (DBG) Slog.d(TAG, "Timeout pkg=" + record.pkg + " callback=" + record.callback);
610 int index = indexOfToastLocked(record.pkg, record.callback);
618 private int indexOfToastLocked(String pkg, ITransientNotification callback)
625 if (r.pkg.equals(pkg) && r.callback.asBinder() == cbak) {
668 public void enqueueNotification(String pkg, int id, Notification notification, int[] idOut)
670 enqueueNotificationWithTag(pkg, null /* tag */, id, notification, idOut);
673 public void enqueueNotificationWithTag(String pkg, String tag, int id, Notification notification,
676 enqueueNotificationInternal(pkg, Binder.getCallingUid(), Binder.getCallingPid(),
682 public void enqueueNotificationInternal(String pkg, int callingUid, int callingPid,
685 checkIncomingCall(pkg);
689 if (!"android".equals(pkg)) {
695 if (r.pkg.equals(pkg)) {
699 + " notifications. Not showing more. package=" + pkg);
709 if (!pkg.equals("com.android.providers.downloads")
711 EventLog.writeEvent(EventLogTags.NOTIFICATION_ENQUEUE, pkg, id, notification.toString());
714 if (pkg == null || notification == null) {
715 throw new IllegalArgumentException("null not allowed: pkg=" + pkg
720 throw new IllegalArgumentException("contentView required: pkg=" + pkg
724 throw new IllegalArgumentException("contentIntent required: pkg=" + pkg
730 NotificationRecord r = new NotificationRecord(pkg, tag, id,
734 int index = indexOfNotificationLocked(pkg, tag, id);
755 StatusBarNotification n = new StatusBarNotification(pkg, id, tag,
776 sendAccessibilityEvent(notification, pkg);
932 private void cancelNotification(String pkg, String tag, int id, int mustHaveFlags,
934 EventLog.writeEvent(EventLogTags.NOTIFICATION_CANCEL, pkg, id, mustHaveFlags);
937 int index = indexOfNotificationLocked(pkg, tag, id);
960 boolean cancelAllNotificationsInt(String pkg, int mustHaveFlags,
962 EventLog.writeEvent(EventLogTags.NOTIFICATION_CANCEL_ALL, pkg, mustHaveFlags);
975 if (!r.pkg.equals(pkg)) {
993 public void cancelNotification(String pkg, int id) {
994 cancelNotificationWithTag(pkg, null /* tag */, id);
997 public void cancelNotificationWithTag(String pkg, String tag, int id) {
998 checkIncomingCall(pkg);
1000 cancelNotification(pkg, tag, id, 0,
1005 public void cancelAllNotifications(String pkg) {
1006 checkIncomingCall(pkg);
1010 cancelAllNotificationsInt(pkg, 0, Notification.FLAG_FOREGROUND_SERVICE, true);
1013 void checkIncomingCall(String pkg) {
1020 pkg, 0);
1023 + pkg + " which is owned by uid " + ai.uid);
1026 throw new SecurityException("Unknown package " + pkg);
1044 Slog.w(TAG, "canceled PendingIntent for " + r.pkg, ex);
1126 private int indexOfNotificationLocked(String pkg, String tag, int id)
1141 if (r.id == id && r.pkg.equals(pkg)) {