commit 5fe955e88ad9d9ca306a94f9917944029ebca2fc Author: Hans-Christoph Steiner hans@eds.org Date: Wed Dec 18 15:53:54 2019 +0100
ignore lint SetWorldReadable for the native unpackers --- app/src/main/java/org/torproject/android/OrbotMainActivity.java | 2 ++ .../java/org/torproject/android/service/util/CustomNativeLoader.java | 2 ++ .../src/main/java/org/torproject/android/service/util/NativeLoader.java | 2 ++ 3 files changed, 6 insertions(+)
diff --git a/app/src/main/java/org/torproject/android/OrbotMainActivity.java b/app/src/main/java/org/torproject/android/OrbotMainActivity.java index bab82a5d..00ef9721 100644 --- a/app/src/main/java/org/torproject/android/OrbotMainActivity.java +++ b/app/src/main/java/org/torproject/android/OrbotMainActivity.java @@ -3,6 +3,7 @@
package org.torproject.android;
+import android.annotation.SuppressLint; import android.app.AlertDialog; import android.app.Application; import android.content.BroadcastReceiver; @@ -1186,6 +1187,7 @@ public class OrbotMainActivity extends AppCompatActivity implements OrbotConstan llBoxShortcuts.addView(tv); }
+ @SuppressLint("SetWorldReadable") @RequiresApi(api = Build.VERSION_CODES.KITKAT) private void exportTorData() { File fileTorData; diff --git a/orbotservice/src/main/java/org/torproject/android/service/util/CustomNativeLoader.java b/orbotservice/src/main/java/org/torproject/android/service/util/CustomNativeLoader.java index 6504b8c7..fb528621 100644 --- a/orbotservice/src/main/java/org/torproject/android/service/util/CustomNativeLoader.java +++ b/orbotservice/src/main/java/org/torproject/android/service/util/CustomNativeLoader.java @@ -1,5 +1,6 @@ package org.torproject.android.service.util;
+import android.annotation.SuppressLint; import android.content.Context; import android.content.pm.ApplicationInfo; import android.os.Build; @@ -16,6 +17,7 @@ public class CustomNativeLoader {
private final static String TAG = "CNL";
+ @SuppressLint("SetWorldReadable") private static boolean loadFromZip(Context context, String libname, File destLocalFile, String arch) {
diff --git a/orbotservice/src/main/java/org/torproject/android/service/util/NativeLoader.java b/orbotservice/src/main/java/org/torproject/android/service/util/NativeLoader.java index f97f68e0..c870025a 100644 --- a/orbotservice/src/main/java/org/torproject/android/service/util/NativeLoader.java +++ b/orbotservice/src/main/java/org/torproject/android/service/util/NativeLoader.java @@ -1,5 +1,6 @@ package org.torproject.android.service.util;
+import android.annotation.SuppressLint; import android.content.Context; import android.os.Build; import android.util.Log; @@ -15,6 +16,7 @@ public class NativeLoader {
private final static String TAG = "TorNativeLoader";
+ @SuppressLint("SetWorldReadable") private static boolean loadFromZip(Context context, String libName, File destLocalFile, String folder) {