diff options
| -rw-r--r-- | core/api/module-lib-current.txt | 1 | ||||
| -rw-r--r-- | core/java/android/os/storage/StorageManager.java | 12 |
2 files changed, 11 insertions, 2 deletions
diff --git a/core/api/module-lib-current.txt b/core/api/module-lib-current.txt index 594f46b6694b..7ec239d681d0 100644 --- a/core/api/module-lib-current.txt +++ b/core/api/module-lib-current.txt @@ -413,6 +413,7 @@ package android.os.storage { public class StorageManager { method public long computeStorageCacheBytes(@NonNull java.io.File); + method @Nullable public String getCloudMediaProvider(); method public void notifyAppIoBlocked(@NonNull java.util.UUID, int, int, int); method public void notifyAppIoResumed(@NonNull java.util.UUID, int, int, int); method public void setCloudMediaProvider(@Nullable String); diff --git a/core/java/android/os/storage/StorageManager.java b/core/java/android/os/storage/StorageManager.java index cc9833997102..48e2827f19e1 100644 --- a/core/java/android/os/storage/StorageManager.java +++ b/core/java/android/os/storage/StorageManager.java @@ -3022,9 +3022,17 @@ public class StorageManager { } } - /** @hide */ - @TestApi + /** + * Returns the authority of the current cloud media provider that was set by the + * {@link android.service.storage.ExternalStorageService} holding the + * {@link android.Manifest.permission#WRITE_MEDIA_STORAGE} permission via + * {@link #setCloudMediaProvider(String)}. + * + * @hide + */ @Nullable + @TestApi + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public String getCloudMediaProvider() { try { return mStorageManager.getCloudMediaProvider(); |