summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-08-12 14:14:39 +0200
committerArne Schwabe <arne@rfc2549.org>2013-08-12 14:14:39 +0200
commit417448668f51c1c0f5666332479a23087014221b (patch)
treecd3f978b7a2af36977db083ba318be7626734731
parente17dfd0b7ea3b91f98bdfc85f0db221ee5f6778d (diff)
Fix lint issues
-rw-r--r--res/drawable-mdpi/icon.pngbin5681 -> 2505 bytes
-rw-r--r--res/layout/api_confirm.xml1
-rwxr-xr-xres/values/strings.xml1
-rw-r--r--src/de/blinkt/openvpn/core/GetRestrictionReceiver.java3
-rw-r--r--src/de/blinkt/openvpn/fragments/FileSelectionFragment.java14
5 files changed, 12 insertions, 7 deletions
diff --git a/res/drawable-mdpi/icon.png b/res/drawable-mdpi/icon.png
index ee1b9769..4d58f717 100644
--- a/res/drawable-mdpi/icon.png
+++ b/res/drawable-mdpi/icon.png
Binary files differ
diff --git a/res/layout/api_confirm.xml b/res/layout/api_confirm.xml
index bad20cc0..afec0df8 100644
--- a/res/layout/api_confirm.xml
+++ b/res/layout/api_confirm.xml
@@ -29,6 +29,7 @@
android:gravity="center_vertical">
<ImageView android:id="@+id/icon"
+ android:contentDescription="@string/permission_icon_app"
android:layout_width="@android:dimen/app_icon_size"
android:layout_height="@android:dimen/app_icon_size"
android:paddingRight="1mm"/>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index d754772b..ad3c2d48 100755
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -438,5 +438,6 @@
<string name="vpnbehaviour">VPN behaviour</string>
<string name="allow_vpn_changes">Allow changes to VPN Profiles</string>
<string name="hwkeychain">Hardware Keystore:</string>
+ <string name="permission_icon_app">Icon of app trying to use OpenVPN for Android</string>
</resources> \ No newline at end of file
diff --git a/src/de/blinkt/openvpn/core/GetRestrictionReceiver.java b/src/de/blinkt/openvpn/core/GetRestrictionReceiver.java
index 14134148..7f8498d5 100644
--- a/src/de/blinkt/openvpn/core/GetRestrictionReceiver.java
+++ b/src/de/blinkt/openvpn/core/GetRestrictionReceiver.java
@@ -1,10 +1,12 @@
package de.blinkt.openvpn.core;
+import android.annotation.TargetApi;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.RestrictionEntry;
+import android.os.Build;
import android.os.Bundle;
import java.util.ArrayList;
@@ -14,6 +16,7 @@ import de.blinkt.openvpn.R;
/**
* Created by arne on 25.07.13.
*/
+@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
public class GetRestrictionReceiver extends BroadcastReceiver {
@Override
public void onReceive(final Context context, Intent intent) {
diff --git a/src/de/blinkt/openvpn/fragments/FileSelectionFragment.java b/src/de/blinkt/openvpn/fragments/FileSelectionFragment.java
index e0c97620..2cfe886b 100644
--- a/src/de/blinkt/openvpn/fragments/FileSelectionFragment.java
+++ b/src/de/blinkt/openvpn/fragments/FileSelectionFragment.java
@@ -177,13 +177,13 @@ public class FileSelectionFragment extends ListFragment {
// se ha um filtro de formatos, utiliza-o
if (formatFilter != null) {
boolean contains = false;
- for (int i = 0; i < formatFilter.length; i++) {
- final String formatLwr = formatFilter[i].toLowerCase(Locale.getDefault());
- if (fileNameLwr.endsWith(formatLwr)) {
- contains = true;
- break;
- }
- }
+ for (String aFormatFilter : formatFilter) {
+ final String formatLwr = aFormatFilter.toLowerCase(Locale.getDefault());
+ if (fileNameLwr.endsWith(formatLwr)) {
+ contains = true;
+ break;
+ }
+ }
if (contains) {
filesMap.put(fileName, fileName);
filesPathMap.put(fileName, file.getPath());