@IntDef is switching from long to int values
This cast will be necessary when the @IntDef annotation
values changes type from long to int, and the cast is
safe because the value is itself not used at all (this
is a source retention annotation, and the static analyzer
is using the field reference itself, not the value --
that's the whole point of this annotation.)
Test: The compiler
Change-Id: I88d2fd238c9b405a8140e06d5d8185596236ae38
diff --git a/src/com/android/contacts/ContactsUtils.java b/src/com/android/contacts/ContactsUtils.java
index 69890b4..4fd9cc1 100644
--- a/src/com/android/contacts/ContactsUtils.java
+++ b/src/com/android/contacts/ContactsUtils.java
@@ -104,7 +104,8 @@
* dialer is running inside Work Profile.
*/
@Retention(RetentionPolicy.SOURCE)
- @IntDef({USER_TYPE_CURRENT, USER_TYPE_WORK})
+ // TODO: Switch to @LongDef once @LongDef is available in the support library
+ @IntDef({(int)USER_TYPE_CURRENT, (int)USER_TYPE_WORK})
public @interface UserType {}
/**