Set CATEGORY_UNDEFINED as default category

It's possible that there is no tag <application> in the mainfest.
Therefore, category wouldn't be set to CATEGORY_UNDEFINED properly.
Assign the proper default value for this case.

Fix: 207456733
Test: atest AndroidPackageInfoFlagBehaviorTest
Test: atest AndroidPackageParsingEquivalenceTest
Change-Id: I5fb82fea5ccdf216b5825c0c3a254d8be3666c04
This commit is contained in:
Jackal Guo
2021-11-24 15:01:56 +08:00
parent 083bd48e19
commit 4aa280fe1f

View File

@@ -334,7 +334,7 @@ public class ParsingPackageImpl implements ParsingPackage, ParsingPackageHidden,
@DataClass.ParcelWith(ForInternedString.class)
private String backupAgentName;
private int banner;
private int category;
private int category = ApplicationInfo.CATEGORY_UNDEFINED;
@Nullable
@DataClass.ParcelWith(ForInternedString.class)
private String classLoaderName;