diff options
author | Sudheer Shanka <sudheersai@google.com> | 2020-02-27 10:13:08 -0800 |
---|---|---|
committer | Sudheer Shanka <sudheersai@google.com> | 2020-03-09 12:53:59 -0700 |
commit | 0b87215a3570f075cab6eabc89e60c0ac57cffb4 (patch) | |
tree | 6aebcbc96e5c0f5de952caa04820ae83336edb0a /apex/blobstore/framework | |
parent | 606626e020abd13b87af7e2db59f6dafaef24452 (diff) |
Address API feedback.
- Rename deleteSession() to abandonSession().
- Update javadoc for releaseLease() and Session.close().
Bug: 150220575
Test: atest --test-mapping apex/blobstore
Change-Id: I68de966e195fadc1fbfad36ee0dbb40ccae6cdda
Diffstat (limited to 'apex/blobstore/framework')
-rw-r--r-- | apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java | 14 | ||||
-rw-r--r-- | apex/blobstore/framework/java/android/app/blob/IBlobStoreManager.aidl | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java b/apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java index d1e28e99b6d6..ef5fcaf1c73e 100644 --- a/apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java +++ b/apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java @@ -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. @@ -599,7 +599,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. diff --git a/apex/blobstore/framework/java/android/app/blob/IBlobStoreManager.aidl b/apex/blobstore/framework/java/android/app/blob/IBlobStoreManager.aidl index a85a25c9c4ad..0ff6a55dd493 100644 --- a/apex/blobstore/framework/java/android/app/blob/IBlobStoreManager.aidl +++ b/apex/blobstore/framework/java/android/app/blob/IBlobStoreManager.aidl @@ -24,7 +24,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); |