summaryrefslogtreecommitdiff
path: root/apex/blobstore/framework
diff options
context:
space:
mode:
authorSudheer Shanka <sudheersai@google.com>2020-03-04 22:19:21 -0800
committerSudheer Shanka <sudheersai@google.com>2020-03-06 11:48:29 -0800
commit1b6b8253cfb4c9847668cf7f75ccac0785b005f7 (patch)
treeef3a4053865b88c5af2a0e582e17c94559ae3d30 /apex/blobstore/framework
parent2e7834d39e7159b903f89ef315db49ffc64e894b (diff)
Don't persist description res ids as they are subject to change.
Instead persist the resource name and update the javadoc to suggest that apps should re-acquire the lease if the description resource changes. Bug: 150829640 Test: atest --test-mapping apex/blobstore Change-Id: Ibeabffe7de046ed74cbbcaed6c69c9d25028799d
Diffstat (limited to 'apex/blobstore/framework')
-rw-r--r--apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java9
-rw-r--r--apex/blobstore/framework/java/android/app/blob/XmlTags.java2
2 files changed, 10 insertions, 1 deletions
diff --git a/apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java b/apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java
index f53f1f19aea7..d1e28e99b6d6 100644
--- a/apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java
+++ b/apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java
@@ -145,6 +145,9 @@ public class BlobStoreManager {
/** @hide */
public static final int INVALID_RES_ID = -1;
+ /** @hide */
+ public static final String DESC_RES_TYPE_STRING = "string";
+
private final Context mContext;
private final IBlobStoreManager mService;
@@ -269,6 +272,9 @@ public class BlobStoreManager {
* <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.
*
+ * <p> In case the resource name for the {@code descriptionResId} is modified as part of
+ * an app update, apps should re-acquire the lease with the new resource id.
+ *
* @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
@@ -380,6 +386,9 @@ public class BlobStoreManager {
* <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.
*
+ * <p> In case the resource name for the {@code descriptionResId} is modified as part of
+ * an app update, apps should re-acquire the lease with the new resource id.
+ *
* @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
diff --git a/apex/blobstore/framework/java/android/app/blob/XmlTags.java b/apex/blobstore/framework/java/android/app/blob/XmlTags.java
index 9834d7477838..e64edc393769 100644
--- a/apex/blobstore/framework/java/android/app/blob/XmlTags.java
+++ b/apex/blobstore/framework/java/android/app/blob/XmlTags.java
@@ -51,6 +51,6 @@ public final class XmlTags {
// For leasee
public static final String TAG_LEASEE = "l";
- public static final String ATTR_DESCRIPTION_RES_ID = "rid";
+ public static final String ATTR_DESCRIPTION_RES_NAME = "rn";
public static final String ATTR_DESCRIPTION = "d";
}