summaryrefslogtreecommitdiff
path: root/apex/blobstore/framework
diff options
context:
space:
mode:
authorSudheer Shanka <sudheersai@google.com>2020-02-06 10:57:50 -0800
committerSudheer Shanka <sudheersai@google.com>2020-02-11 16:50:03 -0800
commit86783e168dcd873d10bed1a57cdfac6614a31dc0 (patch)
tree81677f5e7441b37ab00242bbd73b05f02043f46b /apex/blobstore/framework
parent004e36da64e71a7e30bbeef3743bc8e6928ad599 (diff)
Update BlobStoreManager javadoc.
- Indicate that blob could be deleted even if the app acquires a lease. - Indicate the meaning of passing 0 as blob expiry time. Bug: 143559646 Test: atest cts/tests/BlobStore/src/com/android/cts/blob/BlobStoreManagerTest.java Change-Id: I4deb72cb5b5500d42825781e329e9b2ec9839c7b
Diffstat (limited to 'apex/blobstore/framework')
-rw-r--r--apex/blobstore/framework/java/android/app/blob/BlobHandle.java3
-rw-r--r--apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java12
2 files changed, 14 insertions, 1 deletions
diff --git a/apex/blobstore/framework/java/android/app/blob/BlobHandle.java b/apex/blobstore/framework/java/android/app/blob/BlobHandle.java
index d339afac5c77..9c3bd812f298 100644
--- a/apex/blobstore/framework/java/android/app/blob/BlobHandle.java
+++ b/apex/blobstore/framework/java/android/app/blob/BlobHandle.java
@@ -129,7 +129,8 @@ public final class BlobHandle implements Parcelable {
* @param label a label indicating what the blob is, that can be surfaced to the user.
* @param expiryTimeMillis the time in secs after which the blob should be invalidated and not
* allowed to be accessed by any other app,
- * in {@link System#currentTimeMillis()} timebase.
+ * in {@link System#currentTimeMillis()} timebase or {@code 0} to
+ * indicate that there is no expiry time associated with this blob.
* @param tag an opaque {@link String} associated with the blob. The length of the tag
* cannot be more than 128 characters.
*
diff --git a/apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java b/apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java
index 821305e18240..f528fe834b9b 100644
--- a/apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java
+++ b/apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java
@@ -266,6 +266,9 @@ public class BlobStoreManager {
* <p> This lease information is persisted and calling this more than once will result in
* latest lease overriding any previous lease.
*
+ * <p> When an app acquires a lease on a blob, the System will try to keep this
+ * blob around but note that it can still be deleted if it was requested by the user.
+ *
* @param blobHandle the {@link BlobHandle} representing the blob that the caller wants to
* acquire a lease for.
* @param descriptionResId the resource id for a short description string that can be surfaced
@@ -319,6 +322,9 @@ public class BlobStoreManager {
* <p> This lease information is persisted and calling this more than once will result in
* latest lease overriding any previous lease.
*
+ * <p> When an app acquires a lease on a blob, the System will try to keep this
+ * blob around but note that it can still be deleted if it was requested by the user.
+ *
* @param blobHandle the {@link BlobHandle} representing the blob that the caller wants to
* acquire a lease for.
* @param description a short description string that can be surfaced
@@ -371,6 +377,9 @@ public class BlobStoreManager {
* <p> This lease information is persisted and calling this more than once will result in
* latest lease overriding any previous lease.
*
+ * <p> When an app acquires a lease on a blob, the System will try to keep this
+ * blob around but note that it can still be deleted if it was requested by the user.
+ *
* @param blobHandle the {@link BlobHandle} representing the blob that the caller wants to
* acquire a lease for.
* @param descriptionResId the resource id for a short description string that can be surfaced
@@ -412,6 +421,9 @@ public class BlobStoreManager {
* <p> This lease information is persisted and calling this more than once will result in
* latest lease overriding any previous lease.
*
+ * <p> When an app acquires a lease on a blob, the System will try to keep this
+ * blob around but note that it can still be deleted if it was requested by the user.
+ *
* @param blobHandle the {@link BlobHandle} representing the blob that the caller wants to
* acquire a lease for.
* @param description a short description string that can be surfaced