Force to show Dialer when hfp is connected
Change-Id: I51ea046739b9320ea1a606a95a352e6a69a15e2f
Fix: 148744241
Test: Manually
diff --git a/src/com/android/car/dialer/ui/TelecomActivityViewModel.java b/src/com/android/car/dialer/ui/TelecomActivityViewModel.java
index e28c4ce..bf6a051 100644
--- a/src/com/android/car/dialer/ui/TelecomActivityViewModel.java
+++ b/src/com/android/car/dialer/ui/TelecomActivityViewModel.java
@@ -203,16 +203,16 @@
isBluetoothEnabled,
hasPairedDevices,
isHfpConnected);
- if (!isBluetoothEnabled) {
- setValue(mContext.getString(R.string.bluetooth_disabled));
- } else if (!hasPairedDevices) {
- setValue(mContext.getString(R.string.bluetooth_unpaired));
- } else if (!isHfpConnected) {
- setValue(mContext.getString(R.string.no_hfp));
- } else {
+ if (isHfpConnected) {
if (!NO_BT_ERROR.equals(getValue())) {
setValue(NO_BT_ERROR);
}
+ } else if (!isBluetoothEnabled) {
+ setValue(mContext.getString(R.string.bluetooth_disabled));
+ } else if (!hasPairedDevices) {
+ setValue(mContext.getString(R.string.bluetooth_unpaired));
+ } else {
+ setValue(mContext.getString(R.string.no_hfp));
}
}