summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hongwei Wang <hwwang@google.com> 2022-09-23 02:42:52 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2022-09-23 02:42:52 +0000
commit82f8dc17f7aeafac73eda003ec2ae87a77c3a376 (patch)
tree58f4d1f0d22eecf5a4a3c69930e4117c226ee89d
parent363318fd8a1d0061866dce86d3c3b0fac3d7bd52 (diff)
parent12415a30eaa7775c83c205280f1f1e3d36e0d12d (diff)
Merge "Propagate PiP param change on RemoteAction update" into tm-qpr-dev
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipUtils.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipUtils.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipUtils.java
index 29434f73e84b..fa0061982c45 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipUtils.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipUtils.java
@@ -83,7 +83,9 @@ public class PipUtils {
public static boolean remoteActionsMatch(RemoteAction action1, RemoteAction action2) {
if (action1 == action2) return true;
if (action1 == null || action2 == null) return false;
- return Objects.equals(action1.getTitle(), action2.getTitle())
+ return action1.isEnabled() == action2.isEnabled()
+ && action1.shouldShowIcon() == action2.shouldShowIcon()
+ && Objects.equals(action1.getTitle(), action2.getTitle())
&& Objects.equals(action1.getContentDescription(), action2.getContentDescription())
&& Objects.equals(action1.getActionIntent(), action2.getActionIntent());
}