Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa04f703 authored by Tor Norbye's avatar Tor Norbye
Browse files

@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
parent e5377b05
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -104,7 +104,8 @@ public class ContactsUtils {
     * 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 {}

    /**