0
0
mirror of https://github.com/schwabe/ics-openvpn.git synced 2024-09-20 03:52:27 +02:00

The "things that look similar are actually different" commit

fix last commit (mName != mUsername)
MAIN != VIEW
This commit is contained in:
Arne Schwabe 2012-07-02 22:54:50 +02:00
parent 21c3e54010
commit df8a748e05
3 changed files with 11 additions and 21 deletions

View File

@ -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"

View File

@ -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");

View File

@ -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);
}
}