From 1992a5feed9911a63898586fc50d2d7123334bdd Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Fri, 25 May 2012 09:28:18 +0200 Subject: Fix errors reported by lint --- res/layout/log_entry.xml | 7 --- res/values-de/strings.xml | 18 +----- res/values/arrays.xml | 8 +-- res/values/colors.xml | 6 -- res/values/strings.xml | 65 ++++++---------------- res/xml/main_about.xml | 5 -- res/xml/vpn_preferences.xml | 7 --- res/xml/vpn_profile_list.xml | 4 -- src/de/blinkt/openvpn/FileSelect.java | 3 +- src/de/blinkt/openvpn/Settings_Authentication.java | 3 +- src/de/blinkt/openvpn/VpnProfile.java | 2 +- 11 files changed, 26 insertions(+), 102 deletions(-) delete mode 100644 res/layout/log_entry.xml delete mode 100644 res/values/colors.xml delete mode 100644 res/xml/main_about.xml delete mode 100644 res/xml/vpn_preferences.xml delete mode 100644 res/xml/vpn_profile_list.xml diff --git a/res/layout/log_entry.xml b/res/layout/log_entry.xml deleted file mode 100644 index 5e20447..0000000 --- a/res/layout/log_entry.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index a003948..27e86ef 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -1,26 +1,14 @@ - OpenVPN für Android + OpenVPN für Android Server: Server Port: - Verbinden - - starte Verbindung… - - Auswählen… - - Datei öffnen Ort Verzeichnis kann nicht gelesen werden - Neu Auswählen - Dateiname: Abbrechen - Speichern Keine Daten - Fehler - Clientzertifikat LZO Komprimierung Kein Zertifikat Clientzertifikat @@ -31,8 +19,6 @@ Über Typ PKCS12 Passwort - TLS Authentifizierung - Erweiterte Einstellungen - Benutze TLS Authentifizierung + Benutze TLS Authentifizierung \ No newline at end of file diff --git a/res/values/arrays.xml b/res/values/arrays.xml index 3dd0cbb..20ad809 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -11,13 +11,7 @@ User/PW + PKCS12 User/PW + Android - - certs - pkcs12 - keystore - userpw - statickeys - + 0 1 diff --git a/res/values/colors.xml b/res/values/colors.xml deleted file mode 100644 index f22e054..0000000 --- a/res/values/colors.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - #666666 - #000000 - - diff --git a/res/values/strings.xml b/res/values/strings.xml index 005dc58..bea7220 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -13,36 +13,20 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - --> +--> - OpenVPN for Android + OpenVPN for Android Server Address: Server Port: - Shared Secret: - Connect - - OpenVPN is connecting… - OpenVPN is connected! - OpenVPN is disconnected! - openvpn.uni-paderborn.de 1194 - - - File dialog Location folder can\'t be read! - New Select - File name: Cancel - Save No Data - #ffff0000 - Error - User Certificate LZO Compression No Certificate Client Certificate @@ -51,8 +35,7 @@ CA Certificate Select Nothing selected - Openvpn Logo - Copyright © 2002–2010 OpenVPN Technologies, Inc. <sales@openvpn.net>\n + Copyright © 2002–2010 OpenVPN Technologies, Inc. <sales@openvpn.net>\n "OpenVPN" is a trademark of OpenVPN Technologies, Inc.\n Copyright 2012\nArne Schwabe <arne@rfc2549.org> @@ -60,8 +43,7 @@ The program uses the following components. See the source for full details on the licenses File Dialog based on work by Alexander Ponomarev" Copyright © 1996 – 2011 Markus Franz Xaver Johannes Oberhumer - - This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit\n + This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit\n Copyright © 1998-2008 The OpenSSL Project. All rights reserved.\n\n This product includes cryptographic software written by Eric Young (eay@cryptsoft.com)\n Copyright © 1995-1998 Eric Young (eay@cryptsoft.com) All rights reserved. @@ -73,21 +55,13 @@ About Openvpn for Android List of all configured VPNs All your precious VPNs - Type PKCS12 Password FileTypeIcon - Select… Select… Nothing Selected - TLS Auth - Show advanced settings Use TLS Authentication TLS Direction - VPN List - Add OpenVPN Config - Saved VPN Configs - Enter IPv6 Address/Netmask in CIDR Format (e.g. 2000:dd::23/64) Enter IPv4 Address/Netmask in CIDR Format (e.g. 1.2.3.4/24) IPv4 Address @@ -104,7 +78,6 @@ No User certificate selected. No error found Error in Configuration - An error has been found in your VPN configuration: Cannot parse the IPv4 address Cannot parse the custom routes Leave empty to query on demand @@ -125,7 +98,7 @@ Except TLS Server Checks the Remote Server Certificate CN against a String Certificate Hostname Check - Enter the string against which the remote Server is checked. Openvpn will use prefix matching. "Server" matches "Server-1" and "Server-2"\nLeave empty to check the CN against the server hostname. + Enter the string against which the remote Server is checked. Openvpn will use prefix matching. "Server" matches "Server-1" and "Server-2"\nLeave empty to check the CN against the server hostname. Remote Hostname(CN) Enables the TLS Key Authentication TLS Auth File @@ -136,7 +109,6 @@ Override DNS Settings by Server Use your own DNS Servers searchDomain - DNS Server to be used. DNS Server to be used. DNS Server Secondary DNS Server used if the normal DNS Server cannot be reached. @@ -145,7 +117,7 @@ Ignore routed pushed by the server. Redirects all Traffic over the VPN Use default Route - Enter custom routes. Only enter destination in CIDR format. "10.0.0.0/8 2002::/16" would direct the networks 10.0.0.0/8 and 2002::/16 over the VPN. + Enter custom routes. Only enter destination in CIDR format. "10.0.0.0/8 2002::/16" would direct the networks 10.0.0.0/8 and 2002::/16 over the VPN. Custom Routes Log verbosity level Allows authenticated packets from any IP @@ -170,7 +142,6 @@ Corrected route %1$s/%2$s to %3$s/%2$s Cannot accces the Android Keychain Certificates. If you restored a backup of the app/app settings reselect the certificate to recreate the permission to access the certificate. %1$s %2$s - Could not write log contents to file Send Logfile Send ICS Openvpn log file @@ -179,15 +150,15 @@ Tap Mode is not possible with the non root VPN API. Therefore this application cannot provide tap support Again? Are you kidding? No tap mode is really not supported and sending more mail aksing if it will be supported will not help. A third time? Actually one could write a a tap emulator based on tun that would add layer2 information on send and strip layer2 information on receive. But this tap emulator would have to implement also ARP and possible a DHCP client. I am not aware of anybody doing any work in this direction. Contact me if you want to start coding on this. - FAQ - frequently asked questions and some adivce - Copying log entries - To copy a single log entry press and and hold on the log entry. To copy/send the whole log use the Send Log option. Use the hardware menu button if not visible in the gui. - Shortcut to start - You can place a shortcut to start OpenVPN on your desktop. Depending on your homescreen program you have to add a shortcut or a widget. - Your image does not support the VPNService API,sorry :( - Encryption - Enter Encryption method + FAQ + frequently asked questions and some adivce + Copying log entries + To copy a single log entry press and and hold on the log entry. To copy/send the whole log use the Send Log option. Use the hardware menu button if not visible in the gui. + Shortcut to start + You can place a shortcut to start OpenVPN on your desktop. Depending on your homescreen program you have to add a shortcut or a widget. + Your image does not support the VPNService API,sorry :( + Encryption + Enter Encryption method Enter the cipher key for openvpn. Leave empty to use default cipher Authentication/Encryption File Explorer @@ -220,7 +191,6 @@ IPv4 IPv6 Waiting for state message… - General Settings imported profile imported profile %d Broken Images @@ -228,5 +198,6 @@ The username must not be empty. PKCS12 File Encryption Key Private Key Password - Password - + Password + + \ No newline at end of file diff --git a/res/xml/main_about.xml b/res/xml/main_about.xml deleted file mode 100644 index 8e3e28d..0000000 --- a/res/xml/main_about.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/res/xml/vpn_preferences.xml b/res/xml/vpn_preferences.xml deleted file mode 100644 index 16c330c..0000000 --- a/res/xml/vpn_preferences.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - diff --git a/res/xml/vpn_profile_list.xml b/res/xml/vpn_profile_list.xml deleted file mode 100644 index b1ce1a1..0000000 --- a/res/xml/vpn_profile_list.xml +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/src/de/blinkt/openvpn/FileSelect.java b/src/de/blinkt/openvpn/FileSelect.java index 62cd988..c235594 100644 --- a/src/de/blinkt/openvpn/FileSelect.java +++ b/src/de/blinkt/openvpn/FileSelect.java @@ -15,6 +15,7 @@ import android.app.Fragment; import android.app.FragmentTransaction; import android.content.Intent; import android.os.Bundle; +import android.os.Environment; public class FileSelect extends Activity { public static final String RESULT_DATA = "RESULT_PATH"; @@ -36,7 +37,7 @@ public class FileSelect extends Activity { mData = getIntent().getStringExtra(START_DATA); if(mData==null) - mData="/sdcard"; + mData=Environment.getExternalStorageDirectory().getPath(); String title = getIntent().getStringExtra(WINDOW_TITLE); int titleId = getIntent().getIntExtra(WINDOW_TITLE, 0); diff --git a/src/de/blinkt/openvpn/Settings_Authentication.java b/src/de/blinkt/openvpn/Settings_Authentication.java index b2e8408..6733ed0 100644 --- a/src/de/blinkt/openvpn/Settings_Authentication.java +++ b/src/de/blinkt/openvpn/Settings_Authentication.java @@ -3,6 +3,7 @@ package de.blinkt.openvpn; import android.app.Activity; import android.content.Intent; import android.os.Bundle; +import android.os.Environment; import android.preference.CheckBoxPreference; import android.preference.EditTextPreference; import android.preference.ListPreference; @@ -102,7 +103,7 @@ public class Settings_Authentication extends OpenVpnPreferencesFragment implemen } void startFileDialog() { Intent startFC = new Intent(getActivity(),FileSelect.class); - startFC.putExtra(FileSelect.START_DATA, "/sdcard"); + startFC.putExtra(FileSelect.START_DATA, Environment.getExternalStorageDirectory().getPath()); startActivityForResult(startFC,SELECT_TLS_FILE); } diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java index 8d721b3..b862bb8 100644 --- a/src/de/blinkt/openvpn/VpnProfile.java +++ b/src/de/blinkt/openvpn/VpnProfile.java @@ -456,7 +456,7 @@ public class VpnProfile implements Serializable{ // Put enough digits togher to make a password :) Random r = new Random(); for(int i=0;i < 4;i++) { - pw += new Integer(r.nextInt(1000)).toString(); + pw += Integer.valueOf(r.nextInt(1000)).toString(); } mTempPKCS12Password=pw; -- cgit v1.2.3