Commit 974a690c authored by Max Rebuschatis's avatar Max Rebuschatis Committed by Commit Bot

Allow disk read when dealing with ARCore install

This is a low-frequency check that needs disk
access.

Change-Id: I0b6448b401c9c0176a98e7eff8c3f46d9956790f
Reviewed-on: https://chromium-review.googlesource.com/c/1298743
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: default avatarMichael Thiessen <mthiesse@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603709}
parent e063ea3a
...@@ -17,6 +17,7 @@ import android.support.annotation.IntDef; ...@@ -17,6 +17,7 @@ import android.support.annotation.IntDef;
import dalvik.system.BaseDexClassLoader; import dalvik.system.BaseDexClassLoader;
import org.chromium.base.ContextUtils; import org.chromium.base.ContextUtils;
import org.chromium.base.StrictModeContext;
import org.chromium.base.ThreadUtils; import org.chromium.base.ThreadUtils;
import org.chromium.base.annotations.CalledByNative; import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace; import org.chromium.base.annotations.JNINamespace;
...@@ -91,8 +92,10 @@ public class ArCoreJavaUtils { ...@@ -91,8 +92,10 @@ public class ArCoreJavaUtils {
@CalledByNative @CalledByNative
private static String getArCoreShimLibraryPath() { private static String getArCoreShimLibraryPath() {
return ((BaseDexClassLoader) ContextUtils.getApplicationContext().getClassLoader()) try (StrictModeContext unused = StrictModeContext.allowDiskReads()) {
.findLibrary("arcore_sdk_c_minimal"); return ((BaseDexClassLoader) ContextUtils.getApplicationContext().getClassLoader())
.findLibrary("arcore_sdk_c_minimal");
}
} }
private ArCoreJavaUtils(long nativeArCoreJavaUtils) { private ArCoreJavaUtils(long nativeArCoreJavaUtils) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment