Fix NPE when PiP actions, but no close action set

Bug: 226566586
Fixes: 226566586
Test: manual

Change-Id: Ia7343c994a08fa3eba90decee83d65a0e91c43fe
This commit is contained in:
Jacqueline Bronger
2022-03-25 13:51:57 +01:00
parent b258b21892
commit 04fcd21d6c

View File

@@ -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());