diff options
author | Brian Carlstrom <bdc@google.com> | 2014-08-05 21:00:08 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-08-05 21:00:08 +0000 |
commit | 074ae20882c23a2f2cf24c33888bb97b91e8f49b (patch) | |
tree | 4182aabf5802e819b44a09a9e3b8f7ca496102a1 /dalvik | |
parent | a3c68f3a883380cb1123ebc9d506443d98b7bfa2 (diff) | |
parent | 6c17caabccd492226c50605929a0eb9e044cb7dc (diff) | |
download | libcore-074ae20882c23a2f2cf24c33888bb97b91e8f49b.zip libcore-074ae20882c23a2f2cf24c33888bb97b91e8f49b.tar.gz libcore-074ae20882c23a2f2cf24c33888bb97b91e8f49b.tar.bz2 |
am 6c17caab: Merge "Make system use patchoat to relocate during runtime."
* commit '6c17caabccd492226c50605929a0eb9e044cb7dc':
Make system use patchoat to relocate during runtime.
Diffstat (limited to 'dalvik')
-rw-r--r-- | dalvik/src/main/java/dalvik/system/DexFile.java | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/dalvik/src/main/java/dalvik/system/DexFile.java b/dalvik/src/main/java/dalvik/system/DexFile.java index 8c78312..3965b81 100644 --- a/dalvik/src/main/java/dalvik/system/DexFile.java +++ b/dalvik/src/main/java/dalvik/system/DexFile.java @@ -309,9 +309,48 @@ public final class DexFile { throws FileNotFoundException, IOException; /** + * See {@link #isDexOptNeededInternal(String, String, String, boolean)}. + * + * @hide + */ + public static final byte UP_TO_DATE = 0; + + /** + * See {@link #isDexOptNeededInternal(String, String, String, boolean)}. + * + * @hide + */ + public static final byte PATCHOAT_NEEDED = 1; + + /** + * See {@link #isDexOptNeededInternal(String, String, String, boolean)}. + * + * @hide + */ + public static final byte DEXOPT_NEEDED = 2; + + /** + * Returns UP_TO_DATE if the VM believes that the apk/jar file + * is up to date, PATCHOAT_NEEDED if it believes that the file is up + * to date but it must be relocated to match the base address offset, + * and DEXOPT_NEEDED if it believes that it is out of date and should + * be passed through "dexopt" again. + * + * @param fileName the absolute path to the apk/jar file to examine. + * @return DEXOPT_NEEDED if dexopt should be called on the file, + * PATCHOAT_NEEDED if we need to run "patchoat" on it and + * UP_TO_DATE otherwise. + * @throws java.io.FileNotFoundException if fileName is not readable, + * not a file, or not present. + * @throws java.io.IOException if fileName is not a valid apk/jar file or + * if problems occur while parsing it. + * @throws java.lang.NullPointerException if fileName is null. + * @throws dalvik.system.StaleDexCacheError if the optimized dex file + * is stale but exists on a read-only partition. + * * @hide - **/ - public static native boolean isDexOptNeededInternal(String fileName, String pkgname, + */ + public static native byte isDexOptNeededInternal(String fileName, String pkgname, String instructionSet, boolean defer) throws FileNotFoundException, IOException; } |