Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b72cf990 authored by Stevie Kideckel's avatar Stevie Kideckel
Browse files

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
parent 50ae7cbf
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);
                    if (response != null) {
                        response.handleViewInteraction(view, handler);
                    }
                };
                av.setOnItemClickListener(listener);
                av.setTag(pendingIntentTemplate);