Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ff9d439 authored by Kelvin Zhang's avatar Kelvin Zhang
Browse files

Fix a potential NPE when allocating space for compressed apex

Bug: 189369298
Test: th
Change-Id: I9357be8021e77fc8c3839f15a4a53c2a3c63cb13
parent fc2745ae
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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;