diff options
author | Daniel Weipert <code@drogueronin.de> | 2023-05-12 13:12:57 +0200 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2023-05-12 13:12:57 +0200 |
commit | 7f0436aa2a782d926a81bd5bdf76baf0253582da (patch) | |
tree | 2f6e86364060ff8ee11a948febbac6a3f451f4e3 /app/java/src/MainActivity.java | |
parent | eefe2bdea6e79548ef5a0c0a50b3afc495b034b3 (diff) |
working commit
Diffstat (limited to 'app/java/src/MainActivity.java')
-rw-r--r-- | app/java/src/MainActivity.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/app/java/src/MainActivity.java b/app/java/src/MainActivity.java index f437c9d..049ee29 100644 --- a/app/java/src/MainActivity.java +++ b/app/java/src/MainActivity.java @@ -12,6 +12,8 @@ import android.net.VpnService; import android.os.Bundle; +import android.util.Log; + import android.view.TextureView; import android.view.View; @@ -30,10 +32,7 @@ public class MainActivity extends Activity { */ @Override public void onReceive(Context context, Intent intent) { - Bundle bundle = intent.getExtras(); - // if (bundle != null) { - setStateButtonStart(); - // } + setStateButtonStart(); } }; @@ -80,7 +79,7 @@ public class MainActivity extends Activity { */ public void onClickButtonStart(View view) { if (!DNSProxyService.isRunning()) { //start - Intent intent = DNSProxyService.prepare(this); + Intent intent = VpnService.prepare(this); if (intent != null) { startActivityForResult(intent, 0); @@ -108,7 +107,7 @@ public class MainActivity extends Activity { * Start DNSProxyService */ public void start() { - startService(this.dnsProxyService); + startService(this.dnsProxyService.setAction(DNSProxyService.ACTION_START)); Toast .makeText( @@ -123,7 +122,7 @@ public class MainActivity extends Activity { * Stop DNSProxyService */ public void stop() { - stopService(this.dnsProxyService); + startService(this.dnsProxyService.setAction(DNSProxyService.ACTION_STOP)); Toast .makeText( |