diff options
Diffstat (limited to 'core/java/android/app/Notification.java')
-rw-r--r-- | core/java/android/app/Notification.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index 87e744c..9c00e1c 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -16,6 +16,7 @@ package android.app; +import android.annotation.DrawableRes; import android.annotation.IntDef; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; @@ -165,6 +166,7 @@ public class Notification implements Parcelable * The resource id of a drawable to use as the icon in the status bar. * This is required; notifications with an invalid icon resource will not be shown. */ + @DrawableRes public int icon; /** @@ -2128,7 +2130,7 @@ public class Notification implements Parcelable * A resource ID in the application's package of the drawable to use. * @see Notification#icon */ - public Builder setSmallIcon(int icon) { + public Builder setSmallIcon(@DrawableRes int icon) { mSmallIcon = icon; return this; } @@ -2144,7 +2146,7 @@ public class Notification implements Parcelable * @see Notification#icon * @see Notification#iconLevel */ - public Builder setSmallIcon(int icon, int level) { + public Builder setSmallIcon(@DrawableRes int icon, int level) { mSmallIcon = icon; mSmallIconLevel = level; return this; |