diff options
author | 2024-12-17 02:10:42 +0000 | |
---|---|---|
committer | 2025-01-28 11:06:16 +0000 | |
commit | 3d3232826064ce9503f6536644a0cac7373db92f (patch) | |
tree | 5a1f861a584e067ceabb1f10e321c24d465eaf23 /apex | |
parent | c56790fcda3124667b334a34bfae31f5fbb77c8a (diff) |
Limit number of uris sent to a Bulk API
Limit the number of uris sent to create(Delete/Write)Request bulk apis
at 2000
BUG: 203408344
Test: atest StorageOtherFilesTest
Flag: EXEMPT bugfix
Change-Id: I8b94cd469d3f9ed83d0b6a4a113095156a8a3d78
Diffstat (limited to 'apex')
-rw-r--r-- | apex/framework/java/android/provider/MediaStore.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/apex/framework/java/android/provider/MediaStore.java b/apex/framework/java/android/provider/MediaStore.java index 3c25ef22b..c9ee81196 100644 --- a/apex/framework/java/android/provider/MediaStore.java +++ b/apex/framework/java/android/provider/MediaStore.java @@ -1559,6 +1559,11 @@ public final class MediaStore { * once obtained you can directly {@link ContentResolver#update} columns * like {@link MediaColumns#IS_FAVORITE}, {@link MediaColumns#IS_TRASHED}, * or {@link ContentResolver#delete}. + * <p> + * Note: if your app targets {@link android.os.Build.VERSION_CODES#BAKLAVA} + * and above, you can send a maximum of 2000 uris in each request. + * Attempting to send more than 2000 uris will result in a + * {@link java.lang.IllegalArgumentException}. * * @param resolver Used to connect with {@link MediaStore#AUTHORITY}. * Typically this value is {@link Context#getContentResolver()}, @@ -1591,6 +1596,11 @@ public final class MediaStore { * determine if you already hold write access before requesting access, use * {@link Context#checkUriPermission(Uri, int, int, int)} with * {@link Intent#FLAG_GRANT_WRITE_URI_PERMISSION}. + * <p> + * Note: if your app targets {@link android.os.Build.VERSION_CODES#BAKLAVA} + * and above, you can send a maximum of 2000 uris in each request. + * Attempting to send more than 2000 uris will result in a + * {@link java.lang.IllegalArgumentException}. * * @param resolver Used to connect with {@link MediaStore#AUTHORITY}. * Typically this value is {@link Context#getContentResolver()}, @@ -1632,6 +1642,11 @@ public final class MediaStore { * determine if you already hold write access before requesting access, use * {@link Context#checkUriPermission(Uri, int, int, int)} with * {@link Intent#FLAG_GRANT_WRITE_URI_PERMISSION}. + * <p> + * Note: if your app targets {@link android.os.Build.VERSION_CODES#BAKLAVA} + * and above, you can send a maximum of 2000 uris in each request. + * Attempting to send more than 2000 uris will result in a + * {@link java.lang.IllegalArgumentException}. * * @param resolver Used to connect with {@link MediaStore#AUTHORITY}. * Typically this value is {@link Context#getContentResolver()}, @@ -1712,6 +1727,11 @@ public final class MediaStore { * determine if you already hold write access before requesting access, use * {@link Context#checkUriPermission(Uri, int, int, int)} with * {@link Intent#FLAG_GRANT_WRITE_URI_PERMISSION}. + * <p> + * Note: if your app targets {@link android.os.Build.VERSION_CODES#BAKLAVA} + * and above, you can send a maximum of 2000 uris in each request. + * Attempting to send more than 2000 uris will result in a + * {@link java.lang.IllegalArgumentException}. * * @param resolver Used to connect with {@link MediaStore#AUTHORITY}. * Typically this value is {@link Context#getContentResolver()}, |