OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 package org.chromium.chrome.browser.notifications; |
| 6 |
| 7 import android.app.Notification; |
| 8 import android.app.PendingIntent; |
| 9 import android.graphics.Bitmap; |
| 10 |
| 11 /** |
| 12 * Abstraction over Notification.Builder and NotificationCompat.Builder interfac
es. |
| 13 * |
| 14 * TODO(awdf) Remove this once we've updated to revision 26 of the support libra
ry. |
| 15 */ |
| 16 public interface ChromeNotificationBuilder { |
| 17 ChromeNotificationBuilder setAutoCancel(boolean autoCancel); |
| 18 |
| 19 ChromeNotificationBuilder setContentIntent(PendingIntent contentIntent); |
| 20 |
| 21 ChromeNotificationBuilder setContentTitle(String title); |
| 22 |
| 23 ChromeNotificationBuilder setContentText(String text); |
| 24 |
| 25 ChromeNotificationBuilder setSmallIcon(int icon); |
| 26 |
| 27 ChromeNotificationBuilder setTicker(String text); |
| 28 |
| 29 ChromeNotificationBuilder setLocalOnly(boolean localOnly); |
| 30 |
| 31 ChromeNotificationBuilder setGroup(String group); |
| 32 |
| 33 ChromeNotificationBuilder setOngoing(boolean ongoing); |
| 34 |
| 35 ChromeNotificationBuilder setVisibility(int visibility); |
| 36 |
| 37 ChromeNotificationBuilder setShowWhen(boolean showWhen); |
| 38 |
| 39 ChromeNotificationBuilder addAction(int icon, String title, PendingIntent in
tent); |
| 40 |
| 41 ChromeNotificationBuilder setDeleteIntent(PendingIntent intent); |
| 42 |
| 43 ChromeNotificationBuilder setPriority(int pri); |
| 44 |
| 45 ChromeNotificationBuilder setProgress(int max, int percentage, boolean indet
erminate); |
| 46 |
| 47 ChromeNotificationBuilder setSubText(String text); |
| 48 |
| 49 ChromeNotificationBuilder setContentInfo(String info); |
| 50 |
| 51 ChromeNotificationBuilder setWhen(long time); |
| 52 |
| 53 ChromeNotificationBuilder setLargeIcon(Bitmap icon); |
| 54 |
| 55 ChromeNotificationBuilder setVibrate(long[] vibratePattern); |
| 56 |
| 57 Notification buildWithBigTextStyle(String bigText); |
| 58 |
| 59 Notification build(); |
| 60 } |
OLD | NEW |