Assign missing stateful fields in PackageInfoUtils

These are fields that were moved from AndroidPackage into
PackageSetting and thus have to be assigned from that PackageSetting
whenever an ApplicationInfo object is generated.

Affected fields are seInfo, primaryCpuAbi, and secondaryCpuAbi.

Bug: 152339899

Test: manual adb shell am compat disable 143539591 com.example.app
    for test app and verify enable/disable

Change-Id: I0b135554de4420066dc74d0571416547f0557eef
This commit is contained in:
Winson
2020-03-24 14:19:21 -07:00
parent e39a7b6a80
commit ffba329f64

View File

@@ -230,6 +230,10 @@ public class PackageInfoUtils {
info.sharedLibraryInfos = usesLibraryInfos.isEmpty() ? null : usesLibraryInfos;
}
info.seInfo = AndroidPackageUtils.getSeInfo(pkg, pkgSetting);
info.primaryCpuAbi = AndroidPackageUtils.getPrimaryCpuAbi(pkg, pkgSetting);
info.secondaryCpuAbi = AndroidPackageUtils.getSecondaryCpuAbi(pkg, pkgSetting);
info.flags |= appInfoFlags(pkg, pkgSetting);
info.privateFlags |= appInfoPrivateFlags(pkg, pkgSetting);
return info;