Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 147ef6b1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Allows disk reads when adding native paths to classloader" into pi-dev

parents c8b3e0b6 5c5daa4c
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -736,7 +736,13 @@ public final class LoadedApk {
        }
        }


        if (!libPaths.isEmpty() && SystemProperties.getBoolean(PROPERTY_NAME_APPEND_NATIVE, true)) {
        if (!libPaths.isEmpty() && SystemProperties.getBoolean(PROPERTY_NAME_APPEND_NATIVE, true)) {
            // Temporarily disable logging of disk reads on the Looper thread as this is necessary
            StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();
            try {
                ApplicationLoaders.getDefault().addNative(mClassLoader, libPaths);
                ApplicationLoaders.getDefault().addNative(mClassLoader, libPaths);
            } finally {
                StrictMode.setThreadPolicy(oldPolicy);
            }
        }
        }


        if (addedPaths != null && addedPaths.size() > 0) {
        if (addedPaths != null && addedPaths.size() > 0) {