Repository navigation
fix(chat): guard MediaStore.getPickImagesMaxLimit on older pickers (2026.10.2 hotfix) - #1742
Merged
bmc08gt merged 2 commits intoOct 9, 2026
Merged
Conversation
rememberChatPhotoPicker called getPickImagesMaxLimit() during composition with no version check. The method exists only on API 33+, or on API 30-32 with SDK extension R 2+, so an Android 12 device without the MediaProvider update threw NoSuchMethodError every time a chat opened (Bugsnag 6ac91865991833fd09984195, Samsung SM-N976V). Only call it where the system picker provides it. Elsewhere androidx falls back to a picker with no cap of its own, and the result callback already trims the selection to the remaining slots. (cherry picked from commit cac9aa7)
Int.MAX_VALUE never reached the picker, since the clamp came out to remaining anyway, but it read as no cap. Fall back to remaining directly. (cherry picked from commit 7f23f4f)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-picks #1741 onto the 2026.10.2 release (
fcash/2026.10.2), sincecode/cashalready carries 2026.10.3 work.On Android 11–12 devices without the MediaProvider update for SDK extension R 2, opening any chat crashes with
NoSuchMethodErrorfromMediaStore.getPickImagesMaxLimit(). See #1741 for the cause and fix.The version code comes from the commit count: the tag is at 4803, the build on the internal track, and these two commits bring it to 4805. That's above internal and below
code/cash(4806), so noversionCodeOverrideis needed. The version name stays 2026.10.2.