Merge "Fix a potential NPE when allocating space for compressed apex" am: 2a0c9de597

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1763189

Change-Id: I7a17c2de6d487aafb0b053a64c69616ecc811932
This commit is contained in:
Treehugger Robot
2021-07-12 23:45:30 +00:00
committed by Automerger Merge Worker

View File

@@ -968,6 +968,12 @@ public class RecoverySystemService extends IRecoverySystem.Stub implements Reboo
}
try {
CompressedApexInfoList apexInfoList = getCompressedApexInfoList(packageFile);
if (apexInfoList == null) {
Log.i(TAG, "apex_info.pb not present in OTA package. "
+ "Assuming device doesn't support compressed"
+ "APEX, continueing without allocating space.");
return true;
}
ApexManager apexManager = ApexManager.getInstance();
apexManager.reserveSpaceForCompressedApex(apexInfoList);
return true;