Merge "Open up getCloudMediaProvider to mainline modules." into tm-dev am: 872eecc6a7

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16980672

Change-Id: I43c2d7860be67563dadd77f86c53e3f87c98da02
This commit is contained in:
Kweku Adams
2022-02-23 18:33:37 +00:00
committed by Automerger Merge Worker
2 changed files with 11 additions and 2 deletions

View File

@@ -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);

View File

@@ -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();