diff options
| author | 2022-09-22 15:45:10 -0700 | |
|---|---|---|
| committer | 2022-09-22 15:49:16 -0700 | |
| commit | 12415a30eaa7775c83c205280f1f1e3d36e0d12d (patch) | |
| tree | 70ea445b79e29eabde3354e15b52ddfc6a641c8c | |
| parent | 2c42836657e92776ff7aea4316a6f4e09b28ce87 (diff) | |
Propagate PiP param change on RemoteAction update
We used to only check title/contentDescription/actionIntent of
RemoteAction for uniqueness and ignore the isEnable/shouldShowIcon.
Bug: 234679022
Test: Verify the isEnabled change updates PiP menu
Change-Id: I769507253594b016802b71368ac4a9036f2ad21f
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipUtils.java | 4 |
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()); } |