@@ -95,25 +95,25 @@ public class Notification implements Parcelable
9595
9696 /**
9797 * A timestamp related to this notification, in milliseconds since the epoch.
98- *
98+ *
9999 * Default value: {@link System#currentTimeMillis() Now}.
100100 *
101101 * Choose a timestamp that will be most relevant to the user. For most finite events, this
102102 * corresponds to the time the event happened (or will happen, in the case of events that have
103103 * yet to occur but about which the user is being informed). Indefinite events should be
104- * timestamped according to when the activity began.
105- *
104+ * timestamped according to when the activity began.
105+ *
106106 * Some examples:
107- *
107+ *
108108 * <ul>
109109 * <li>Notification of a new chat message should be stamped when the message was received.</li>
110110 * <li>Notification of an ongoing file download (with a progress bar, for example) should be stamped when the download started.</li>
111111 * <li>Notification of a completed file download should be stamped when the download finished.</li>
112112 * <li>Notification of an upcoming meeting should be stamped with the time the meeting will begin (that is, in the future).</li>
113113 * <li>Notification of an ongoing stopwatch (increasing timer) should be stamped with the watch's start time.
114114 * <li>Notification of an ongoing countdown timer should be stamped with the timer's end time.
115- * </ul>
116- *
115+ * </ul>
116+ *
117117 */
118118 public long when ;
119119
@@ -135,13 +135,13 @@ public class Notification implements Parcelable
135135 /**
136136 * The number of events that this notification represents. For example, in a new mail
137137 * notification, this could be the number of unread messages.
138- *
138+ *
139139 * The system may or may not use this field to modify the appearance of the notification. For
140140 * example, before {@link android.os.Build.VERSION_CODES#HONEYCOMB}, this number was
141141 * superimposed over the icon in the status bar. Starting with
142142 * {@link android.os.Build.VERSION_CODES#HONEYCOMB}, the template used by
143143 * {@link Notification.Builder} has displayed the number in the expanded notification view.
144- *
144+ *
145145 * If the number is 0 or negative, it is never shown.
146146 */
147147 public int number ;
@@ -343,7 +343,7 @@ public class Notification implements Parcelable
343343
344344 /**
345345 * Obsolete flag indicating high-priority notifications; use the priority field instead.
346- *
346+ *
347347 * @deprecated Use {@link #priority} with a positive value.
348348 */
349349 public static final int FLAG_HIGH_PRIORITY = 0x00000080 ;
@@ -384,15 +384,15 @@ public class Notification implements Parcelable
384384
385385 /**
386386 * Relative priority for this notification.
387- *
387+ *
388388 * Priority is an indication of how much of the user's valuable attention should be consumed by
389389 * this notification. Low-priority notifications may be hidden from the user in certain
390390 * situations, while the user might be interrupted for a higher-priority notification. The
391- * system will make a determination about how to interpret notification priority as described in
391+ * system will make a determination about how to interpret notification priority as described in
392392 * MUMBLE MUMBLE.
393393 */
394394 public int priority ;
395-
395+
396396 /**
397397 * @hide
398398 * Notification type: incoming call (voice or video) or similar synchronous communication request.
@@ -643,7 +643,7 @@ public Notification clone() {
643643 that .flags = this .flags ;
644644
645645 that .priority = this .priority ;
646-
646+
647647 final String [] thiskind = this .kind ;
648648 if (thiskind != null ) {
649649 final int N = thiskind .length ;
@@ -742,9 +742,9 @@ public void writeToParcel(Parcel parcel, int flags)
742742 }
743743
744744 parcel .writeInt (priority );
745-
745+
746746 parcel .writeStringArray (kind ); // ok for null
747-
747+
748748 if (extras != null ) {
749749 parcel .writeInt (1 );
750750 extras .writeToParcel (parcel , 0 );
@@ -912,16 +912,16 @@ public void setUser(UserHandle user) {
912912
913913 /**
914914 * Builder class for {@link Notification} objects.
915- *
915+ *
916916 * Provides a convenient way to set the various fields of a {@link Notification} and generate
917917 * content views using the platform's notification layout template. If your app supports
918918 * versions of Android as old as API level 4, you can instead use
919919 * {@link android.support.v4.app.NotificationCompat.Builder NotificationCompat.Builder},
920920 * available in the <a href="{@docRoot}tools/extras/support-library.html">Android Support
921921 * library</a>.
922- *
922+ *
923923 * <p>Example:
924- *
924+ *
925925 * <pre class="prettyprint">
926926 * Notification noti = new Notification.Builder(mContext)
927927 * .setContentTitle("New mail from " + sender.toString())
@@ -1021,8 +1021,8 @@ public Builder setShowWhen(boolean show) {
10211021
10221022 /**
10231023 * Show the {@link Notification#when} field as a stopwatch.
1024- *
1025- * Instead of presenting <code>when</code> as a timestamp, the notification will show an
1024+ *
1025+ * Instead of presenting <code>when</code> as a timestamp, the notification will show an
10261026 * automatically updating display of the minutes and seconds since <code>when</code>.
10271027 *
10281028 * Useful when showing an elapsed time (like an ongoing phone call).
@@ -1088,7 +1088,7 @@ public Builder setContentText(CharSequence text) {
10881088 }
10891089
10901090 /**
1091- * Set the third line of text in the platform notification template.
1091+ * Set the third line of text in the platform notification template.
10921092 * Don't use if you're also using {@link #setProgress(int, int, boolean)}; they occupy the same location in the standard template.
10931093 */
10941094 public Builder setSubText (CharSequence text ) {
@@ -1350,12 +1350,12 @@ public Builder setPriority(int pri) {
13501350 mPriority = pri ;
13511351 return this ;
13521352 }
1353-
1353+
13541354 /**
13551355 * @hide
1356- *
1356+ *
13571357 * Add a kind (category) to this notification. Optional.
1358- *
1358+ *
13591359 * @see Notification#kind
13601360 */
13611361 public Builder addKind (String k ) {
@@ -1381,6 +1381,8 @@ public Builder setExtras(Bundle bag) {
13811381 /**
13821382 * Add an action to this notification. Actions are typically displayed by
13831383 * the system as a button adjacent to the notification content.
1384+ * <br>
1385+ * A notification displays up to 3 actions, from left to right in the order they were added.
13841386 *
13851387 * @param icon Resource ID of a drawable that represents the action.
13861388 * @param title Text describing the action.
@@ -1563,7 +1565,7 @@ private RemoteViews makeBigContentView() {
15631565
15641566 private RemoteViews generateActionButton (Action action ) {
15651567 final boolean tombstone = (action .actionIntent == null );
1566- RemoteViews button = new RemoteViews (mContext .getPackageName (),
1568+ RemoteViews button = new RemoteViews (mContext .getPackageName (),
15671569 tombstone ? R .layout .notification_action_tombstone
15681570 : R .layout .notification_action );
15691571 button .setTextViewCompoundDrawables (R .id .action0 , action .icon , 0 , 0 , 0 );
@@ -1722,7 +1724,7 @@ protected RemoteViews getStandardView(int layoutId) {
17221724
17231725 /**
17241726 * Helper class for generating large-format notifications that include a large image attachment.
1725- *
1727+ *
17261728 * This class is a "rebuilder": It consumes a Builder object and modifies its behavior, like so:
17271729 * <pre class="prettyprint">
17281730 * Notification noti = new Notification.BigPictureStyle(
@@ -1734,7 +1736,7 @@ protected RemoteViews getStandardView(int layoutId) {
17341736 * .bigPicture(aBigBitmap)
17351737 * .build();
17361738 * </pre>
1737- *
1739+ *
17381740 * @see Notification#bigContentView
17391741 */
17401742 public static class BigPictureStyle extends Style {
@@ -1805,7 +1807,7 @@ public Notification build() {
18051807
18061808 /**
18071809 * Helper class for generating large-format notifications that include a lot of text.
1808- *
1810+ *
18091811 * This class is a "rebuilder": It consumes a Builder object and modifies its behavior, like so:
18101812 * <pre class="prettyprint">
18111813 * Notification noti = new Notification.BigTextStyle(
@@ -1817,7 +1819,7 @@ public Notification build() {
18171819 * .bigText(aVeryLongString)
18181820 * .build();
18191821 * </pre>
1820- *
1822+ *
18211823 * @see Notification#bigContentView
18221824 */
18231825 public static class BigTextStyle extends Style {
@@ -1862,7 +1864,7 @@ private RemoteViews makeBigContentView() {
18621864 mBuilder .mContentText = null ;
18631865
18641866 RemoteViews contentView = getStandardView (R .layout .notification_template_big_text );
1865-
1867+
18661868 if (hadThreeLines ) {
18671869 // vertical centering
18681870 contentView .setViewPadding (R .id .line1 , 0 , 0 , 0 , 0 );
@@ -1886,7 +1888,7 @@ public Notification build() {
18861888
18871889 /**
18881890 * Helper class for generating large-format notifications that include a list of (up to 5) strings.
1889- *
1891+ *
18901892 * This class is a "rebuilder": It consumes a Builder object and modifies its behavior, like so:
18911893 * <pre class="prettyprint">
18921894 * Notification noti = new Notification.InboxStyle(
@@ -1901,7 +1903,7 @@ public Notification build() {
19011903 * .setSummaryText("+3 more")
19021904 * .build();
19031905 * </pre>
1904- *
1906+ *
19051907 * @see Notification#bigContentView
19061908 */
19071909 public static class InboxStyle extends Style {
0 commit comments