[PM] Clean up logic for secondary dex oat files
Add logic in DexManager to reconcile secondary dex records with the
actual files on disk. If secondary dex files are moved or removed then
DexManager will remove the generated oat files during the call to
reconcileSecondaryOdex() and update its internal state.
Add 'adb shell cmd package reconcile-secondary-dex packageName' which
will force DexManager to sync its data with the actual secondary dex
files.
Test: devices bots
runtest -x .../PackageDexUsageTests.java
runtest -x .../DexManagerTests.java
adb shell cmd package reconcile-secondary-dex
com.android.google.gms (after artificially/temporarily renaming some
dex files)
Bug: 32871170
(cherry picked from commit c22c30ed1c05c5c24185dc4d380d1c5026923d46)
Change-Id: Ied9fcbfe367ed3a8250a9ba8d202518b264c64e8
Merged-In: Id2d72dc89995f89cf1ddf79ae4e992afd3f3c127
8 files changed