ostp/ostp-flutter/android/app
ospab e7a750dd77 fix(android): request battery-optimization exemption so Doze can't freeze the VPN
On phones the tunnel dropped quickly and never reconnected. Root cause: the app
had a foreground service and a wake lock but never asked to be exempt from
battery optimization, so Doze / App Standby froze the whole VPN process when the
screen went off. A frozen process means not just a dead socket but that the
in-process reconnect logic — wall-clock suspend detection, the NetworkChanged
handler, keepalive — never runs at all, which is exactly "reconnect doesn't
work."

Adds the REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission and, on VPN start,
prompts for the exemption when it isn't already granted (checked via
isIgnoringBatteryOptimizations, so it asks once). Fired after the VPN consent so
the two system dialogs don't stack. Socket protection on reconnect was already
correct (try_connect_transport protects every new socket), so this targets the
process-freeze, which is the part that stopped recovery.
2026-08-29 00:36:20 +03:00
..
src fix(android): request battery-optimization exemption so Doze can't freeze the VPN 2026-08-29 00:36:20 +03:00
build.gradle.kts fix(android): treat a blank signing secret as absent, not as the password 2026-07-30 20:56:33 +03:00
proguard-rules.pro feat: implement built-in DNS server, adblock and dns leak prevention 2026-06-07 19:55:42 +03:00