Null check during filtering itemInfo by itemType.
Java crash says theres NPE on an itemType on null object reference implying itemInfo is null. bug: 416662647 Test: presubmit Flag: EXEMPT crash fix Change-Id: I3c9724964442435148a720e96f208bd7c2a19ad5
This commit is contained in:
@@ -72,7 +72,8 @@ public class PredictionUpdateTask implements ModelUpdateTask {
|
||||
|
||||
Set<UserHandle> usersForChangedShortcuts =
|
||||
dataModel.itemsIdMap.getPredictedContents(mPredictorState.containerId).stream()
|
||||
.filter(info -> info.itemType == ITEM_TYPE_DEEP_SHORTCUT)
|
||||
.filter(info -> info != null &&
|
||||
info.itemType == ITEM_TYPE_DEEP_SHORTCUT)
|
||||
.map(info -> info.user)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user