Skip to content

Commit

Permalink
fix: prevent app from being killed in VPN mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Gedsh committed May 1, 2024
1 parent 1e5da53 commit cd10c1c
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,13 @@ public void onTaskRemoved(Intent rootIntent) {

loge("VPN service task removed " + this.hashCode());

boolean vpnEnabled = defaultPreferences.get().getBoolean(VPN_SERVICE_ENABLED, false);
if (vpnEnabled) {
Intent starterIntent = new Intent(this, BootCompleteReceiver.class);
starterIntent.setAction(ALWAYS_ON_VPN);
sendBroadcast(starterIntent);
}

super.onTaskRemoved(rootIntent);
}
}

0 comments on commit cd10c1c

Please sign in to comment.