Conversation
…NetworkTileService - Removed SIM resolution and telephony shell-command construction from NetworkTileService. - Updated NetworkTileService to coordinate the modular telephony components. - Preserved existing Target SIM, readback, switching, cache, label, icon, and Auto SIM error behavior.
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
This PR completes Phase 3 of the NetToggle modular refactor by moving SIM resolution, network mode readback, and network mode application logic out of
NetworkTileServiceinto dedicated telephony modules.The refactor keeps the current app behavior unchanged while making the telephony layer easier to maintain, test, and extend.
New Telephony Modules
SimResolverto handle subscription ID and physical SIM slot resolution.NetworkModeReaderto read and map the current preferred network mode.NetworkModeControllerto build and execute network mode commands.ShellValueParserto parse integer values from shell command output.NetworkTileService Changes
dumpsys isubcommand construction.NetworkModeReaderandNetworkModeController.CommandResultfrom Phase 2.Behavior Preserved
Root and Shizuku execution modes remain unchanged.
Auto, SIM 1, and SIM 2 Target SIM behavior remains unchanged.
Subscription IDs continue to be used for network mode readback.
Physical SIM slot indexes continue to be used for applying network modes.
Android 10 and newer continue to use direct active-subscription slot resolution where available.
Older Android versions continue to use the existing
dumpsys isubfallback.Auto SIM detection errors continue to show the existing Toast and persistent warning.
Cached tile-state behavior remains unchanged.
Existing tile labels and icons remain unchanged.
Existing Quick Settings cycle remains:
4G Only → 5G Only → Preferred 5G → Preferred 4G