mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-10 00:00:19 -04:00
android: Show an error if VPN fails due to lock down mode in Android 4.2
This commit is contained in:
parent
be2e7ecc2f
commit
2e50a8e751
@ -25,6 +25,7 @@
|
|||||||
<string name="search">Suchen</string>
|
<string name="search">Suchen</string>
|
||||||
<string name="vpn_not_supported_title">VPN nicht unterstützt</string>
|
<string name="vpn_not_supported_title">VPN nicht unterstützt</string>
|
||||||
<string name="vpn_not_supported">Ihr Gerät unterstützt keine VPN Anwendungen.\nBitte kontaktieren Sie den Hersteller.</string>
|
<string name="vpn_not_supported">Ihr Gerät unterstützt keine VPN Anwendungen.\nBitte kontaktieren Sie den Hersteller.</string>
|
||||||
|
<string name="vpn_not_supported_during_lockdown">VPN Verbindungen sind nicht möglich im abgeriegelten Modus.</string>
|
||||||
<string name="loading">Laden…</string>
|
<string name="loading">Laden…</string>
|
||||||
|
|
||||||
<!-- Log view -->
|
<!-- Log view -->
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
<string name="search">Szukaj</string>
|
<string name="search">Szukaj</string>
|
||||||
<string name="vpn_not_supported_title">Nie obsługiwany VPN</string>
|
<string name="vpn_not_supported_title">Nie obsługiwany VPN</string>
|
||||||
<string name="vpn_not_supported">Urządzenie nie obsługuje aplikacji VPN.\nProszę skontaktować się z producentem.</string>
|
<string name="vpn_not_supported">Urządzenie nie obsługuje aplikacji VPN.\nProszę skontaktować się z producentem.</string>
|
||||||
|
<string name="vpn_not_supported_during_lockdown">Polączenia nie sa możliwe w trybie zamkniętym</string>
|
||||||
<string name="loading">Wczytywanie…</string>
|
<string name="loading">Wczytywanie…</string>
|
||||||
|
|
||||||
<!-- Log view -->
|
<!-- Log view -->
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
<string name="search">Search</string>
|
<string name="search">Search</string>
|
||||||
<string name="vpn_not_supported_title">VPN not supported</string>
|
<string name="vpn_not_supported_title">VPN not supported</string>
|
||||||
<string name="vpn_not_supported">Your device does not support VPN applications.\nPlease contact the manufacturer.</string>
|
<string name="vpn_not_supported">Your device does not support VPN applications.\nPlease contact the manufacturer.</string>
|
||||||
|
<string name="vpn_not_supported_during_lockdown">VPN connections are not supported in lockdown mode.</string>
|
||||||
<string name="loading">Loading…</string>
|
<string name="loading">Loading…</string>
|
||||||
|
|
||||||
<!-- Log view -->
|
<!-- Log view -->
|
||||||
|
@ -95,7 +95,17 @@ public class MainActivity extends Activity implements OnVpnProfileSelectedListen
|
|||||||
*/
|
*/
|
||||||
protected void prepareVpnService(Bundle profileInfo)
|
protected void prepareVpnService(Bundle profileInfo)
|
||||||
{
|
{
|
||||||
Intent intent = VpnService.prepare(this);
|
Intent intent;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
intent = VpnService.prepare(this);
|
||||||
|
}
|
||||||
|
catch (IllegalStateException ex)
|
||||||
|
{
|
||||||
|
/* this happens if the always-on VPN feature (Android 4.2+) is activated */
|
||||||
|
VpnNotSupportedError.showWithMessage(this, R.string.vpn_not_supported_during_lockdown);
|
||||||
|
return;
|
||||||
|
}
|
||||||
/* store profile info until the user grants us permission */
|
/* store profile info until the user grants us permission */
|
||||||
mProfileInfo = profileInfo;
|
mProfileInfo = profileInfo;
|
||||||
if (intent != null)
|
if (intent != null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user