diff options
author | Sudheer Shanka <sudheersai@google.com> | 2020-03-10 02:37:10 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-03-10 02:37:10 +0000 |
commit | a5d63927da1fb9573549de7b87142cfcdde416b3 (patch) | |
tree | 5dffd8b322dbde0baaf744401e7e4d34773456fc /apex/blobstore | |
parent | b09e2c9584236f792a6aaa85ed6b03a190d1489a (diff) | |
parent | 0b87215a3570f075cab6eabc89e60c0ac57cffb4 (diff) |
Merge "Address API feedback." into rvc-dev
Diffstat (limited to 'apex/blobstore')
3 files changed, 12 insertions, 12 deletions
diff --git a/apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java b/apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java index 2d4765fea145..814ab6dbd7fd 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. @@ -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. diff --git a/apex/blobstore/framework/java/android/app/blob/IBlobStoreManager.aidl b/apex/blobstore/framework/java/android/app/blob/IBlobStoreManager.aidl index beeb03f06ed7..e78381359b41 100644 --- a/apex/blobstore/framework/java/android/app/blob/IBlobStoreManager.aidl +++ b/apex/blobstore/framework/java/android/app/blob/IBlobStoreManager.aidl @@ -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); diff --git a/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java b/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java index ed3dda44e131..53a97cefa59b 100644 --- a/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java +++ b/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java @@ -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 |