Skip to content

ADFA-4553 (slice 2): remove the dead tunnel/enable/SOCKS Java#137

Merged
luisguzman-adfa merged 1 commit into
mainfrom
feat/ADFA-4553-remove-tunnel-ui
Jul 4, 2026
Merged

ADFA-4553 (slice 2): remove the dead tunnel/enable/SOCKS Java#137
luisguzman-adfa merged 1 commit into
mainfrom
feat/ADFA-4553-remove-tunnel-ui

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

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: dropped handleControlClick(), toggleService(), runNegotiationSequence() (reachable only via the hidden Control button) and the isProxyDegraded field. Server detection is unaffected (the periodic checkServerStatus radar already pings localhost:8085).
  • UsageFragment: dropped the Control button field/binding/listener, the SOCKS EditText fields, the setTunnelState() calls, and the vpn/tunnel button colour+text logic. updateUI() now just syncs the checkboxes + maintenance. DashboardManager built with the 2-arg constructor.
  • 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: removed getEnable/setEnable + ENABLE key and all getSocks*/setSocks* + SOCKS_* keys. PREFS_NAME ("SocksPrefs", the storage file name) kept so users' other saved settings aren't orphaned.

Verification (sandbox)

  • Repo-wide: no dangling ref to any removed method/field/pref.
  • Only new DashboardManager(...) call site updated to 2-arg.
  • Brace balance: MainActivity 352/352, UsageFragment 67/67, DashboardManager 7/7, Preferences 25/25, ServiceReceiver 4/4.
  • control_*/vpn_*/tunnel/socks_* strings + btn_vpn_* colors still defined (only the layout references them now) → resolves. No javac here — please build :app:lintDebug + assembleDebug.

Test (device)

  1. Build passes.
  2. Home screen unchanged (Control button, tunnel LED and SOCKS settings were already hidden). Wi-Fi/Hotspot tiles + LEDs work; "Browse content" + Start/Stop server unchanged.
  3. Maintenance-mode checkbox still saves/restores.

Next — slice 2b (resources)

Remove from fragment_usage.xml: the control button, control_description, the dash_tunnel block, and the SOCKS fields; then delete the btn_vpn_* colors and the vpn_*/control_enable/control_disable/tunnel/socks_* strings (all six locales), atomically.

Epic ADFA-1028. Author: AppDevForAll.

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).
@luisguzman-adfa luisguzman-adfa merged commit c66c01c into main Jul 4, 2026
1 check passed
@luisguzman-adfa luisguzman-adfa deleted the feat/ADFA-4553-remove-tunnel-ui branch July 4, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant