mirror of
https://github.com/strongswan/strongswan.git
synced 2025-11-28 00:00:40 -05:00
android: Show an error dialog if we can't get permission for VPNs
This is either because a third-party VPN app has the always-on feature enabled, or because the user denied the permission in the system's confirmation dialog. If the always-on feature is enabled for a connection of the built-in VPN client we get an IllegalStateException, for which we show an updated and clearer error message.
This commit is contained in:
parent
08601c58e9
commit
0917caa195
@ -268,6 +268,10 @@ public class MainActivity extends AppCompatActivity implements OnVpnProfileSelec
|
||||
intent.putExtras(mProfileInfo);
|
||||
this.startService(intent);
|
||||
}
|
||||
else
|
||||
{ /* this happens if the always-on VPN feature is activated by a different app or the user declined */
|
||||
VpnNotSupportedError.showWithMessage(this, R.string.vpn_not_supported_no_permission);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
||||
@ -24,7 +24,8 @@
|
||||
<string name="search">Suchen</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_during_lockdown">VPN Verbindungen sind nicht möglich im abgeriegelten Modus.</string>
|
||||
<string name="vpn_not_supported_during_lockdown">VPN Verbindungen sind nicht möglich, wenn für ein eingebautes VPN der Always-On-Modus aktiviert ist.</string>
|
||||
<string name="vpn_not_supported_no_permission">Keine Berechtigung, um VPN Verbindungen zu erstellen. Entweder weil diese vom Benutzer verweigert wurde oder weil für eine andere VPN Anwendung der Always-On-Modus aktiviert ist.</string>
|
||||
<string name="loading">Laden…</string>
|
||||
<string name="profile_not_found">Profil nicht gefunden</string>
|
||||
<string name="strongswan_shortcut">strongSwan-Verknüpfung</string>
|
||||
|
||||
@ -24,7 +24,8 @@
|
||||
<string name="search">Szukaj</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_during_lockdown">Polączenia nie sa możliwe w trybie zamkniętym</string>
|
||||
<string name="vpn_not_supported_during_lockdown">VPN connections are not supported if a built-in VPN has the always-on feature enabled.</string>
|
||||
<string name="vpn_not_supported_no_permission">Unable to get permission to create VPN connections. Either because it was denied by the user, or because a different VPN app has the always-on feature enabled.</string>
|
||||
<string name="loading">Wczytywanie…</string>
|
||||
<string name="profile_not_found">Nie znaleziono profilu</string>
|
||||
<string name="strongswan_shortcut">Skrót strongSwan</string>
|
||||
|
||||
@ -21,7 +21,8 @@
|
||||
<string name="search">Поиск</string>
|
||||
<string name="vpn_not_supported_title">VPN не поддерживается</string>
|
||||
<string name="vpn_not_supported">Ваше устройство не поддерживат VPN приложение.\nПожалуйста свяжитесь с производителем.</string>
|
||||
<string name="vpn_not_supported_during_lockdown">VPN соединения не поддерживаются в режиме lockdown.</string>
|
||||
<string name="vpn_not_supported_during_lockdown">VPN connections are not supported if a built-in VPN has the always-on feature enabled.</string>
|
||||
<string name="vpn_not_supported_no_permission">Unable to get permission to create VPN connections. Either because it was denied by the user, or because a different VPN app has the always-on feature enabled.</string>
|
||||
<string name="loading">Загрузка…</string>
|
||||
<string name="profile_not_found">Профиль не найден</string>
|
||||
<string name="strongswan_shortcut">Ссылка на strongSwan</string>
|
||||
|
||||
@ -22,7 +22,8 @@
|
||||
<string name="search">Пошук</string>
|
||||
<string name="vpn_not_supported_title">VPN не підтримуеться</string>
|
||||
<string name="vpn_not_supported">Ваш пристрій не підтримує VPN.\nЗв\'яжіться з виробником.</string>
|
||||
<string name="vpn_not_supported_during_lockdown">VPN з\'єднання не пітримується у режимі lockdown.</string>
|
||||
<string name="vpn_not_supported_during_lockdown">VPN connections are not supported if a built-in VPN has the always-on feature enabled.</string>
|
||||
<string name="vpn_not_supported_no_permission">Unable to get permission to create VPN connections. Either because it was denied by the user, or because a different VPN app has the always-on feature enabled.</string>
|
||||
<string name="loading">Завантаження…</string>
|
||||
<string name="profile_not_found">Профіль не знайдено</string>
|
||||
<string name="strongswan_shortcut">strongSwan посилання</string>
|
||||
|
||||
@ -21,7 +21,8 @@
|
||||
<string name="search">搜索</string>
|
||||
<string name="vpn_not_supported_title">无法支持VPN</string>
|
||||
<string name="vpn_not_supported">您的设备无法支持VPN应用。\n请联系供应商。</string>
|
||||
<string name="vpn_not_supported_during_lockdown">锁定模式下无法支持VPN连接</string>
|
||||
<string name="vpn_not_supported_during_lockdown">VPN connections are not supported if a built-in VPN has the always-on feature enabled.</string>
|
||||
<string name="vpn_not_supported_no_permission">Unable to get permission to create VPN connections. Either because it was denied by the user, or because a different VPN app has the always-on feature enabled.</string>
|
||||
<string name="loading">载入中…</string>
|
||||
<string name="profile_not_found">未找到配置</string>
|
||||
<string name="strongswan_shortcut">strongSwan快捷方式</string>
|
||||
|
||||
@ -21,7 +21,8 @@
|
||||
<string name="search">搜尋</string>
|
||||
<string name="vpn_not_supported_title">無法支援VPN</string>
|
||||
<string name="vpn_not_supported">您的設備無法使用VPN。\n請聯絡供應商。</string>
|
||||
<string name="vpn_not_supported_during_lockdown">鎖定模式無法連線VPN</string>
|
||||
<string name="vpn_not_supported_during_lockdown">VPN connections are not supported if a built-in VPN has the always-on feature enabled.</string>
|
||||
<string name="vpn_not_supported_no_permission">Unable to get permission to create VPN connections. Either because it was denied by the user, or because a different VPN app has the always-on feature enabled.</string>
|
||||
<string name="loading">載入中…</string>
|
||||
<string name="profile_not_found">沒有找到設定檔</string>
|
||||
<string name="strongswan_shortcut">strongSwan快速選單</string>
|
||||
|
||||
@ -24,7 +24,8 @@
|
||||
<string name="search">Search</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_during_lockdown">VPN connections are not supported in lockdown mode.</string>
|
||||
<string name="vpn_not_supported_during_lockdown">VPN connections are not supported if a built-in VPN has the always-on feature enabled.</string>
|
||||
<string name="vpn_not_supported_no_permission">Unable to get permission to create VPN connections. Either because it was denied by the user, or because a different VPN app has the always-on feature enabled.</string>
|
||||
<string name="loading">Loading…</string>
|
||||
<string name="profile_not_found">Profile not found</string>
|
||||
<string name="strongswan_shortcut">strongSwan shortcut</string>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user