summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.hgignore2
-rw-r--r--res/drawable-hdpi/ic_doc_generic_am.pngbin0 -> 694 bytes
-rw-r--r--res/drawable-hdpi/ic_root_folder_am.pngbin0 -> 508 bytes
-rw-r--r--res/drawable-mdpi/ic_doc_generic_am.pngbin0 -> 561 bytes
-rw-r--r--res/drawable-mdpi/ic_root_folder_am.pngbin0 -> 442 bytes
-rw-r--r--res/drawable-xhdpi/ic_doc_generic_am.pngbin0 -> 831 bytes
-rw-r--r--res/drawable-xhdpi/ic_root_folder_am.pngbin0 -> 582 bytes
-rw-r--r--res/drawable-xxhdpi/ic_doc_generic_am.pngbin0 -> 585 bytes
-rw-r--r--res/drawable-xxhdpi/ic_root_folder_am.pngbin0 -> 1263 bytes
-rw-r--r--res/drawable/file.pngbin571 -> 0 bytes
-rw-r--r--res/drawable/folder.pngbin392 -> 0 bytes
-rw-r--r--res/layout/log_silders.xml8
-rw-r--r--res/layout/vpnstatus.xml6
-rwxr-xr-xres/values/strings.xml7
-rw-r--r--src/de/blinkt/openvpn/fragments/Settings_Basic.java8
-rw-r--r--src/de/blinkt/openvpn/fragments/VPNProfileList.java39
16 files changed, 42 insertions, 28 deletions
diff --git a/.hgignore b/.hgignore
index 34541a5b..9c91375a 100644
--- a/.hgignore
+++ b/.hgignore
@@ -1,7 +1,7 @@
obj
bin
libs
-gen
+^gen$
build
openvpn/.git
openvpn/autom4te.cache
diff --git a/res/drawable-hdpi/ic_doc_generic_am.png b/res/drawable-hdpi/ic_doc_generic_am.png
new file mode 100644
index 00000000..55b9b7d3
--- /dev/null
+++ b/res/drawable-hdpi/ic_doc_generic_am.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_root_folder_am.png b/res/drawable-hdpi/ic_root_folder_am.png
new file mode 100644
index 00000000..915e1182
--- /dev/null
+++ b/res/drawable-hdpi/ic_root_folder_am.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_doc_generic_am.png b/res/drawable-mdpi/ic_doc_generic_am.png
new file mode 100644
index 00000000..a1bd14ea
--- /dev/null
+++ b/res/drawable-mdpi/ic_doc_generic_am.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_root_folder_am.png b/res/drawable-mdpi/ic_root_folder_am.png
new file mode 100644
index 00000000..4352d08d
--- /dev/null
+++ b/res/drawable-mdpi/ic_root_folder_am.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_doc_generic_am.png b/res/drawable-xhdpi/ic_doc_generic_am.png
new file mode 100644
index 00000000..e05c4b48
--- /dev/null
+++ b/res/drawable-xhdpi/ic_doc_generic_am.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_root_folder_am.png b/res/drawable-xhdpi/ic_root_folder_am.png
new file mode 100644
index 00000000..c916e0be
--- /dev/null
+++ b/res/drawable-xhdpi/ic_root_folder_am.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_doc_generic_am.png b/res/drawable-xxhdpi/ic_doc_generic_am.png
new file mode 100644
index 00000000..c0988663
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_doc_generic_am.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_root_folder_am.png b/res/drawable-xxhdpi/ic_root_folder_am.png
new file mode 100644
index 00000000..077c851c
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_root_folder_am.png
Binary files differ
diff --git a/res/drawable/file.png b/res/drawable/file.png
deleted file mode 100644
index fa45699e..00000000
--- a/res/drawable/file.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/folder.png b/res/drawable/folder.png
deleted file mode 100644
index 0108ed93..00000000
--- a/res/drawable/folder.png
+++ /dev/null
Binary files differ
diff --git a/res/layout/log_silders.xml b/res/layout/log_silders.xml
index 5df97490..1035cb4a 100644
--- a/res/layout/log_silders.xml
+++ b/res/layout/log_silders.xml
@@ -27,7 +27,7 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="Timestamps"/>
+ android:text="@string/timestamps"/>
<RadioGroup
android:id="@+id/timeFormatRadioGroup"
@@ -38,21 +38,21 @@
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="None"
+ android:text="@string/timestamps_none"
android:id="@+id/radioNone"
/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="Short"
+ android:text="@string/timestamp_short"
android:id="@+id/radioShort"
/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="ISO"
+ android:text="@string/timestamp_iso"
android:id="@+id/radioISO"
/>
diff --git a/res/layout/vpnstatus.xml b/res/layout/vpnstatus.xml
index 0c765fe6..eb7c53ee 100644
--- a/res/layout/vpnstatus.xml
+++ b/res/layout/vpnstatus.xml
@@ -9,7 +9,7 @@
<TextView
- android:text="Upload"
+ android:text="@string/uploaded_data"
style="@style/logWindowStatusTitle"/>
<TextView
@@ -18,7 +18,7 @@
tools:text="4 Mbit/s 6.7 GB"/>
<TextView
- android:text="Download"
+ android:text="@string/downloaded_data"
style="@style/logWindowStatusTitle"/>
<TextView
@@ -34,7 +34,7 @@
<TextView
- android:text="Vpn Status"
+ android:text="@string/vpn_status"
style="@style/logWindowStatusTitle"/>
<TextView
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 0a4c9509..91b246b0 100755
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -299,4 +299,11 @@
<string name="logCleared">Log cleared.</string>
<string name="show_password">Show password</string>
<string name="keyChainAccessError">KeyChain Access error: %s</string>
+ <string name="timestamp_short">Short</string>
+ <string name="timestamp_iso">ISO</string>
+ <string name="timestamps">Timestamps</string>
+ <string name="timestamps_none">None</string>
+ <string name="uploaded_data">Upload</string>
+ <string name="downloaded_data">Download</string>
+ <string name="vpn_status">Vpn Status</string>
</resources>
diff --git a/src/de/blinkt/openvpn/fragments/Settings_Basic.java b/src/de/blinkt/openvpn/fragments/Settings_Basic.java
index 88941bea..a559cda2 100644
--- a/src/de/blinkt/openvpn/fragments/Settings_Basic.java
+++ b/src/de/blinkt/openvpn/fragments/Settings_Basic.java
@@ -1,5 +1,6 @@
package de.blinkt.openvpn.fragments;
+import android.annotation.TargetApi;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
@@ -88,9 +89,10 @@ public class Settings_Basic extends Fragment implements View.OnClickListener, On
X509Certificate cert = KeyChain.getCertificateChain(getActivity(), mProfile.mAlias)[0];
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
- String algorithm= KeyChain.getPrivateKey(getActivity(),mProfile.mAlias).getAlgorithm();
- if (KeyChain.isBoundKeyAlgorithm(algorithm))
- certstr+=getString(R.string.hwkeychain);
+ String algorithm= KeyChain.getPrivateKey(getActivity(),mProfile.mAlias).getAlgorithm();
+ if (KeyChain.isBoundKeyAlgorithm(algorithm))
+ certstr+=getString(R.string.hwkeychain);
+
}
certstr+=X509Utils.getCertificateFriendlyName(cert);
diff --git a/src/de/blinkt/openvpn/fragments/VPNProfileList.java b/src/de/blinkt/openvpn/fragments/VPNProfileList.java
index 447ed1e0..4d54bc68 100644
--- a/src/de/blinkt/openvpn/fragments/VPNProfileList.java
+++ b/src/de/blinkt/openvpn/fragments/VPNProfileList.java
@@ -201,8 +201,8 @@ public class VPNProfileList extends ListFragment {
onAddProfileClicked();
return true;
} else if (itemId == MENU_IMPORT_PROFILE) {
- //startImportConfig();
- startFilePicker();
+ startImportConfig();
+ //startFilePicker();
return true;
} else {
return super.onOptionsItemSelected(item);
@@ -212,8 +212,8 @@ public class VPNProfileList extends ListFragment {
private void startFilePicker() {
Intent i = new Intent(Intent.ACTION_OPEN_DOCUMENT);
i.addCategory(Intent.CATEGORY_OPENABLE);
- i.setType("application/x-openvpn-profile");
- startActivityForResult(i,FILE_PICKER_RESULT);
+ i.setType("*/*");
+ startActivityForResult(i, FILE_PICKER_RESULT);
}
private void startImportConfig() {
@@ -261,7 +261,6 @@ public class VPNProfileList extends ListFragment {
}
-
private void addProfile(VpnProfile profile) {
getPM().addProfile(profile);
getPM().saveProfileList(getActivity());
@@ -269,10 +268,6 @@ public class VPNProfileList extends ListFragment {
mArrayadapter.add(profile);
}
-
-
-
-
private ProfileManager getPM() {
return ProfileManager.getInstance(getActivity());
}
@@ -299,21 +294,31 @@ public class VPNProfileList extends ListFragment {
setListAdapter();
} else if(requestCode== SELECT_PROFILE) {
- String filedata = data.getStringExtra(FileSelect.RESULT_DATA);
- Intent startImport = new Intent(getActivity(),ConfigConverter.class);
- startImport.setAction(ConfigConverter.IMPORT_PROFILE);
- Uri uri = new Uri.Builder().path(filedata).scheme("file").build();
- startImport.setData(uri);
- startActivityForResult(startImport, IMPORT_PROFILE);
+ String fileData = data.getStringExtra(FileSelect.RESULT_DATA);
+ Uri uri = new Uri.Builder().path(fileData).scheme("file").build();
+
+ startConfigImport(uri);
} else if(requestCode == IMPORT_PROFILE) {
String profileUUID = data.getStringExtra(VpnProfile.EXTRA_PROFILEUUID);
mArrayadapter.add(ProfileManager.get(getActivity(), profileUUID));
- }
+ } else if(resultCode == FILE_PICKER_RESULT) {
+ if (data != null) {
+ Uri uri = data.getData();
+ startConfigImport(uri);
+ }
+ }
}
+ private void startConfigImport(Uri uri) {
+ Intent startImport = new Intent(getActivity(),ConfigConverter.class);
+ startImport.setAction(ConfigConverter.IMPORT_PROFILE);
+ startImport.setData(uri);
+ startActivityForResult(startImport, IMPORT_PROFILE);
+ }
+
- private void editVPN(VpnProfile profile) {
+ private void editVPN(VpnProfile profile) {
mEditProfile =profile;
Intent vprefintent = new Intent(getActivity(),VPNPreferences.class)
.putExtra(getActivity().getPackageName() + ".profileUUID", profile.getUUID().toString());