diff options
| author | Jeff Sharkey <jsharkey@android.com> | 2017-04-24 11:18:03 -0600 |
|---|---|---|
| committer | Jeff Sharkey <jsharkey@android.com> | 2017-04-24 13:20:46 -0600 |
| commit | 30e06bb668f2e4b024c4ebc2a131de91c96de5eb (patch) | |
| tree | 23912af279b2c4c54de4b213712eb8528dfd34c3 /core/java/android/app/Notification.java | |
| parent | 4d23f258d4c15df9329d9c66ee902afa78cebca7 (diff) | |
Even more auto-doc work.
Update docs based on what new lint detector found. Add new @IntDef
to parameters or methods returning constants or flags, and add
@RequiresPermission to methods mentioning permissions.
Test: make -j32 offline-sdk-docs
Bug: 37526420
Change-Id: I7f640f7883fcb66b911a52ae93b83f77306571ec
Diffstat (limited to 'core/java/android/app/Notification.java')
| -rw-r--r-- | core/java/android/app/Notification.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index 602cccb1070d..2b4fb1956c42 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -676,7 +676,16 @@ public class Notification implements Parcelable * Finally, a notification can be made {@link #VISIBILITY_SECRET}, which will suppress its icon * and ticker until the user has bypassed the lockscreen. */ - public int visibility; + public @Visibility int visibility; + + /** @hide */ + @IntDef(prefix = { "VISIBILITY_" }, value = { + VISIBILITY_PUBLIC, + VISIBILITY_PRIVATE, + VISIBILITY_SECRET, + }) + @Retention(RetentionPolicy.SOURCE) + public @interface Visibility {} /** * Notification visibility: Show this notification in its entirety on all lockscreens. @@ -3545,12 +3554,9 @@ public class Notification implements Parcelable /** * Specify the value of {@link #visibility}. * - * @param visibility One of {@link #VISIBILITY_PRIVATE} (the default), - * {@link #VISIBILITY_SECRET}, or {@link #VISIBILITY_PUBLIC}. - * * @return The same Builder. */ - public Builder setVisibility(int visibility) { + public Builder setVisibility(@Visibility int visibility) { mN.visibility = visibility; return this; } |
