summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2018-10-09 10:39:19 -0700
committerAndreas Gampe <agampe@google.com>2018-10-10 20:20:02 -0700
commit369c8b5d4df64384a714c9908a623ae0c80351a4 (patch)
treeb9856794bc2285eabdc1b66ed70169e6b74d8e40
parent7c75a1e4e928376dc1f3fdb0927fff08120afc01 (diff)
Libcore: Add VMRuntime.hasBootImageSpaces
Expose to the system whether ART is using a boot image. Test: m Test: system boots Change-Id: I087c269dd1e95eeeab5db4250133f9c61e9399c7
-rw-r--r--libart/src/main/java/dalvik/system/VMRuntime.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/libart/src/main/java/dalvik/system/VMRuntime.java b/libart/src/main/java/dalvik/system/VMRuntime.java
index 59dd917aab..602d0f5a72 100644
--- a/libart/src/main/java/dalvik/system/VMRuntime.java
+++ b/libart/src/main/java/dalvik/system/VMRuntime.java
@@ -469,6 +469,16 @@ public final class VMRuntime {
public static native boolean isBootClassPathOnDisk(String instructionSet);
/**
+ * Returns whether the runtime is using a boot image.
+ *
+ * <p>While isBootClassPathOnDisk checks for the existence of an image file on disk,
+ * this method queries the runtime whether it is <em>using</em> an image.
+ */
+ @libcore.api.CorePlatformApi
+ @FastNative
+ public static native boolean hasBootImageSpaces();
+
+ /**
* Returns the instruction set of the current runtime.
*/
@libcore.api.CorePlatformApi