Skip to content
Commit 3806a6ae authored by Winson's avatar Winson
Browse files

Support multiple app versions across system partitions

The APK with the higher version code will be preferred. This change
skips committing any packages found during scan that have a lower
version code than the package persisted in Settings.

If somehow the newer version cannot be scanned, the older version(s)
will be queued to re-scan, taking the next highest version that does
scan successfully.

As a consequence of this, PackageParser2/PackageCacher was updated
to use the first parent folder of the app being scanned as part of its
cache key. This allows multiple versions to be placed in folders/files
with the same file name, but across partitions. It only takes into
account this first path segment.

Also, a bug was fixed where PackagePartitions wasn't null checking
folders when checking contains.

Bug: 140494776

Test: manual test adding system app to multiple parititions, removing
    either/none/all and rebooting device
Test: atest com.android.server.pm.test.SystemAppScanPriorityTest
Test: atest com.android.overlaytest.remounted

Change-Id: Ie09ccf4b64a0be26d19c9034a68ca4877ca49b81
parent 87e1f782
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment