diff options
| author | 2021-02-05 17:22:01 +0000 | |
|---|---|---|
| committer | 2021-02-05 17:22:01 +0000 | |
| commit | 27b89a6d12eea16347f9983a6ce9e9cc7b5af0a6 (patch) | |
| tree | eb7f0c902418d680585afb67f3f122fb4416ae49 | |
| parent | 26737223a19c889ba4850d18452710c9ae4619e0 (diff) | |
| parent | fc99e08899dec8592286579053d77a01c6889a3d (diff) | |
Merge "Rename onFreeCacheRequested API" into sc-dev
| -rw-r--r-- | core/api/system-current.txt | 2 | ||||
| -rw-r--r-- | core/java/android/service/storage/ExternalStorageService.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 15accbeb198e..053f6cb4b05b 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -10331,7 +10331,7 @@ package android.service.storage { ctor public ExternalStorageService(); method @NonNull public final android.os.IBinder onBind(@NonNull android.content.Intent); method public abstract void onEndSession(@NonNull String) throws java.io.IOException; - method public void onFreeCacheRequested(@NonNull java.util.UUID, long); + method public void onFreeCache(@NonNull java.util.UUID, long) throws java.io.IOException; method public abstract void onStartSession(@NonNull String, int, @NonNull android.os.ParcelFileDescriptor, @NonNull java.io.File, @NonNull java.io.File) throws java.io.IOException; method public abstract void onVolumeStateChanged(@NonNull android.os.storage.StorageVolume) throws java.io.IOException; field public static final int FLAG_SESSION_ATTRIBUTE_INDEXABLE = 2; // 0x2 diff --git a/core/java/android/service/storage/ExternalStorageService.java b/core/java/android/service/storage/ExternalStorageService.java index 0123c368583c..a750b689ee02 100644 --- a/core/java/android/service/storage/ExternalStorageService.java +++ b/core/java/android/service/storage/ExternalStorageService.java @@ -158,7 +158,7 @@ public abstract class ExternalStorageService extends Service { * @param volumeUuid uuid of the {@link StorageVolume} from which cache needs to be freed * @param bytes number of bytes which need to be freed */ - public void onFreeCacheRequested(@NonNull UUID volumeUuid, @BytesLong long bytes) { + public void onFreeCache(@NonNull UUID volumeUuid, @BytesLong long bytes) throws IOException { throw new UnsupportedOperationException("onFreeCacheRequested not implemented"); } @@ -202,7 +202,7 @@ public abstract class ExternalStorageService extends Service { RemoteCallback callback) { mHandler.post(() -> { try { - onFreeCacheRequested(StorageManager.convert(volumeUuid), bytes); + onFreeCache(StorageManager.convert(volumeUuid), bytes); sendResult(sessionId, null /* throwable */, callback); } catch (Throwable t) { sendResult(sessionId, t, callback); |