Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 633d8e12 authored by Kevin Han's avatar Kevin Han
Browse files

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
Change-Id: I16e76619e15351659a4f7121fc17cc46937f3591
parent 11d1f603
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment