From 7aab2ed1a75b29c40c0f83b1d48d889b02deb61f 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 --- src/de/blinkt/openvpn/FileSelect.java | 3 ++- src/de/blinkt/openvpn/Settings_Authentication.java | 3 ++- src/de/blinkt/openvpn/VpnProfile.java | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/de/blinkt') diff --git a/src/de/blinkt/openvpn/FileSelect.java b/src/de/blinkt/openvpn/FileSelect.java index 62cd9883..c235594e 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 b2e84087..6733ed0c 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 8d721b38..b862bb8c 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