diff options
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/content/ContentResolver.java | 6 | ||||
| -rw-r--r-- | core/java/android/os/UserHandle.java | 11 | ||||
| -rw-r--r-- | core/java/android/provider/MediaStore.java | 2 |
3 files changed, 10 insertions, 9 deletions
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java index 1e4b1e7b45c6..fa85f0ae1670 100644 --- a/core/java/android/content/ContentResolver.java +++ b/core/java/android/content/ContentResolver.java @@ -623,7 +623,7 @@ public abstract class ContentResolver implements ContentInterface { } /** {@hide} */ - public static ContentResolver wrap(@NonNull ContentInterface wrapped) { + public static @NonNull ContentResolver wrap(@NonNull ContentInterface wrapped) { Preconditions.checkNotNull(wrapped); return new ContentResolver(null, wrapped) { @@ -654,7 +654,7 @@ public abstract class ContentResolver implements ContentInterface { * Create a {@link ContentResolver} instance that redirects all its methods * to the given {@link ContentProvider}. */ - public static ContentResolver wrap(@NonNull ContentProvider wrapped) { + public static @NonNull ContentResolver wrap(@NonNull ContentProvider wrapped) { return wrap((ContentInterface) wrapped); } @@ -662,7 +662,7 @@ public abstract class ContentResolver implements ContentInterface { * Create a {@link ContentResolver} instance that redirects all its methods * to the given {@link ContentProviderClient}. */ - public static ContentResolver wrap(@NonNull ContentProviderClient wrapped) { + public static @NonNull ContentResolver wrap(@NonNull ContentProviderClient wrapped) { return wrap((ContentInterface) wrapped); } diff --git a/core/java/android/os/UserHandle.java b/core/java/android/os/UserHandle.java index 82d1b1a5a631..286185b8bda5 100644 --- a/core/java/android/os/UserHandle.java +++ b/core/java/android/os/UserHandle.java @@ -17,6 +17,7 @@ package android.os; import android.annotation.AppIdInt; +import android.annotation.NonNull; import android.annotation.SystemApi; import android.annotation.TestApi; import android.annotation.UserIdInt; @@ -40,7 +41,7 @@ public final class UserHandle implements Parcelable { /** @hide A user handle to indicate all users on the device */ @SystemApi @TestApi - public static final UserHandle ALL = new UserHandle(USER_ALL); + public static final @NonNull UserHandle ALL = new UserHandle(USER_ALL); /** @hide A user id to indicate the currently active user */ public static final @UserIdInt int USER_CURRENT = -2; @@ -48,7 +49,7 @@ public final class UserHandle implements Parcelable { /** @hide A user handle to indicate the current user of the device */ @SystemApi @TestApi - public static final UserHandle CURRENT = new UserHandle(USER_CURRENT); + public static final @NonNull UserHandle CURRENT = new UserHandle(USER_CURRENT); /** @hide A user id to indicate that we would like to send to the current * user, but if this is calling from a user process then we will send it @@ -58,7 +59,7 @@ public final class UserHandle implements Parcelable { /** @hide A user handle to indicate that we would like to send to the current * user, but if this is calling from a user process then we will send it * to the caller's user instead of failing with a security exception */ - public static final UserHandle CURRENT_OR_SELF = new UserHandle(USER_CURRENT_OR_SELF); + public static final @NonNull UserHandle CURRENT_OR_SELF = new UserHandle(USER_CURRENT_OR_SELF); /** @hide An undefined user id */ public static final @UserIdInt int USER_NULL = -10000; @@ -77,7 +78,7 @@ public final class UserHandle implements Parcelable { * check the target user's flag {@link android.content.pm.UserInfo#isAdmin}. */ @Deprecated - public static final UserHandle OWNER = new UserHandle(USER_OWNER); + public static final @NonNull UserHandle OWNER = new UserHandle(USER_OWNER); /** @hide A user id constant to indicate the "system" user of the device */ public static final @UserIdInt int USER_SYSTEM = 0; @@ -88,7 +89,7 @@ public final class UserHandle implements Parcelable { /** @hide A user handle to indicate the "system" user of the device */ @SystemApi @TestApi - public static final UserHandle SYSTEM = new UserHandle(USER_SYSTEM); + public static final @NonNull UserHandle SYSTEM = new UserHandle(USER_SYSTEM); /** * @hide Enable multi-user related side effects. Set this to false if diff --git a/core/java/android/provider/MediaStore.java b/core/java/android/provider/MediaStore.java index 917b5c2615db..14863338f182 100644 --- a/core/java/android/provider/MediaStore.java +++ b/core/java/android/provider/MediaStore.java @@ -98,7 +98,7 @@ public final class MediaStore { /** The authority for the media provider */ public static final String AUTHORITY = "media"; /** A content:// style uri to the authority for the media provider */ - public static final Uri AUTHORITY_URI = Uri.parse("content://" + AUTHORITY); + public static final @NonNull Uri AUTHORITY_URI = Uri.parse("content://" + AUTHORITY); /** * Volume name used for content on "internal" storage of device. This |
