diff options
| author | Dan Bornstein <danfuzz@android.com> | 2010-12-15 16:58:48 -0800 |
|---|---|---|
| committer | Dan Bornstein <danfuzz@android.com> | 2010-12-16 11:20:01 -0800 |
| commit | eab7355f9280dabcfe62fa2f21ca4e5511a59a24 (patch) | |
| tree | 997d6b845c36c39a1c6029cca1b163ff236275a9 /vm/JarFile.c | |
| parent | 734ff82ff55be8083fe78f96ac950e2252b1ea28 (diff) | |
| download | android_dalvik-eab7355f9280dabcfe62fa2f21ca4e5511a59a24.tar.gz android_dalvik-eab7355f9280dabcfe62fa2f21ca4e5511a59a24.tar.bz2 android_dalvik-eab7355f9280dabcfe62fa2f21ca4e5511a59a24.zip | |
Hook up the preexisting RawDexFile opener.
This one is similar in functionality to what's in JarFile.
I also made a couple minor (whitespace/comment/logging) changes to
JarFile where I spotted the opportunities.
This change makes it so that, if you happen to put a plain dex file on
your classpath (e.g., "dalvikvm -classpath /data/local/blort.dex
Blort"), it will actually be able to be used. This was documented as
working, but it was a lie...until now.
Change-Id: I2c93a8fdb40afa2d920904ab1235b7909e5837f8
Diffstat (limited to 'vm/JarFile.c')
| -rw-r--r-- | vm/JarFile.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/vm/JarFile.c b/vm/JarFile.c index 39eb8d105..de7523f40 100644 --- a/vm/JarFile.c +++ b/vm/JarFile.c @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + /* * Access the contents of a Jar file. * @@ -20,6 +21,7 @@ * just wants a zip archive with "classes.dex" inside. In Android the * most common example is ".apk". */ + #include "Dalvik.h" #include "libdex/OptInvocation.h" @@ -186,6 +188,11 @@ bail: int dvmJarFileOpen(const char* fileName, const char* odexOutputName, JarFile** ppJarFile, bool isBootstrap) { + /* + * TODO: This function has been duplicated and modified to become + * dvmRawDexFileOpen() in RawDexFile.c. This should be refactored. + */ + ZipArchive archive; DvmDex* pDvmDex = NULL; char* cachedName = NULL; @@ -254,7 +261,7 @@ tryArchive: } else { cachedName = strdup(odexOutputName); } - LOGV("dvmDexCacheStatus: Checking cache for %s (%s)\n", + LOGV("dvmJarFileOpen: Checking cache for %s (%s)\n", fileName, cachedName); fd = dvmOpenCachedDexFile(fileName, cachedName, dexGetZipEntryModTime(&archive, entry), |
