Loading apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java +7 −7 Original line number Original line Diff line number Diff line Loading @@ -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 * @param sessionId a unique id obtained via {@link #createSession(BlobHandle)} that * represents a particular session. * represents a particular session. Loading @@ -224,9 +224,9 @@ public class BlobStoreManager { * @throws SecurityException when the caller does not own the session, or * @throws SecurityException when the caller does not own the session, or * the session does not exist or is invalid. * 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 { try { mService.deleteSession(sessionId, mContext.getOpPackageName()); mService.abandonSession(sessionId, mContext.getOpPackageName()); } catch (ParcelableException e) { } catch (ParcelableException e) { e.maybeRethrow(IOException.class); e.maybeRethrow(IOException.class); throw new RuntimeException(e); throw new RuntimeException(e); Loading Loading @@ -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. * currently held by the caller. * * * @param blobHandle the {@link BlobHandle} representing the blob that the caller wants to * @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 * @throws SecurityException when the blob represented by the {@code blobHandle} does not * exist or the caller does not have access to it. * exist or the caller does not have access to it. * @throws IllegalArgumentException when {@code blobHandle} is invalid. * @throws IllegalArgumentException when {@code blobHandle} is invalid. Loading Loading @@ -625,7 +625,7 @@ public class BlobStoreManager { /** /** * Close this session. It can be re-opened for writing/reading if it has not been * 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 IOException when there is an I/O error while closing the session. * @throws SecurityException when the caller is not the owner of the session. * @throws SecurityException when the caller is not the owner of the session. Loading apex/blobstore/framework/java/android/app/blob/IBlobStoreManager.aidl +1 −1 Original line number Original line Diff line number Diff line Loading @@ -25,7 +25,7 @@ interface IBlobStoreManager { long createSession(in BlobHandle handle, in String packageName); long createSession(in BlobHandle handle, in String packageName); IBlobStoreSession openSession(long sessionId, in String packageName); IBlobStoreSession openSession(long sessionId, in String packageName); ParcelFileDescriptor openBlob(in BlobHandle handle, 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, void acquireLease(in BlobHandle handle, int descriptionResId, in CharSequence description, long leaseTimeoutMillis, in String packageName); long leaseTimeoutMillis, in String packageName); Loading apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java +4 −4 Original line number Original line Diff line number Diff line Loading @@ -349,7 +349,7 @@ public class BlobStoreManagerService extends SystemService { return session; return session; } } private void deleteSessionInternal(long sessionId, private void abandonSessionInternal(long sessionId, int callingUid, String callingPackage) { int callingUid, String callingPackage) { synchronized (mBlobsLock) { synchronized (mBlobsLock) { final BlobStoreSession session = openSessionInternal(sessionId, final BlobStoreSession session = openSessionInternal(sessionId, Loading @@ -357,7 +357,7 @@ public class BlobStoreManagerService extends SystemService { session.open(); session.open(); session.abandon(); session.abandon(); if (LOGV) { if (LOGV) { Slog.v(TAG, "Deleted session with id " + sessionId Slog.v(TAG, "Abandoned session with id " + sessionId + "; callingUid=" + callingUid + ", callingPackage=" + callingPackage); + "; callingUid=" + callingUid + ", callingPackage=" + callingPackage); } } writeBlobSessionsAsync(); writeBlobSessionsAsync(); Loading Loading @@ -1215,7 +1215,7 @@ public class BlobStoreManagerService extends SystemService { } } @Override @Override public void deleteSession(@IntRange(from = 1) long sessionId, public void abandonSession(@IntRange(from = 1) long sessionId, @NonNull String packageName) { @NonNull String packageName) { Preconditions.checkArgumentPositive(sessionId, Preconditions.checkArgumentPositive(sessionId, "sessionId must be positive: " + sessionId); "sessionId must be positive: " + sessionId); Loading @@ -1224,7 +1224,7 @@ public class BlobStoreManagerService extends SystemService { final int callingUid = Binder.getCallingUid(); final int callingUid = Binder.getCallingUid(); verifyCallingPackage(callingUid, packageName); verifyCallingPackage(callingUid, packageName); deleteSessionInternal(sessionId, callingUid, packageName); abandonSessionInternal(sessionId, callingUid, packageName); } } @Override @Override Loading api/current.txt +1 −1 Original line number Original line Diff line number Diff line Loading @@ -7583,12 +7583,12 @@ package android.app.blob { } } public class BlobStoreManager { 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, @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, @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, @IdRes int) throws java.io.IOException; method public void acquireLease(@NonNull android.app.blob.BlobHandle, @NonNull CharSequence) 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 @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.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 @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; method public void releaseLease(@NonNull android.app.blob.BlobHandle) throws java.io.IOException; Loading
apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java +7 −7 Original line number Original line Diff line number Diff line Loading @@ -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 * @param sessionId a unique id obtained via {@link #createSession(BlobHandle)} that * represents a particular session. * represents a particular session. Loading @@ -224,9 +224,9 @@ public class BlobStoreManager { * @throws SecurityException when the caller does not own the session, or * @throws SecurityException when the caller does not own the session, or * the session does not exist or is invalid. * 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 { try { mService.deleteSession(sessionId, mContext.getOpPackageName()); mService.abandonSession(sessionId, mContext.getOpPackageName()); } catch (ParcelableException e) { } catch (ParcelableException e) { e.maybeRethrow(IOException.class); e.maybeRethrow(IOException.class); throw new RuntimeException(e); throw new RuntimeException(e); Loading Loading @@ -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. * currently held by the caller. * * * @param blobHandle the {@link BlobHandle} representing the blob that the caller wants to * @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 * @throws SecurityException when the blob represented by the {@code blobHandle} does not * exist or the caller does not have access to it. * exist or the caller does not have access to it. * @throws IllegalArgumentException when {@code blobHandle} is invalid. * @throws IllegalArgumentException when {@code blobHandle} is invalid. Loading Loading @@ -625,7 +625,7 @@ public class BlobStoreManager { /** /** * Close this session. It can be re-opened for writing/reading if it has not been * 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 IOException when there is an I/O error while closing the session. * @throws SecurityException when the caller is not the owner of the session. * @throws SecurityException when the caller is not the owner of the session. Loading
apex/blobstore/framework/java/android/app/blob/IBlobStoreManager.aidl +1 −1 Original line number Original line Diff line number Diff line Loading @@ -25,7 +25,7 @@ interface IBlobStoreManager { long createSession(in BlobHandle handle, in String packageName); long createSession(in BlobHandle handle, in String packageName); IBlobStoreSession openSession(long sessionId, in String packageName); IBlobStoreSession openSession(long sessionId, in String packageName); ParcelFileDescriptor openBlob(in BlobHandle handle, 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, void acquireLease(in BlobHandle handle, int descriptionResId, in CharSequence description, long leaseTimeoutMillis, in String packageName); long leaseTimeoutMillis, in String packageName); Loading
apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java +4 −4 Original line number Original line Diff line number Diff line Loading @@ -349,7 +349,7 @@ public class BlobStoreManagerService extends SystemService { return session; return session; } } private void deleteSessionInternal(long sessionId, private void abandonSessionInternal(long sessionId, int callingUid, String callingPackage) { int callingUid, String callingPackage) { synchronized (mBlobsLock) { synchronized (mBlobsLock) { final BlobStoreSession session = openSessionInternal(sessionId, final BlobStoreSession session = openSessionInternal(sessionId, Loading @@ -357,7 +357,7 @@ public class BlobStoreManagerService extends SystemService { session.open(); session.open(); session.abandon(); session.abandon(); if (LOGV) { if (LOGV) { Slog.v(TAG, "Deleted session with id " + sessionId Slog.v(TAG, "Abandoned session with id " + sessionId + "; callingUid=" + callingUid + ", callingPackage=" + callingPackage); + "; callingUid=" + callingUid + ", callingPackage=" + callingPackage); } } writeBlobSessionsAsync(); writeBlobSessionsAsync(); Loading Loading @@ -1215,7 +1215,7 @@ public class BlobStoreManagerService extends SystemService { } } @Override @Override public void deleteSession(@IntRange(from = 1) long sessionId, public void abandonSession(@IntRange(from = 1) long sessionId, @NonNull String packageName) { @NonNull String packageName) { Preconditions.checkArgumentPositive(sessionId, Preconditions.checkArgumentPositive(sessionId, "sessionId must be positive: " + sessionId); "sessionId must be positive: " + sessionId); Loading @@ -1224,7 +1224,7 @@ public class BlobStoreManagerService extends SystemService { final int callingUid = Binder.getCallingUid(); final int callingUid = Binder.getCallingUid(); verifyCallingPackage(callingUid, packageName); verifyCallingPackage(callingUid, packageName); deleteSessionInternal(sessionId, callingUid, packageName); abandonSessionInternal(sessionId, callingUid, packageName); } } @Override @Override Loading
api/current.txt +1 −1 Original line number Original line Diff line number Diff line Loading @@ -7583,12 +7583,12 @@ package android.app.blob { } } public class BlobStoreManager { 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, @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, @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, @IdRes int) throws java.io.IOException; method public void acquireLease(@NonNull android.app.blob.BlobHandle, @NonNull CharSequence) 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 @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.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 @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; method public void releaseLease(@NonNull android.app.blob.BlobHandle) throws java.io.IOException;