History log of /frameworks/base/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
adbadd5577d2b1291d10146b6ffb5577cf236528 29-Mar-2017 Calin Juravle <calin@google.com> Keep track of protected data dirs in DexManager

Apps may store data in any of their protected dirs
(deviceProtectedDataDir or credentialProtectedDataDir).

DexManager used to keep track of only the default data directory, which
could be any of them. The CL adds support for all protected dirs.

Test: runtest -x services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java
check that all of gmscore modules get recorded and compiled with
adb shell cmd package compile --secondary com.android.google.gms

Bug: 32871170
Change-Id: Id98904ce9e9fc8bb060b01c6fbb9ccce8f7f5328
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java
2dfc1b3e125860221bc67835c2d5c99198a12f8a 11-Mar-2017 Calin Juravle <calin@google.com> Add missing return in DexManager

Harmless issue but which can spam the logs.

Test: mostly manual since the check is buried deep inside and cannot be
verified accurately. I added another test to DexManager to stress that
code path and then checked the logs.

Bug: 36117123
Change-Id: I1a878a200f3f726dfaa85f1bed1398acc8dce979
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java
99dd37b3c5262910150ef955d16a33d32da264dd 23-Feb-2017 Calin Juravle <calin@google.com> Update package use info when the app data is updated

- clear usesByOtherApps flag when the package is updated
- delete secondary dex usage data when the app data is destroyed

Test: runtest -x .../PackageDexUsageTests.java
runtest -x .../DexManagerTests.java
Bug: 32871170
Bug: 35381405

Change-Id: I3a249b9e8680e745fa678c7ce61b4ae764078fb9
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java
2b4f8731ca5d20bb686aacdd09bb2351eeebd337 30-Jan-2017 Calin Juravle <calin@google.com> Merge "[PM] Clean up logic for secondary dex oat files"
a0f2f77cdc24fb51f2c6906b6fc481c2c6d673c5 30-Jan-2017 Calin Juravle <calin@google.com> Merge "Compile secondary dex files in DexManager"
1aa5f88e35734383e66ecd65e82e83d788e18ccb 25-Jan-2017 Calin Juravle <calin@google.com> [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

Change-Id: Id2d72dc89995f89cf1ddf79ae4e992afd3f3c127
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java
c22c30ed1c05c5c24185dc4d380d1c5026923d46 17-Jan-2017 Calin Juravle <calin@google.com> Compile secondary dex files in DexManager

Add logic for secondary dex compilation in DexManager. Also, extend the
`cmd package compile` command with '--secondary-dex' option which will
compile all used secondary dex files for the given package.

Test: flash & boot,
cmd package compile --secondary-dex -f -m speed
com.google.android.gms
Bug: 32871170

Change-Id: Ia2b95cb70d26c4ead5cb650047641b0881ca84ae
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java
0d4b8f8b0c963d9a1f5cb6aff11a11195a3df225 24-Jan-2017 Calin Juravle <calin@google.com> Notify DexManager about new package installs

This will update the internal cache so that the secondary dex files of
the new package can be found when loaded.

Test: runtest -x .../DexManagerTests.java

Bug: 32871170
Change-Id: I0cb7158af249feeb01cf578a7544dda978eede9d
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java
b8976d8f22fecaa9ed39276d9d8ded17d35b51a6 16-Dec-2016 Calin Juravle <calin@google.com> Record data about dex files use on disk

Add DexManager to keep track of how dex files are used.

Every time a dex file is loaded, PackageManager will notify DexManager
which will process the load. The DexManager will look up what package
owns the dex file and record its use in package-dex-usage.list (through
PackageDexUsage).

Test: device boots, package-dex-usage.list is created and contains valid data, after device reboot the list is succesfully read from disk.
runtest -x .../PackageDexUsageTests.java
runtest -x .../DexManagerTests.java

Bug: 32871170
Change-Id: If5496c3b95820b537260c326d4eaa04eb50b1d8c
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java