ADFA-4553 (slice 2): remove the dead tunnel/enable/SOCKS Java#137
Merged
Conversation
Follow-up to slice 1 (proxy transport already gone). Removes the now-unreachable
Java for the legacy tunnel toggle and SOCKS settings. Resource cleanup (layout,
strings, colors) is a separate slice to keep this build-safe.
- MainActivity: drop handleControlClick(), toggleService(), runNegotiationSequence()
(all reachable only via the already-hidden Control button) and the isProxyDegraded
field; checkServerStatus no longer sets it.
- UsageFragment: drop the Control button field/binding/listener, the SOCKS EditText
fields, the setTunnelState() calls, and the vpn/tunnel button color+text logic;
updateUI() now just syncs the checkboxes + maintenance (independent pref). The
DashboardManager is constructed with the 2-arg form.
- DashboardManager: rewritten without the tunnel/ESPW toggle (no dash_tunnel/led_tunnel,
no setTunnelState, no DashboardActionCallback). Keeps the Wi-Fi/Hotspot tiles + LEDs.
Header -> AppDevForAll.
- ServiceReceiver: boot placeholder no longer reads getEnable() (still an ADFA-3340 seam).
- Preferences: remove getEnable/setEnable + ENABLE key and all getSocks*/setSocks* +
SOCKS_* keys. PREFS_NAME ('SocksPrefs', the storage file name) is kept to preserve
users' other saved settings.
No behaviour change: all of this drove UI that is already visibility=gone. The
layout/strings/colors still resolve (removed in the resource-cleanup slice).
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.
Scope note (why Java-only)
Slice 1 (#136) removed the proxy transport. This slice removes the now-unreachable Java for the legacy tunnel toggle + SOCKS settings. The resource cleanup (layout views,
vpn_*/control_*strings,btn_vpn_*colors) is a separate follow-up slice so this PR stays build-safe: the layout still references those strings/colors, so they must be removed together with the layout in one atomic step. Everything here still resolves.All of this drove UI that is already
visibility="gone"→ no visible/behaviour change, pure dead-code hygiene.Changes
MainActivity: droppedhandleControlClick(),toggleService(),runNegotiationSequence()(reachable only via the hidden Control button) and theisProxyDegradedfield. Server detection is unaffected (the periodiccheckServerStatusradar already pingslocalhost:8085).UsageFragment: dropped the Control button field/binding/listener, the SOCKSEditTextfields, thesetTunnelState()calls, and the vpn/tunnel button colour+text logic.updateUI()now just syncs the checkboxes + maintenance.DashboardManagerbuilt with the 2-arg constructor.DashboardManager: rewritten without the tunnel/ESPW toggle (nodash_tunnel/led_tunnel, nosetTunnelState, noDashboardActionCallback). Keeps the Wi-Fi/Hotspot tiles + LEDs. Header → AppDevForAll.ServiceReceiver: boot placeholder no longer readsgetEnable()(still an ADFA-3340 seam).Preferences: removedgetEnable/setEnable+ENABLEkey and allgetSocks*/setSocks*+SOCKS_*keys.PREFS_NAME("SocksPrefs", the storage file name) kept so users' other saved settings aren't orphaned.Verification (sandbox)
new DashboardManager(...)call site updated to 2-arg.control_*/vpn_*/tunnel/socks_*strings +btn_vpn_*colors still defined (only the layout references them now) → resolves. Nojavachere — please build:app:lintDebug+assembleDebug.Test (device)
Next — slice 2b (resources)
Remove from
fragment_usage.xml: thecontrolbutton,control_description, thedash_tunnelblock, and the SOCKS fields; then delete thebtn_vpn_*colors and thevpn_*/control_enable/control_disable/tunnel/socks_*strings (all six locales), atomically.Epic ADFA-1028. Author: AppDevForAll.