From 2eb96aba530f975b0e82d842c1d6936dd88525f7 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Wed, 12 Nov 2014 11:13:34 +0100 Subject: Fix lint issues --- main/src/main/java/de/blinkt/openvpn/VpnProfile.java | 2 +- .../main/java/de/blinkt/openvpn/core/OpenVPNService.java | 1 + .../main/java/de/blinkt/openvpn/core/OpenVPNThread.java | 2 ++ .../java/de/blinkt/openvpn/core/VPNLaunchHelper.java | 8 +++++++- .../java/org/spongycastle/util/io/pem/PemReader.java | 2 +- main/src/main/res/drawable-hdpi/ic_edit_grey600_48dp.png | Bin 493 -> 0 bytes main/src/main/res/drawable-mdpi/ic_edit_grey600_48dp.png | Bin 379 -> 0 bytes .../src/main/res/drawable-xhdpi/ic_edit_grey600_48dp.png | Bin 639 -> 0 bytes .../main/res/drawable-xxhdpi/ic_edit_grey600_48dp.png | Bin 846 -> 0 bytes .../main/res/drawable-xxxhdpi/ic_edit_grey600_48dp.png | Bin 1099 -> 0 bytes main/src/main/res/layout/vpn_remote_collasped.xml | 15 --------------- 11 files changed, 12 insertions(+), 18 deletions(-) delete mode 100644 main/src/main/res/drawable-hdpi/ic_edit_grey600_48dp.png delete mode 100644 main/src/main/res/drawable-mdpi/ic_edit_grey600_48dp.png delete mode 100644 main/src/main/res/drawable-xhdpi/ic_edit_grey600_48dp.png delete mode 100644 main/src/main/res/drawable-xxhdpi/ic_edit_grey600_48dp.png delete mode 100644 main/src/main/res/drawable-xxxhdpi/ic_edit_grey600_48dp.png delete mode 100644 main/src/main/res/layout/vpn_remote_collasped.xml (limited to 'main') diff --git a/main/src/main/java/de/blinkt/openvpn/VpnProfile.java b/main/src/main/java/de/blinkt/openvpn/VpnProfile.java index 7a9c2907..6a3f6312 100644 --- a/main/src/main/java/de/blinkt/openvpn/VpnProfile.java +++ b/main/src/main/java/de/blinkt/openvpn/VpnProfile.java @@ -614,7 +614,7 @@ public class VpnProfile implements Serializable { public static boolean isEmbedded(String data) { if (data==null) return false; - if(data.startsWith(INLINE_TAG) || data.startsWith(DISPLAYNAME_TAG)) + if (data.startsWith(INLINE_TAG) || data.startsWith(DISPLAYNAME_TAG)) return true; else return false; diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java index cc6daf6b..abc40aa7 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java +++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java @@ -715,6 +715,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac public void updateState(String state, String logmessage, int resid, ConnectionStatus level) { // If the process is not running, ignore any state, // Notification should be invisible in this state + doSendBroadcast(state, level); if (mProcessThread == null && !mNotificationAlwaysVisible) return; diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNThread.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNThread.java index 20d0e327..58c995a8 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNThread.java +++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNThread.java @@ -5,6 +5,7 @@ package de.blinkt.openvpn.core; +import android.annotation.SuppressLint; import android.util.Log; import java.io.BufferedReader; @@ -30,6 +31,7 @@ import de.blinkt.openvpn.core.VpnStatus.LogItem; public class OpenVPNThread implements Runnable { private static final String DUMP_PATH_STRING = "Dump path: "; + @SuppressLint("SdCardPath") private static final String BROKEN_PIE_SUPPORT = "/data/data/de.blinkt.openvpn/cache/pievpn[1]: syntax error:"; private static final String TAG = "OpenVPN"; public static final int M_FATAL = (1 << 4); diff --git a/main/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java b/main/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java index de903fa5..8b0b951f 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java +++ b/main/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java @@ -5,6 +5,7 @@ package de.blinkt.openvpn.core; +import android.annotation.TargetApi; import android.content.Context; import android.content.Intent; import android.content.pm.ApplicationInfo; @@ -29,7 +30,7 @@ public class VPNLaunchHelper { static private String writeMiniVPN(Context context) { String[] abis; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) - abis =Build.SUPPORTED_ABIS; + abis = getSupportedAbisLollipop(); else abis = new String[]{Build.CPU_ABI, Build.CPU_ABI2}; @@ -44,6 +45,11 @@ public class VPNLaunchHelper { return null; } + @TargetApi(Build.VERSION_CODES.LOLLIPOP) + private static String[] getSupportedAbisLollipop() { + return Build.SUPPORTED_ABIS; + } + private static String getMiniVPNExecutableName() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) diff --git a/main/src/main/java/org/spongycastle/util/io/pem/PemReader.java b/main/src/main/java/org/spongycastle/util/io/pem/PemReader.java index cbbebab9..75e2c171 100644 --- a/main/src/main/java/org/spongycastle/util/io/pem/PemReader.java +++ b/main/src/main/java/org/spongycastle/util/io/pem/PemReader.java @@ -49,7 +49,7 @@ public class PemReader { String line; String endMarker = END + type; - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); List headers = new ArrayList(); while ((line = readLine()) != null) diff --git a/main/src/main/res/drawable-hdpi/ic_edit_grey600_48dp.png b/main/src/main/res/drawable-hdpi/ic_edit_grey600_48dp.png deleted file mode 100644 index 6ed4351c..00000000 Binary files a/main/src/main/res/drawable-hdpi/ic_edit_grey600_48dp.png and /dev/null differ diff --git a/main/src/main/res/drawable-mdpi/ic_edit_grey600_48dp.png b/main/src/main/res/drawable-mdpi/ic_edit_grey600_48dp.png deleted file mode 100644 index 4c95bd57..00000000 Binary files a/main/src/main/res/drawable-mdpi/ic_edit_grey600_48dp.png and /dev/null differ diff --git a/main/src/main/res/drawable-xhdpi/ic_edit_grey600_48dp.png b/main/src/main/res/drawable-xhdpi/ic_edit_grey600_48dp.png deleted file mode 100644 index 0c0fd76f..00000000 Binary files a/main/src/main/res/drawable-xhdpi/ic_edit_grey600_48dp.png and /dev/null differ diff --git a/main/src/main/res/drawable-xxhdpi/ic_edit_grey600_48dp.png b/main/src/main/res/drawable-xxhdpi/ic_edit_grey600_48dp.png deleted file mode 100644 index 1361eedc..00000000 Binary files a/main/src/main/res/drawable-xxhdpi/ic_edit_grey600_48dp.png and /dev/null differ diff --git a/main/src/main/res/drawable-xxxhdpi/ic_edit_grey600_48dp.png b/main/src/main/res/drawable-xxxhdpi/ic_edit_grey600_48dp.png deleted file mode 100644 index 181f899c..00000000 Binary files a/main/src/main/res/drawable-xxxhdpi/ic_edit_grey600_48dp.png and /dev/null differ diff --git a/main/src/main/res/layout/vpn_remote_collasped.xml b/main/src/main/res/layout/vpn_remote_collasped.xml deleted file mode 100644 index 93ac1f9a..00000000 --- a/main/src/main/res/layout/vpn_remote_collasped.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - \ No newline at end of file -- cgit v1.2.3