fix(sfa): resolve per-app proxy package list truncation#63
Open
hrn6z4wbe wants to merge 25 commits into
Open
Conversation
The download progress indicator passed a deferred lambda
`progress = { progress!! }` reading UpdateState.downloadProgress
(MutableState<Float?>). Material3 invokes the lambda during
layout/draw, outside the composition snapshot that guarded it, so it
re-read the live state. ApkDownloader sets the value to null when the
response has no content length (total <= 0), and it can also flip while
the screen is being torn down, causing the `!!` to throw NPE.
Capture the value into an immutable local before branching so the
lambda closes over a non-null Float instead of re-reading live state.
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.
Summary
When querying installed packages in
PerAppProxyScreen, requesting unnecessary component flags (GET_ACTIVITIES,GET_SERVICES,GET_RECEIVERS,GET_PROVIDERS) significantly inflates the Binder transaction payload size per application. On devices with a large number of installed applications, this causes Binder transaction buffer limit issues (TransactionTooLargeException) and truncates the package list.This PR removes these unused flags as
PerAppProxyScreenonly requires basic application info andINTERNETpermission status, reducing IPC payload size and improving load performance. It also safely handles nullrequestedPermissionsinAppSelectionComponents.Changes
PerAppProxyScreen.kt: RemoveGET_ACTIVITIES,GET_SERVICES,GET_RECEIVERS, andGET_PROVIDERSflags when retrieving package info.AppSelectionComponents.kt: Safely evaluateisOfflinewhenrequestedPermissionsis null.