diff options
| -rw-r--r-- | AndroidManifest.xml | 26 | ||||
| -rw-r--r-- | src/de/blinkt/openvpn/ConfigConverter.java | 4 | ||||
| -rw-r--r-- | src/de/blinkt/openvpn/ConfigParser.java | 2 | 
3 files changed, 11 insertions, 21 deletions
| diff --git a/AndroidManifest.xml b/AndroidManifest.xml index d63b3b40..ca86ced3 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -57,24 +57,24 @@          <activity              android:name=".ConfigConverter"              android:label="Convert Config File" > -            <intent-filter android:label="foo" > -                <action android:name="android.intent.action.MAIN" /> +            <intent-filter android:label="Import OpenVPN Config" > +                <action android:name="android.intent.action.VIEW" />                  <category android:name="android.intent.category.DEFAULT" />                  <category android:name="android.intent.category.BROWSABLE" /> -                  <data android:mimeType="application/x-openvpn-profile" />              </intent-filter> -            <intent-filter android:label="foo" > -                <action android:name="android.intent.action.MAIN" /> - +            <intent-filter android:label="Import OpenVPN Config" > +                 <action android:name="android.intent.action.VIEW" /> +                            <category android:name="android.intent.category.DEFAULT" />                  <category android:name="android.intent.category.BROWSABLE" />                  <data android:mimeType="application/ovpn" />              </intent-filter> -            <intent-filter android:label="foo" > -                <action android:name="android.intent.action.VIEW" /> +            <intent-filter android:label="Import OpenVPN Config" > +                 +				<action android:name="android.intent.action.VIEW" />                                  <category android:name="android.intent.category.BROWSABLE" />                  <category android:name="android.intent.category.DEFAULT" /> @@ -83,16 +83,6 @@                      android:pathPattern=".*\\.ovpn"                      android:scheme="content" />              </intent-filter> -            <intent-filter android:label="foo" > -                <action android:name="android.intent.action.VIEW" /> - -                <category android:name="android.intent.category.BROWSABLE" /> -                <category android:name="android.intent.category.DEFAULT" /> - -                <data -                    android:pathPattern=".*\\.ovpn" -                    android:scheme="file" /> -            </intent-filter>          </activity>            <activity              android:name=".LaunchVPN" diff --git a/src/de/blinkt/openvpn/ConfigConverter.java b/src/de/blinkt/openvpn/ConfigConverter.java index 71a17fa2..9b97cf14 100644 --- a/src/de/blinkt/openvpn/ConfigConverter.java +++ b/src/de/blinkt/openvpn/ConfigConverter.java @@ -159,8 +159,8 @@ public class ConfigConverter extends ListActivity {  		mResult.mClientKeyFilename = VpnProfile.INLINE_TAG + embedFile(mResult.mClientKeyFilename);
  		mResult.mTLSAuthFilename = VpnProfile.INLINE_TAG + embedFile(mResult.mTLSAuthFilename);
 -		if(mResult.mUsername != null){
 -			String data =embedFile(mResult.mName);
 +		if(mResult.mUsername != null && !mResult.mUsername.equals("")){
 +			String data =embedFile(mResult.mUsername);
  			mResult.mName=null;
  			if(data!=null) {
  				String[] parts = data.split("\n");
 diff --git a/src/de/blinkt/openvpn/ConfigParser.java b/src/de/blinkt/openvpn/ConfigParser.java index b897f63a..1b07178e 100644 --- a/src/de/blinkt/openvpn/ConfigParser.java +++ b/src/de/blinkt/openvpn/ConfigParser.java @@ -436,7 +436,7 @@ public class ConfigParser {  				np.mAuthenticationType=VpnProfile.TYPE_USERPASS_KEYSTORE;  			}  			if(authuser.size()>1) { -				np.mName=authuser.get(1); +				np.mUsername=authuser.get(1);  			}  		} | 
