Merge "Ensure that the RemoteResponse is not empty before acting on it" into sc-dev

This commit is contained in:
Stevie Kideckel
2021-06-11 16:39:15 +00:00
committed by Android (Google) Code Review

View File

@@ -814,7 +814,9 @@ public class RemoteViews implements Parcelable, Filter {
// The PendingIntent template is stored in the view's tag.
OnItemClickListener listener = (parent, view, position, id) -> {
RemoteResponse response = findRemoteResponseTag(view);
response.handleViewInteraction(view, handler);
if (response != null) {
response.handleViewInteraction(view, handler);
}
};
av.setOnItemClickListener(listener);
av.setTag(pendingIntentTemplate);