diff options
author | erfanian <erfanian@google.com> | 2017-08-03 18:00:40 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-08-04 10:48:05 -0700 |
commit | 911a90842eb6af7b4a8a6cc0d07329655eaef8c4 (patch) | |
tree | 7ef876ebfcc76190ddef4b2b0c7e2d7a27a60d11 /java/com/android/incallui/incall/impl/ButtonChooserFactory.java | |
parent | 848f1c463a162e4423433f988859336ae61de6d7 (diff) |
Fix buttom mapping issue for wifi handoff.
Introduce the concept of a "mutually exclusive button".
Buttons that conflict with a "mutually exclusive button" that
is eligible to be placed, will never be placed.
Bug: 37275934
Test: unit tests.
PiperOrigin-RevId: 164210228
Change-Id: I64af6065c89d143a331ea226f9a6cb1004b5a155
Diffstat (limited to 'java/com/android/incallui/incall/impl/ButtonChooserFactory.java')
-rw-r--r-- | java/com/android/incallui/incall/impl/ButtonChooserFactory.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/java/com/android/incallui/incall/impl/ButtonChooserFactory.java b/java/com/android/incallui/incall/impl/ButtonChooserFactory.java index 99364e22c..0f4a95d38 100644 --- a/java/com/android/incallui/incall/impl/ButtonChooserFactory.java +++ b/java/com/android/incallui/incall/impl/ButtonChooserFactory.java @@ -74,6 +74,12 @@ class ButtonChooserFactory { mapping.put( InCallButtonIds.BUTTON_UPGRADE_TO_VIDEO, MappingInfo.builder(4).setSlotOrder(10).build()); mapping.put(InCallButtonIds.BUTTON_SWAP, MappingInfo.builder(5).setSlotOrder(0).build()); + mapping.put( + InCallButtonIds.BUTTON_SWITCH_TO_SECONDARY, + MappingInfo.builder(5) + .setSlotOrder(Integer.MAX_VALUE) + .setMutuallyExclusiveButton(InCallButtonIds.BUTTON_SWAP) + .build()); return new ButtonChooser(new MappedButtonConfig(mapping)); } |