fix: handle Room 3 empty queries and improve release obfuscation - #6655
Merged
Conversation
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.
Opening a bot profile can crash when its creator is not cached: Room 3 throws for the empty
LiveData<User>query before the existing null-triggered refresh runs. Make 12 single-row observation queries nullable across user, conversation, circle, address, asset/token, and sticker DAOs. Propagate the types through their callers and let sticker preview wait for a missing sticker to load.Review of generated empty-result checks in 70 DAO implementations found no further equivalent optional-row queries. Aggregate wallet summaries and the required local encryption identity retain their non-null contracts.
Also narrow R8 keep rules for annotated API fields and non-public Kotlin runtime classes while retaining persisted serialization models, JobQueue jobs, unannotated JSON fields, enums, throwables, and reflected coroutine stack-trace labels.
Measured from the final Google Play release AAB's
BUNDLE-METADATA/com.android.tools/r8.json, against master464502fa05with the same toolchain:Obfuscation improved by approximately 7.0% relative to baseline. DEX size decreased from 48,292,016 to 46,529,760 bytes.
Validation:
The subsequent 10-query sweep passed JVM tests and the final release build; a periodic device PIN reminder prevented repeating the full UI pass for that sweep. Actual transfers/trades, PIN/signing, and historical media restoration were not exercised. Push registration remains unverified because the local Firebase configuration was rejected.