Merge "[pm] restore ABI info on system stub install after update removal" into rvc-dev am: b387dc6ffb

Change-Id: Ib1e0554eaf839a7e46f82f14a09157ee9bc4bb87
This commit is contained in:
Songchun Fan
2020-04-23 01:01:35 +00:00
committed by Automerger Merge Worker

View File

@@ -11203,8 +11203,16 @@ public class PackageManagerService extends IPackageManager.Stub
boolean needToDeriveAbi = (scanFlags & SCAN_FIRST_BOOT_OR_UPGRADE) != 0;
if (!needToDeriveAbi) {
if (pkgSetting != null) {
primaryCpuAbiFromSettings = pkgSetting.primaryCpuAbiString;
secondaryCpuAbiFromSettings = pkgSetting.secondaryCpuAbiString;
// TODO(b/154610922): if it is not first boot or upgrade, we should directly use
// API info from existing package setting. However, stub packages currently do not
// preserve ABI info, thus the special condition check here. Remove the special
// check after we fix the stub generation.
if (pkgSetting.pkg != null && pkgSetting.pkg.isStub()) {
needToDeriveAbi = true;
} else {
primaryCpuAbiFromSettings = pkgSetting.primaryCpuAbiString;
secondaryCpuAbiFromSettings = pkgSetting.secondaryCpuAbiString;
}
} else {
// Re-scanning a system package after uninstalling updates; need to derive ABI
needToDeriveAbi = true;