Another setting.pkg null check

We have another case of setting.pkg being accessed without a null check.
This change fixes that error.

Fixes: 159372907
Test: atest AppEnumerationTests AppsFilterTest
Change-Id: I1b60471a8f019cba8f4155107d56838a6fc73c8c
This commit is contained in:
Patrick Baumann
2020-06-18 16:28:34 -07:00
parent 8d139f6a98
commit 6732830b29

View File

@@ -817,7 +817,7 @@ public class AppsFilter {
}
}
if (!setting.pkg.getProtectedBroadcasts().isEmpty()) {
if (setting.pkg != null && !setting.pkg.getProtectedBroadcasts().isEmpty()) {
final String removingPackageName = setting.pkg.getPackageName();
final Set<String> protectedBroadcasts = mProtectedBroadcasts;
mProtectedBroadcasts = collectProtectedBroadcasts(settings, removingPackageName);