From fc99e08899dec8592286579053d77a01c6889a3d Mon Sep 17 00:00:00 2001 From: Biswarup Pal Date: Thu, 4 Feb 2021 16:18:51 +0000 Subject: Rename onFreeCacheRequested API Rename onFreeCacheRequested to onFreeCache in ExternalStorageService Test: m Bug: 179163256 Change-Id: If79a3f131faac23e8e44ed90f7b0962de1694500 --- core/api/system-current.txt | 2 +- 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 1977babe0bfb..4f70dd463671 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); -- cgit v1.2.3-59-g8ed1b