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
Loading
Please register or sign in to comment