Merge "fix system app's abi error after uninstall updated version."
This commit is contained in:
@@ -10743,6 +10743,7 @@ public class PackageManagerService extends IPackageManager.Stub
|
|||||||
// them in the case where we're not upgrading or booting for the first time.
|
// them in the case where we're not upgrading or booting for the first time.
|
||||||
String primaryCpuAbiFromSettings = null;
|
String primaryCpuAbiFromSettings = null;
|
||||||
String secondaryCpuAbiFromSettings = null;
|
String secondaryCpuAbiFromSettings = null;
|
||||||
|
boolean needToDeriveAbi = (scanFlags & SCAN_FIRST_BOOT_OR_UPGRADE) != 0;
|
||||||
|
|
||||||
// writer
|
// writer
|
||||||
synchronized (mPackages) {
|
synchronized (mPackages) {
|
||||||
@@ -10820,11 +10821,14 @@ public class PackageManagerService extends IPackageManager.Stub
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((scanFlags & SCAN_FIRST_BOOT_OR_UPGRADE) == 0) {
|
if (!needToDeriveAbi) {
|
||||||
PackageSetting foundPs = mSettings.getPackageLPr(pkg.packageName);
|
PackageSetting foundPs = mSettings.getPackageLPr(pkg.packageName);
|
||||||
if (foundPs != null) {
|
if (foundPs != null) {
|
||||||
primaryCpuAbiFromSettings = foundPs.primaryCpuAbiString;
|
primaryCpuAbiFromSettings = foundPs.primaryCpuAbiString;
|
||||||
secondaryCpuAbiFromSettings = foundPs.secondaryCpuAbiString;
|
secondaryCpuAbiFromSettings = foundPs.secondaryCpuAbiString;
|
||||||
|
} else {
|
||||||
|
// when re-adding a system package failed after uninstalling updates.
|
||||||
|
needToDeriveAbi = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -11031,7 +11035,7 @@ public class PackageManagerService extends IPackageManager.Stub
|
|||||||
final String cpuAbiOverride = deriveAbiOverride(pkg.cpuAbiOverride, pkgSetting);
|
final String cpuAbiOverride = deriveAbiOverride(pkg.cpuAbiOverride, pkgSetting);
|
||||||
|
|
||||||
if ((scanFlags & SCAN_NEW_INSTALL) == 0) {
|
if ((scanFlags & SCAN_NEW_INSTALL) == 0) {
|
||||||
if ((scanFlags & SCAN_FIRST_BOOT_OR_UPGRADE) != 0) {
|
if (needToDeriveAbi) {
|
||||||
Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "derivePackageAbi");
|
Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "derivePackageAbi");
|
||||||
final boolean extractNativeLibs = !pkg.isLibrary();
|
final boolean extractNativeLibs = !pkg.isLibrary();
|
||||||
derivePackageAbi(pkg, scanFile, cpuAbiOverride, extractNativeLibs,
|
derivePackageAbi(pkg, scanFile, cpuAbiOverride, extractNativeLibs,
|
||||||
|
|||||||
Reference in New Issue
Block a user