Commit fcf2d7e 1 parent 3087e0d commit fcf2d7e Copy full SHA for fcf2d7e
File tree 1 file changed +9
-1
lines changed
app/src/main/java/org/bepass/oblivion
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -284,6 +284,14 @@ public void onChange(ConnectionState state) {
284
284
285
285
@ Override
286
286
public IBinder onBind (Intent intent ) {
287
+ String action = intent != null ? intent .getAction () : null ;
288
+ /*
289
+ If we override onBind, we never receive onRevoke.
290
+ return superclass onBind when action is SERVICE_INTERFACE to receive onRevoke lifecycle call.
291
+ */
292
+ if (action != null && action .equals (VpnService .SERVICE_INTERFACE )) {
293
+ return super .onBind (intent );
294
+ }
287
295
return serviceMessenger .getBinder ();
288
296
}
289
297
@@ -339,7 +347,7 @@ public void onDestroy() {
339
347
340
348
@ Override
341
349
public void onRevoke () {
342
- super . onRevoke ();
350
+ stopVpn ();
343
351
}
344
352
345
353
private void runVpn () {
You can’t perform that action at this time.
0 commit comments