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

Commit 73d78256 authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Android (Google) Code Review
Browse files

Merge "Merge "Address API feedback." into rvc-dev am: a5d63927 am:...

Merge "Merge "Address API feedback." into rvc-dev am: a5d63927 am: ec17c0a3" into rvc-d1-dev-plus-aosp
parents 38e1b24e d8f57088
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -215,7 +215,7 @@ public class BlobStoreManager {
    }

    /**
     * Delete an existing session and any data that was written to that session so far.
     * Abandons an existing session and deletes any data that was written to that session so far.
     *
     * @param sessionId a unique id obtained via {@link #createSession(BlobHandle)} that
     *                  represents a particular session.
@@ -224,9 +224,9 @@ public class BlobStoreManager {
     * @throws SecurityException when the caller does not own the session, or
     *                           the session does not exist or is invalid.
     */
    public void deleteSession(@IntRange(from = 1) long sessionId) throws IOException {
    public void abandonSession(@IntRange(from = 1) long sessionId) throws IOException {
        try {
            mService.deleteSession(sessionId, mContext.getOpPackageName());
            mService.abandonSession(sessionId, mContext.getOpPackageName());
        } catch (ParcelableException e) {
            e.maybeRethrow(IOException.class);
            throw new RuntimeException(e);
@@ -454,13 +454,13 @@ public class BlobStoreManager {
    }

    /**
     * Release all active leases to the blob represented by {@code blobHandle} which are
     * Release any active lease to the blob represented by {@code blobHandle} which is
     * currently held by the caller.
     *
     * @param blobHandle the {@link BlobHandle} representing the blob that the caller wants to
     *                   release the leases for.
     *                   release the lease for.
     *
     * @throws IOException when there is an I/O error while releasing the releases to the blob.
     * @throws IOException when there is an I/O error while releasing the release to the blob.
     * @throws SecurityException when the blob represented by the {@code blobHandle} does not
     *                           exist or the caller does not have access to it.
     * @throws IllegalArgumentException when {@code blobHandle} is invalid.
@@ -625,7 +625,7 @@ public class BlobStoreManager {

        /**
         * Close this session. It can be re-opened for writing/reading if it has not been
         * abandoned (using {@link #abandon}) or closed (using {@link #commit}).
         * abandoned (using {@link #abandon}) or committed (using {@link #commit}).
         *
         * @throws IOException when there is an I/O error while closing the session.
         * @throws SecurityException when the caller is not the owner of the session.
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ interface IBlobStoreManager {
    long createSession(in BlobHandle handle, in String packageName);
    IBlobStoreSession openSession(long sessionId, in String packageName);
    ParcelFileDescriptor openBlob(in BlobHandle handle, in String packageName);
    void deleteSession(long sessionId, in String packageName);
    void abandonSession(long sessionId, in String packageName);

    void acquireLease(in BlobHandle handle, int descriptionResId, in CharSequence description,
            long leaseTimeoutMillis, in String packageName);
+4 −4
Original line number Diff line number Diff line
@@ -349,7 +349,7 @@ public class BlobStoreManagerService extends SystemService {
        return session;
    }

    private void deleteSessionInternal(long sessionId,
    private void abandonSessionInternal(long sessionId,
            int callingUid, String callingPackage) {
        synchronized (mBlobsLock) {
            final BlobStoreSession session = openSessionInternal(sessionId,
@@ -357,7 +357,7 @@ public class BlobStoreManagerService extends SystemService {
            session.open();
            session.abandon();
            if (LOGV) {
                Slog.v(TAG, "Deleted session with id " + sessionId
                Slog.v(TAG, "Abandoned session with id " + sessionId
                        + "; callingUid=" + callingUid + ", callingPackage=" + callingPackage);
            }
            writeBlobSessionsAsync();
@@ -1215,7 +1215,7 @@ public class BlobStoreManagerService extends SystemService {
        }

        @Override
        public void deleteSession(@IntRange(from = 1) long sessionId,
        public void abandonSession(@IntRange(from = 1) long sessionId,
                @NonNull String packageName) {
            Preconditions.checkArgumentPositive(sessionId,
                    "sessionId must be positive: " + sessionId);
@@ -1224,7 +1224,7 @@ public class BlobStoreManagerService extends SystemService {
            final int callingUid = Binder.getCallingUid();
            verifyCallingPackage(callingUid, packageName);

            deleteSessionInternal(sessionId, callingUid, packageName);
            abandonSessionInternal(sessionId, callingUid, packageName);
        }

        @Override
+1 −1
Original line number Diff line number Diff line
@@ -7583,12 +7583,12 @@ package android.app.blob {
  }
  public class BlobStoreManager {
    method public void abandonSession(@IntRange(from=1) long) throws java.io.IOException;
    method public void acquireLease(@NonNull android.app.blob.BlobHandle, @IdRes int, long) throws java.io.IOException;
    method public void acquireLease(@NonNull android.app.blob.BlobHandle, @NonNull CharSequence, long) throws java.io.IOException;
    method public void acquireLease(@NonNull android.app.blob.BlobHandle, @IdRes int) throws java.io.IOException;
    method public void acquireLease(@NonNull android.app.blob.BlobHandle, @NonNull CharSequence) throws java.io.IOException;
    method @IntRange(from=1) public long createSession(@NonNull android.app.blob.BlobHandle) throws java.io.IOException;
    method public void deleteSession(@IntRange(from=1) long) throws java.io.IOException;
    method @NonNull public android.os.ParcelFileDescriptor openBlob(@NonNull android.app.blob.BlobHandle) throws java.io.IOException;
    method @NonNull public android.app.blob.BlobStoreManager.Session openSession(@IntRange(from=1) long) throws java.io.IOException;
    method public void releaseLease(@NonNull android.app.blob.BlobHandle) throws java.io.IOException;