Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 27b89a6d authored by Biswarup Pal's avatar Biswarup Pal Committed by Android (Google) Code Review
Browse files

Merge "Rename onFreeCacheRequested API" into sc-dev

parents 26737223 fc99e088
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+2 −2
Original line number Diff line number Diff line
@@ -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);