Add @NonNull / @Nullable annotations to android.mtp API.
BUG=26758882
Change-Id: Ic86d2253114b487d68a069f3e63f19b200d6cb97
diff --git a/media/java/android/mtp/MtpStorageInfo.java b/media/java/android/mtp/MtpStorageInfo.java
index d1b86fc..af9f24a 100644
--- a/media/java/android/mtp/MtpStorageInfo.java
+++ b/media/java/android/mtp/MtpStorageInfo.java
@@ -16,6 +16,8 @@
package android.mtp;
+import android.annotation.NonNull;
+
/**
* This class encapsulates information about a storage unit on an MTP device.
* This corresponds to the StorageInfo Dataset described in
@@ -68,7 +70,7 @@
*
* @return the storage unit description
*/
- public final String getDescription() {
+ public final @NonNull String getDescription() {
return mDescription;
}
@@ -77,7 +79,7 @@
*
* @return the storage volume identifier
*/
- public final String getVolumeIdentifier() {
+ public final @NonNull String getVolumeIdentifier() {
return mVolumeIdentifier;
}
}