Fixed
Status Update
Comments
il...@google.com <il...@google.com>
yr...@google.com <yr...@google.com> #2
I looked at the code and an
It's assuming that MediaStore.getPickImagesMaxLimit()
is only on Tiramisu (API 33), even though it's available on API 30+ when the picker is available (Mainline doesn't have the right annotation to highlight that a method/property can be back-ported in the Java documentation).
I'll submit a fix on Monday.
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit b6e550f1d34c626468406108f17e94c4eaa23cad
Author: Jeremy Woods <jbwoods@google.com>
Date: Tue Oct 11 13:28:19 2022
Remove Android T checks from MediaStore calls
The MediaStore.getPickImagesMaxLimit() API is available prior to Android
T, but studio sees it as an error cause it uses platform extensions.
RelNote: "The `PickVisualMedia` contract will now work correctly Android
R and above."
Test: all existing test pass
Bug: 249182130
Change-Id: Ie277697928c3af81460f8620ebf6b37bbe0649d1
A activity/activity/lint-baseline.xml
M activity/activity/src/main/java/androidx/activity/result/contract/ActivityResultContracts.kt
https://android-review.googlesource.com/2250183
Branch: androidx-main
commit b6e550f1d34c626468406108f17e94c4eaa23cad
Author: Jeremy Woods <jbwoods@google.com>
Date: Tue Oct 11 13:28:19 2022
Remove Android T checks from MediaStore calls
The MediaStore.getPickImagesMaxLimit() API is available prior to Android
T, but studio sees it as an error cause it uses platform extensions.
RelNote: "The `PickVisualMedia` contract will now work correctly Android
R and above."
Test: all existing test pass
Bug: 249182130
Change-Id: Ie277697928c3af81460f8620ebf6b37bbe0649d1
A activity/activity/lint-baseline.xml
M activity/activity/src/main/java/androidx/activity/result/contract/ActivityResultContracts.kt
il...@google.com <il...@google.com> #4
This has been fixed internally and will be available in the Activity 1.7.0-alpha02 and Activity 1.6.1 releases.
na...@google.com <na...@google.com> #5
The following release(s) address this bug:
androidx.activity:activity:1.6.1
androidx.activity:activity:1.7.0-alpha02
al...@gmail.com <al...@gmail.com> #6
Comment has been deleted.
fv...@gmail.com <fv...@gmail.com> #7
Comment has been deleted.
fv...@gmail.com <fv...@gmail.com> #8
Comment has been deleted.
fv...@gmail.com <fv...@gmail.com> #9
Comment has been deleted.
ar...@gmail.com <ar...@gmail.com> #10
I didn't approve of any of this on my device can you please remove
al...@gmail.com <al...@gmail.com> #12
J
al...@gmail.com <al...@gmail.com> #13
J
al...@gmail.com <al...@gmail.com> #14
G
al...@gmail.com <al...@gmail.com> #15
H
al...@gmail.com <al...@gmail.com> #16
H
al...@gmail.com <al...@gmail.com> #17
U
al...@gmail.com <al...@gmail.com> #18
Y
al...@gmail.com <al...@gmail.com> #19
Y
al...@gmail.com <al...@gmail.com> #20
6j
al...@gmail.com <al...@gmail.com> #21
Y
Description
Component used: Activity
Version used: 1.6.0
Devices/Android versions reproduced on: Samsung Galaxy S20+ Android 12 (with August 2022 Google Play system update, photo picker is confirmed working)
For
ActivityResultContracts.PickMultipleVisualMedia
, you useInteger.MAX_VALUE
as an overload for the maximum number of items the photo picker is able to select for versions Android 12 and below (asMediaStore.getPickImagesMaxLimit()
is only available forTIRAMISU
and above).However, using this value causes the photo picker to not be able to start/be launched.
I tried changing the
maxItems
value to another value (I tried 100) and the photo picker started to work.