[Bugfix]fix NullPointException when PackageInfo's verifiers is null

PackageInfo's verifiers will be null sometime when cancel install app, it will casue system server NPE.

Bug: 254754001
Test: MTBF

Change-Id: I1f06b4ea9610eb268cb3addcb2b44ac95520e140
This commit is contained in:
Wen Zhang
2022-10-21 03:52:06 +00:00
parent e85f271021
commit d02a6d889c

View File

@@ -643,7 +643,7 @@ final class VerificationParams extends HandlerParams {
private List<ComponentName> matchVerifiers(PackageInfoLite pkgInfo,
List<ResolveInfo> receivers, final PackageVerificationState verificationState) {
if (pkgInfo.verifiers.length == 0) {
if (pkgInfo.verifiers == null || pkgInfo.verifiers.length == 0) {
return null;
}