From 549fb140774aba398eb4178ee14b67f71815aa42 Mon Sep 17 00:00:00 2001 From: n8fr8 Date: Mon, 14 May 2018 11:17:14 -0400 Subject: [PATCH] update native loader code --- .../android/binary/NativeLoader.java | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/tor-android-binary/src/main/java/org/torproject/android/binary/NativeLoader.java b/tor-android-binary/src/main/java/org/torproject/android/binary/NativeLoader.java index 2c316c34..08a2af98 100644 --- a/tor-android-binary/src/main/java/org/torproject/android/binary/NativeLoader.java +++ b/tor-android-binary/src/main/java/org/torproject/android/binary/NativeLoader.java @@ -23,24 +23,6 @@ public class NativeLoader { private static volatile boolean nativeLoaded = false; private final static String TAG = "TorNativeLoader"; - - private static File getNativeLibraryDir(Context context) { - File f = null; - if (context != null) { - try { - f = new File((String)ApplicationInfo.class.getField("nativeLibraryDir").get(context.getApplicationInfo())); - } catch (Throwable th) { - th.printStackTrace(); - } - } - if (f == null) { - f = new File(context.getApplicationInfo().dataDir, "lib"); - } - if (f != null && f.isDirectory()) { - return f; - } - return null; - } private static boolean loadFromZip(Context context, File destLocalFile, String folder) { @@ -150,15 +132,6 @@ public class NativeLoader { return true; } - /* - folder = "x86"; - destLocalFile = new File(context.getFilesDir().getAbsolutePath() + "/libtmessages86.so"); - if (!loadFromZip(context, destLocalFile, folder)) { - destLocalFile = new File(context.getFilesDir().getAbsolutePath() + "/libtmessagesarm.so"); - folder = "armeabi"; - loadFromZip(context, destLocalFile, folder); - } - */ } catch (Throwable e) { e.printStackTrace(); }