Ensure that the RemoteResponse is not empty before acting on it
Potential NPE was added in ag/14881530 Fix: 190353630 Test: locally with sample app with and without items Change-Id: I946b6b6719600cb638db1b15d74a8c3af6587f32
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user