diff --git a/CHANGELOG.md b/CHANGELOG.md index 64ecc3d5..c8456fb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ Releases available at https://github.com/emanuele-f/PCAPdroid/releases +## [1.2.14] - 2021-02-20 +- Improve connections stability +- Report fatal native errors to the user + ## [1.2.13] - 2021-02-14 - Fix DNS resolution not working when an IPv6 DNS server is configured diff --git a/app/build.gradle b/app/build.gradle index 80fed66f..943b9b95 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId "com.emanuelef.remote_capture" minSdkVersion 21 targetSdkVersion 30 - versionCode 17 - versionName "1.2.14" + versionCode 18 + versionName "1.2.15" } buildTypes { diff --git a/app/src/main/java/com/emanuelef/remote_capture/activities/MainActivity.java b/app/src/main/java/com/emanuelef/remote_capture/activities/MainActivity.java index 4d1975ce..54e5d303 100644 --- a/app/src/main/java/com/emanuelef/remote_capture/activities/MainActivity.java +++ b/app/src/main/java/com/emanuelef/remote_capture/activities/MainActivity.java @@ -211,7 +211,7 @@ public class MainActivity extends AppCompatActivity implements LoaderManager.Loa String status = intent.getStringExtra(CaptureService.SERVICE_STATUS_KEY); if (status != null) { - if (status.equals(CaptureService.SERVICE_STATUS_STARTED) && (mState == AppState.starting)) { + if (status.equals(CaptureService.SERVICE_STATUS_STARTED)) { appStateRunning(); } else if (status.equals(CaptureService.SERVICE_STATUS_STOPPED)) { // The service may still be active (on premature native termination) @@ -502,19 +502,20 @@ public class MainActivity extends AppCompatActivity implements LoaderManager.Loa } private void startService() { + appStateStarting(); + Intent vpnPrepareIntent = VpnService.prepare(MainActivity.this); + if (vpnPrepareIntent != null) startActivityForResult(vpnPrepareIntent, REQUEST_CODE_VPN); else onActivityResult(REQUEST_CODE_VPN, RESULT_OK, null); - - appStateStarting(); } public void toggleService() { if (CaptureService.isServiceActive()) { - CaptureService.stopService(); appStateStopping(); + CaptureService.stopService(); } else { if(Utils.hasVPNRunning(this)) { new AlertDialog.Builder(this)