Assigned
Status Update
Comments
jb...@google.com <jb...@google.com>
yr...@google.com <yr...@google.com>
yr...@google.com <yr...@google.com> #2
Please include a sample project that reproduces your issue.
kr...@google.com <kr...@google.com> #3
Here is the sample project.
Steps to reproduce:
1. Press on "Search" icon;
2. Write something;
3. Search this text, keyboard will be dismissed;
4. Tap on "Dialog" button;
5. Dissmiss dialog;
With the new 1.5.0 fragment library version text will be cleared in the search box after dismissing dialog.
In the version 1.4.1 and lower text in the search is not clearing and this is correct behaviour.
Please suggest some workarounds or how to fix this issue?
Steps to reproduce:
1. Press on "Search" icon;
2. Write something;
3. Search this text, keyboard will be dismissed;
4. Tap on "Dialog" button;
5. Dissmiss dialog;
With the new 1.5.0 fragment library version text will be cleared in the search box after dismissing dialog.
In the version 1.4.1 and lower text in the search is not clearing and this is correct behaviour.
Please suggest some workarounds or how to fix this issue?
Description
Devices/Android versions reproduced on: Pixel Tablet, Android 14, SDK 34.
Issue: When targeting Android 14 with the new photo picker and having ACCESS_MEDIA_LOCATION set to allowed, a SecurityException is thrown while consuming the result URI of the when using ActivityResultContracts.PickVisualMedia(). Whenever this permission is not allowed, the same code for starting the photo picker results in a URI that can be consumed.
The app I'm writing targets multiple versions, however only for Android 14 I am using the photo picker. According to the sources mentioned below, the photo picker does not require any permissions to be set. Quote from the android privacy code lab #6: "By adding these two lines of code, we now get a permissionless way to access the device's photos that provides a much nicer UX and doesn't require code maintenance!"
Since the app could have the ACCESS_MEDIA_LOCATION permission set before it was upgraded to the app targeting SDK 14, it could mean that on upgrade the gallery functionality of my application breaks as a result of moving to the new photo picker. Therefore I have opted to use an Intent with ACTION_OPEN_DOCUMENT with the MIME_TYPE_IMAGE as a work around instead.
I've attached screenshots of the permission the app has and the stackrace thrown.
Sources: