android: Show confirmation dialog also when connecting
[strongswan.git] / src / frontends / android / app / src / main / java / org / strongswan / android / ui / MainActivity.java
index a6c6681..8904342 100644 (file)
@@ -230,7 +230,7 @@ public class MainActivity extends AppCompatActivity implements OnVpnProfileSelec
 
                removeFragmentByTag(DIALOG_TAG);
 
-               if (mService != null && mService.getState() == State.CONNECTED)
+               if (mService != null && (mService.getState() == State.CONNECTED || mService.getState() == State.CONNECTING))
                {
                        profileInfo.putBoolean(PROFILE_RECONNECT, mService.getProfile().getId() == profile.getId());