summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-07-02 22:54:50 +0200
committerArne Schwabe <arne@rfc2549.org>2012-07-02 22:54:50 +0200
commitdf8a748e05b9fc9c6e7079012873fe046cfd02a4 (patch)
treecb83540bd68e5056e9461ba8520c55a180178047
parent21c3e54010129b504891e1786bf425d89328c969 (diff)
The "things that look similar are actually different" commit
fix last commit (mName != mUsername) MAIN != VIEW
-rw-r--r--AndroidManifest.xml26
-rw-r--r--src/de/blinkt/openvpn/ConfigConverter.java4
-rw-r--r--src/de/blinkt/openvpn/ConfigParser.java2
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);
}
}