Merge branch 'master' into dev

This commit is contained in:
emanuele-f 2021-02-20 21:36:42 +01:00
commit dc08b8a18b
3 changed files with 11 additions and 6 deletions

View File

@ -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

View File

@ -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 {

View File

@ -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)