From 04fcd21d6c06cbd8b7759e2e4dc2c876e15cb031 Mon Sep 17 00:00:00 2001 From: Jacqueline Bronger Date: Fri, 25 Mar 2022 13:51:57 +0100 Subject: [PATCH] Fix NPE when PiP actions, but no close action set Bug: 226566586 Fixes: 226566586 Test: manual Change-Id: Ia7343c994a08fa3eba90decee83d65a0e91c43fe --- .../Shell/src/com/android/wm/shell/pip/tv/TvPipMenuView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/TvPipMenuView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/TvPipMenuView.java index ccd054aa7680d..9529d04fe1852 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/TvPipMenuView.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/TvPipMenuView.java @@ -303,7 +303,7 @@ public class TvPipMenuView extends FrameLayout implements View.OnClickListener { */ private boolean actionsMatch(RemoteAction action1, RemoteAction action2) { if (action1 == action2) return true; - if (action1 == null) return false; + if (action1 == null || action2 == null) return false; return Objects.equals(action1.getTitle(), action2.getTitle()) && Objects.equals(action1.getContentDescription(), action2.getContentDescription()) && Objects.equals(action1.getActionIntent(), action2.getActionIntent());