From ef6d379198cf8bf20fd2d523645217849473607a Mon Sep 17 00:00:00 2001 From: yueg Date: Wed, 18 Apr 2018 12:46:18 -0700 Subject: Multi-HFP device support for audio selector. Test: BluetoothDeviceProviderTest PiperOrigin-RevId: 193401073 Change-Id: I3483392d1d7a473a753477074b5c377af257186e --- .../basecomponent/BaseDialerRootComponent.java | 4 +- java/com/android/incallui/AndroidManifest.xml | 3 + java/com/android/incallui/InCallServiceImpl.java | 3 + .../audiomode/BluetoothDeviceProvider.java | 203 +++++++++++++++++++++ .../BluetoothDeviceProviderComponent.java | 39 ++++ .../AudioRouteSelectorDialogFragment.java | 50 ++++- .../audioroute/res/layout/audioroute_item.xml | 21 +++ .../audioroute/res/layout/audioroute_selector.xml | 23 ++- 8 files changed, 333 insertions(+), 13 deletions(-) create mode 100644 java/com/android/incallui/audiomode/BluetoothDeviceProvider.java create mode 100644 java/com/android/incallui/audiomode/BluetoothDeviceProviderComponent.java create mode 100644 java/com/android/incallui/audioroute/res/layout/audioroute_item.xml diff --git a/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java b/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java index 2d3ef19f8..11e952cbc 100644 --- a/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java +++ b/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java @@ -39,6 +39,7 @@ import com.android.dialer.spam.SpamComponent; import com.android.dialer.speeddial.loader.UiItemLoaderComponent; import com.android.dialer.storage.StorageComponent; import com.android.dialer.strictmode.StrictModeComponent; +import com.android.incallui.audiomode.BluetoothDeviceProviderComponent; import com.android.incallui.calllocation.CallLocationComponent; import com.android.incallui.maps.MapsComponent; import com.android.incallui.speakeasy.SpeakEasyComponent; @@ -49,7 +50,8 @@ import com.android.voicemail.VoicemailComponent; * from this component. */ public interface BaseDialerRootComponent - extends BubbleComponent.HasComponent, + extends BluetoothDeviceProviderComponent.HasComponent, + BubbleComponent.HasComponent, CallLocationComponent.HasComponent, CallLogComponent.HasComponent, CallLogConfigComponent.HasComponent, diff --git a/java/com/android/incallui/AndroidManifest.xml b/java/com/android/incallui/AndroidManifest.xml index 9a762feea..832a5e874 100644 --- a/java/com/android/incallui/AndroidManifest.xml +++ b/java/com/android/incallui/AndroidManifest.xml @@ -40,6 +40,9 @@ + + + + \ No newline at end of file diff --git a/java/com/android/incallui/audioroute/res/layout/audioroute_selector.xml b/java/com/android/incallui/audioroute/res/layout/audioroute_selector.xml index ef2220e8f..145101dd1 100644 --- a/java/com/android/incallui/audioroute/res/layout/audioroute_selector.xml +++ b/java/com/android/incallui/audioroute/res/layout/audioroute_selector.xml @@ -1,17 +1,24 @@ - + -