summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorKevin Han <kevhan@google.com>2021-10-25 20:23:50 -0700
committerKevin Han <kevhan@google.com>2021-11-17 23:00:21 +0000
commit30a4adc0c08cd8b976d021564aafec8ee3e51c30 (patch)
tree3611e1e8e1f9b6bf8a7601ffcc4c01996fb924c9 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent94568f1e74e08e8397338d232eac80a866971301 (diff)
Exempt hibernating apps from dex optimization
We previously only checked whether an app could be optimized in PackageManagerService#getOptimizablePackages. This missed edge cases where the app would still generate vdex/odex such as when the app is updated. We fix this by considering any hibernating app as not optimizable in all cases. To support unit testing, we also change canOptimizePackage to a non-static method and enumerate PackageDexOptimizer's dependencies clearly with an injector. Bug: 203693378 Test: Reproduce steps in bug, confirm app does not have vdex/odex Test: atest PackageManagerServiceHibernationTests Test: forrest run of asit/dexoptota/self_full Merged-In: I6b88713529a570f285422e6716ad797e2148ce2c Change-Id: I6b88713529a570f285422e6716ad797e2148ce2c (cherry picked from commit 7cd8c2535045877ec2d5a31b486acb5dd09d39ea)
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions