diff options
-rw-r--r-- | src/de/blinkt/openvpn/LaunchVPN.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/de/blinkt/openvpn/LaunchVPN.java b/src/de/blinkt/openvpn/LaunchVPN.java index 7b0f6e04..b4151c24 100644 --- a/src/de/blinkt/openvpn/LaunchVPN.java +++ b/src/de/blinkt/openvpn/LaunchVPN.java @@ -74,6 +74,8 @@ import android.widget.Toast; public class LaunchVPN extends ListActivity implements OnItemClickListener { static final String EXTRA_KEY = "de.blinkt.openvpn.shortcutProfileUUID"; + static final String EXTRA_NAME = "de.blinkt.openvpn.shortcutProfileName"; + private static final int START_VPN_PROFILE= 70; private ProfileManager mPM; @@ -103,8 +105,12 @@ public class LaunchVPN extends ListActivity implements OnItemClickListener { if(Intent.ACTION_MAIN.equals(action)) { // we got called to be the starting point, most likely a shortcut String shortcutUUID = intent.getStringExtra( EXTRA_KEY); + String shortcutName = intent.getStringExtra( EXTRA_KEY); VpnProfile profileToConnect = ProfileManager.get(shortcutUUID); + if(shortcutName != null && profileToConnect ==null) + profileToConnect = ProfileManager.getInstance(this).getProfileByName(shortcutName); + if(profileToConnect ==null) { Toast notfound = Toast.makeText(this, R.string.shortcut_profile_notfound, Toast.LENGTH_SHORT); notfound.show(); |