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

Commit b0542b70 authored by Sichen Liu's avatar Sichen Liu
Browse files

[Bugfix]fix NullPointException when pkg is null

When running stability tests on Android13,AndroidPackage will be null sometime, it will casue system server NPE.

Bug:259835905
Test: MTBF

Change-Id: I8a8e7f7a6c2dd48e0d6a704d033e965912fb2fd2
parent 4a76e9c0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5718,7 +5718,8 @@ public class ComputerEngine implements Computer {
            return PackageInfoUtils.generateProcessInfo(sus.processes, 0);
        } else if (settingBase instanceof PackageSetting) {
            final PackageSetting ps = (PackageSetting) settingBase;
            return PackageInfoUtils.generateProcessInfo(ps.getPkg().getProcesses(), 0);
            final AndroidPackage pkg = ps.getPkg();
            return pkg == null ? null : PackageInfoUtils.generateProcessInfo(pkg.getProcesses(), 0);
        }
        return null;
    }