OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.chrome.browser.notifications; | 5 package org.chromium.chrome.browser.notifications; |
6 | 6 |
7 import android.app.Notification; | 7 import android.app.Notification; |
8 import android.app.PendingIntent; | 8 import android.app.PendingIntent; |
9 import android.graphics.Bitmap; | 9 import android.graphics.Bitmap; |
10 | 10 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 /** | 64 /** |
65 * Adds an action to the notification. Actions are typically displayed as a
button adjacent to | 65 * Adds an action to the notification. Actions are typically displayed as a
button adjacent to |
66 * the notification content. | 66 * the notification content. |
67 */ | 67 */ |
68 NotificationBuilder addAction( | 68 NotificationBuilder addAction( |
69 int iconId, @Nullable CharSequence title, @Nullable PendingIntent in
tent); | 69 int iconId, @Nullable CharSequence title, @Nullable PendingIntent in
tent); |
70 | 70 |
71 /** | 71 /** |
72 * Adds an action to the notification for opening the settings screen. | 72 * Adds an action to the notification for opening the settings screen. |
73 */ | 73 */ |
74 NotificationBuilder addSettingsAction(int iconId, CharSequence title, Pendin
gIntent intent); | 74 NotificationBuilder addSettingsAction( |
| 75 int iconId, @Nullable CharSequence title, @Nullable PendingIntent in
tent); |
75 | 76 |
76 /** | 77 /** |
77 * Sets the default notification options that will be used. | 78 * Sets the default notification options that will be used. |
78 * <p> | 79 * <p> |
79 * The value should be one or more of the following fields combined with | 80 * The value should be one or more of the following fields combined with |
80 * bitwise-or: | 81 * bitwise-or: |
81 * {@link Notification#DEFAULT_SOUND}, {@link Notification#DEFAULT_VIBRATE}, | 82 * {@link Notification#DEFAULT_SOUND}, {@link Notification#DEFAULT_VIBRATE}, |
82 * {@link Notification#DEFAULT_LIGHTS}. | 83 * {@link Notification#DEFAULT_LIGHTS}. |
83 * <p> | 84 * <p> |
84 * For all default values, use {@link Notification#DEFAULT_ALL}. | 85 * For all default values, use {@link Notification#DEFAULT_ALL}. |
85 */ | 86 */ |
86 NotificationBuilder setDefaults(int defaults); | 87 NotificationBuilder setDefaults(int defaults); |
87 | 88 |
88 /** | 89 /** |
89 * Sets the vibration pattern to use. | 90 * Sets the vibration pattern to use. |
90 */ | 91 */ |
91 NotificationBuilder setVibrate(@Nullable long[] pattern); | 92 NotificationBuilder setVibrate(@Nullable long[] pattern); |
92 } | 93 } |
OLD | NEW |