Add @ResourceInt annotations on APIs
Change-Id: I119cc059c2f8bd98fd585fc84ac2b1b7d5892a08
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 @@
* 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 @@
* 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 @@
* @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;