celzero / rethink-app

DNS over HTTPS / DNS over Tor / DNSCrypt client, WireGuard proxifier, firewall, and connection tracker for Android.
https://rethinkfirewall.com/
Apache License 2.0
2.93k stars 148 forks source link

ScreenLockService stop self #29

Closed ignoramous closed 4 years ago

ignoramous commented 4 years ago

ScreenLockService responsible for enforcing universal-firewall rule "block all apps on device locked" is started in response to ACTION_SCREEN_OFF broadcast and never goes away after that:

08-16 01:45:34.834  1202  1411 W ActivityManager: Stopping service due to app idle: u0a419 -53m32s838ms com.celzero.bravedns/.receiver.ScreenLockService

stopSelf the service once ScreenLockService is done setting the universal firewall rule.

A BroadcastReciever listening on ACTION_USER_PRESENT_BROADCAST undoes any universal firewall rules ScreenLockService might have set.

hussainmohd-a commented 4 years ago

Screenlock service is started when the device receives SCREEN_LOCK event, the service is stopped once the automatically lock by android smartlock criteria is met. Testing in progress.

ignoramous commented 4 years ago

See also: #23

hussainmohd-a commented 4 years ago

This has stopped happening after DeviceLockService behaviour was changed to not call into the vpn-adapter to restart the VPN