summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/api/module-lib-current.txt4
-rw-r--r--core/java/android/os/storage/StorageVolume.java11
2 files changed, 13 insertions, 2 deletions
diff --git a/core/api/module-lib-current.txt b/core/api/module-lib-current.txt
index e3b7c8898039..8dc5c15d48ce 100644
--- a/core/api/module-lib-current.txt
+++ b/core/api/module-lib-current.txt
@@ -312,6 +312,10 @@ package android.os.storage {
field public static final int APP_IO_BLOCKED_REASON_TRANSCODING = 0; // 0x0
}
+ public final class StorageVolume implements android.os.Parcelable {
+ method @NonNull public android.os.UserHandle getOwner();
+ }
+
}
package android.provider {
diff --git a/core/java/android/os/storage/StorageVolume.java b/core/java/android/os/storage/StorageVolume.java
index b5abe2a3e311..36177c46ebef 100644
--- a/core/java/android/os/storage/StorageVolume.java
+++ b/core/java/android/os/storage/StorageVolume.java
@@ -16,6 +16,8 @@
package android.os.storage;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
@@ -289,9 +291,14 @@ public final class StorageVolume implements Parcelable {
return mMaxFileSize;
}
- /** {@hide} */
+ /**
+ * Returns the user that owns this volume
+ *
+ * {@hide}
+ */
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
- public UserHandle getOwner() {
+ @SystemApi(client = MODULE_LIBRARIES)
+ public @NonNull UserHandle getOwner() {
return mOwner;
}