History log of /frameworks/multidex/library/src/android/support/multidex/MultiDex.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9958145a97586375966bc133c900ead0e1550f2a 02-Jan-2017 Yohann Roussel <yroussel@google.com> Check crc and time of secondary dex files

Protect extracted dex files from modifications by checking their crc and
modification time. In case of change, proceed to a new extraction.

Those checks are replacing the check of the zip integrity by
opening it with a ZipFile.

Test: SupportMultidexHostTest (from tradefed)
Bug: 32159214
Change-Id: I09aa01550782f5f550bee6fc91709455e82c1057
/frameworks/multidex/library/src/android/support/multidex/MultiDex.java
fe10f9fd25a4d7bb287d36b3730aa0d605115053 02-Jan-2017 Yohann Roussel <yroussel@google.com> Check extracted dex only once per usage

The check is unnecessary in MultiDex.install because it was already done
by MultiDexExtractor.load. The retry on bad extraction is also included
in MultiDexExtractor.load so it was redundant too.

Test: SupportMultidexHostTest (from tradefed)
Change-Id: I877a99db0e0c562ac47a7c5c87d7f3e1d70884e6
/frameworks/multidex/library/src/android/support/multidex/MultiDex.java
87738871b50552a98a083f8e840089e8889b3e2a 12-Jan-2017 Jon Noack <noackjr@google.com> Use context.getApplicationInfo()

Due to package install races it is possible for a process to be started from an
old apk even though that apk has been replaced. Querying for ApplicationInfo by
package name may return information for the new apk, leading to a runtime with
the old main dex file and new secondary dex files. This leads to various
problems like ClassNotFoundExceptions. Using context.getApplicationInfo()
should result in the process having a consistent view of the world (even if it
is of the old world). The package install races are eventually resolved and old
processes are killed.

Test: Passes Google Play services tests
Change-Id: I95257d851eb678c55a19e731183f7add2b540615
/frameworks/multidex/library/src/android/support/multidex/MultiDex.java
8be7c7a5a6377745054dcd3f1176a7f4cb96b153 12-Jul-2016 Sebastien Hertz <shertz@google.com> Fix typo in javadoc

Bug: 30076851
Change-Id: I6a148d0038baebfcfb987bf3ca498a0acf5d106c
/frameworks/multidex/library/src/android/support/multidex/MultiDex.java
74e66b8013b5b9002f67e53825c189a18597b1e8 17-May-2016 Yohann Roussel <yroussel@google.com> Fix handling of suppressed exception

On API 19 and 20, the library was trying to save "suppressed exceptions"
in the loader.dexElementsSuppressedExceptions but the field is not
there, it's in DexPathList, so the correct path is
loader.pathList.dexElementsSuppressedExceptions.

Bug: 28808797
Change-Id: I549e2120e744345a86df2f588f03823d9dfab659
/frameworks/multidex/library/src/android/support/multidex/MultiDex.java
606af94785cb96d418d87fe5a90bb2e09ccfa97f 12-May-2015 Yohann Roussel <yroussel@google.com> Use Context.getFilesDir as a backup dex location

On some devices it seems impossible to read or write the application
data directory. There, creating code_cache at the proper location is
impossible. In this case fallback to the 'files' directory. This may
lead to not cleaning the useless extracted secondary dex files if one
such devices is ever updated to L.

Bug: https://code.google.com/p/android/issues/detail?id=79388
Change-Id: I4b6725572f10fd511992dc8a5043d2f135abd3a5
/frameworks/multidex/library/src/android/support/multidex/MultiDex.java
590a07e63868f0a1da311ff22b4a9f35eb48a865 21-Jul-2014 Yohann Roussel <yroussel@google.com> Use a simulated code-cache for storing extracted files.

This should allow an automatic cleaning when updating to L without having to
check at each launch.

Bug: 10447095

Change-Id: I3c0ecc1430ced4592f630ec4c6d8a1a2219e8141
/frameworks/multidex/library/src/android/support/multidex/MultiDex.java
d79604bd38c101b54e41745f85ddc2e04d978af2 08-Jul-2014 Yohann Roussel <yroussel@google.com> Clear old secondary dex dir when multidex becomes supported.

There may be a need for clearing those unused extracted files after an OTA
bringing Art L on the device.

Bug: 10447095

Change-Id: I80b9c0afa2bd8dfa0cf04e96fb04ba2527da0fe5
/frameworks/multidex/library/src/android/support/multidex/MultiDex.java
7b86f7e21c70ac06129c05ed137e585a308c6fd1 22-Apr-2014 Yohann Roussel <yroussel@google.com> Deactivate the library if vm version is 2.1 or newer.

It was decided that it would be the revision of multidex native support and
that it is the criterion that should be used to discriminate between VMs
capable of multidex and others.

Bug 14238145.

See bug 10447095 for discussions about the deactivation criterion.

Change-Id: I50922972d1d5b3019a111d5a1b4f2f18af9713ed
/frameworks/multidex/library/src/android/support/multidex/MultiDex.java
5bb7b0d3c370c0fb43ae5ce77d4ec328970db697 24-Apr-2014 Yohann Roussel <yroussel@google.com> Merge "Fix some javadoc in MultiDex."
1389a05bbd3abcfa37ff85851ec540896e0b07db 22-Apr-2014 Justin Morey <jmorey@google.com> Allow MultiDex support library to work in API 20 (KKWT)

The class loader is the same in KK (API 19) & KKWT (API 20), so only
a version bump was needed.

Change-Id: Ib5112e60c9a54ed042e9c71b075ecb5302c1b717
(cherry picked from commit b420940060dbce01a861760d5830416d0e9bb802)
/frameworks/multidex/library/src/android/support/multidex/MultiDex.java
dd3cc22f2fbc8ea4dd5fa88978dc8d1ae5034bd9 22-Apr-2014 Yohann Roussel <yroussel@google.com> Fix some javadoc in MultiDex.

Change-Id: I0600b6f75005881c549150ea2e0b18800747bf73
/frameworks/multidex/library/src/android/support/multidex/MultiDex.java
602c6ca8cae4718ba8ff9f65e53305d002479359 28-Mar-2014 Yohann Roussel <yroussel@google.com> Change update detection to reduce load time.

Reduces load time if extraction was already made. It appeared that
new ZipFile was really slow because it's preparing much things as
soon as it's instanciated.

The new criteria consist of the last modified time of the apk plus
the crc of the apk's central directory, last modified time should
be enough for nearly all modifications and the crc is here to try
to handle an OTA mixing with dates.

The transition from old criteria to new should be good: since there
will be no stored values they would be detected as a new installation.

Change-Id: Id390b77b03d794b8b7feb91eb0daae1126c6d691
/frameworks/multidex/library/src/android/support/multidex/MultiDex.java
7e267a38525afac2a571da186e770a2b86a01846 16-Jan-2014 Maurice Chu <mochu@google.com> Check whether to extract secondary dex files based on apk size and CRC

This addresses an edge case where the secondary dex is not reloaded
when it should because of an OTA due to the modification time of the
PrebuiltGmsCore.apk in the system image is never different even though
PrebuiltGmsCore.apk may have changed in the OTA. This performs two
checks, the first is that the overall size of the apk is the same.
The second is to check that the number of dex files are the same, and
the CRC values of the dex file zip entries are the same.

Bug: 12550057
Change-Id: I526f6b88cfc7957840b0c35aaad0eab0cd776f7e
/frameworks/multidex/library/src/android/support/multidex/MultiDex.java
cc63eda4e6defe6b0dd5dd3c8fa608cf6ff26011 03-Dec-2013 Maurice Chu <mochu@google.com> Add additional check for valid Zip file before multidex install

Bug: 11895788
Change-Id: Id4f6e5b09be809eeb29367bebe78c03e49864cbf
/frameworks/multidex/library/src/android/support/multidex/MultiDex.java
88117c37e2c3f8601f295b74a3e804877afb78ee 28-Nov-2013 Yohann Roussel <yroussel@google.com> Add log to identify the source of the zip corruption.

This CL is to be reverted when debug is done.

Change-Id: I47f2464a4b32affe2d63f874a1df3f8f24e569d5
/frameworks/multidex/library/src/android/support/multidex/MultiDex.java
52eafa01b1e61e410cb4c5609eacee93c2a3e853 21-Nov-2013 Yohann Roussel <yroussel@google.com> Minor cleaning in the code and comment.

- Remove 2 unused method arguments.
- Fix a bad copy paste of a comment.
- Remove a useless if.

Change-Id: I1b88b91e38cbe3c024207113f1c4a7bdc052e514
/frameworks/multidex/library/src/android/support/multidex/MultiDex.java
66f379f774e06e650375750d18b1695ddb853371 15-Nov-2013 Maurice Chu <mochu@google.com> Update mZips field in classloader for GB

This enables mockito tests to also run.

Bug: 11709435
Change-Id: I9ebc5f5441a396c12eb8cde554d69a003fa6e7ad
/frameworks/multidex/library/src/android/support/multidex/MultiDex.java
667f9a8a8155c41970a83be1414b57b5e37de336 16-Oct-2013 Maurice Chu <mochu@google.com> Initial move of code from frameworks/support/multidex to here

Also,
- Removed extraneous Eclipse-specific configuration files that are
unnecessary in the Android build tree
- Includes the patch to support API level 19 from
https://googleplex-android-review.git.corp.google.com/#/c/348129
- Checks for null and returns without patching the classloader when
getting the package manager or package name from the passed in Context
to MultiDex.install(...) since the Context object is probably a mock
context for testing.
- Moved the test runners to package com.android.test.runner, which seems
to be the standard place for all test runners.

Bug: 10674263
Change-Id: Idc894b360bd17db4acb50dd7daa2839ea8ea37e0
/frameworks/multidex/library/src/android/support/multidex/MultiDex.java