Merge "Fix a potential NPE when allocating space for compressed apex" into sc-dev am: 607cadc918

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

Change-Id: I191fead109858ebf38cff2cb11aa698ffdf92e4a
This commit is contained in:
TreeHugger Robot
2021-07-21 07:47:31 +00:00
committed by Automerger Merge Worker

View File

@@ -970,6 +970,12 @@ public class RecoverySystemService extends IRecoverySystem.Stub implements Reboo
final long token = Binder.clearCallingIdentity();
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;