Loading packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java +1 −1 Original line number Diff line number Diff line Loading @@ -1198,7 +1198,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> /** * @return {@code true} if {@code cachedBluetoothDevice} is HFP device */ public boolean isHfpDevice() { public boolean isConnectedHfpDevice() { HeadsetProfile headsetProfile = mProfileManager.getHeadsetProfile(); return headsetProfile != null && headsetProfile.getConnectionStatus(mDevice) == BluetoothProfile.STATE_CONNECTED; Loading packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -556,7 +556,7 @@ public class CachedBluetoothDeviceTest { when(mHfpProfile.getConnectionStatus(mDevice)). thenReturn(BluetoothProfile.STATE_CONNECTED); assertThat(mCachedDevice.isHfpDevice()).isTrue(); assertThat(mCachedDevice.isConnectedHfpDevice()).isTrue(); } @Test Loading @@ -565,7 +565,7 @@ public class CachedBluetoothDeviceTest { when(mHfpProfile.getConnectionStatus(mDevice)). thenReturn(BluetoothProfile.STATE_DISCONNECTING); assertThat(mCachedDevice.isHfpDevice()).isFalse(); assertThat(mCachedDevice.isConnectedHfpDevice()).isFalse(); } @Test Loading @@ -590,7 +590,7 @@ public class CachedBluetoothDeviceTest { public void isConnectedHfpDevice_profileIsNull_returnFalse() { when(mProfileManager.getHeadsetProfile()).thenReturn(null); assertThat(mCachedDevice.isHfpDevice()).isFalse(); assertThat(mCachedDevice.isConnectedHfpDevice()).isFalse(); } @Test Loading Loading
packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java +1 −1 Original line number Diff line number Diff line Loading @@ -1198,7 +1198,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> /** * @return {@code true} if {@code cachedBluetoothDevice} is HFP device */ public boolean isHfpDevice() { public boolean isConnectedHfpDevice() { HeadsetProfile headsetProfile = mProfileManager.getHeadsetProfile(); return headsetProfile != null && headsetProfile.getConnectionStatus(mDevice) == BluetoothProfile.STATE_CONNECTED; Loading
packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -556,7 +556,7 @@ public class CachedBluetoothDeviceTest { when(mHfpProfile.getConnectionStatus(mDevice)). thenReturn(BluetoothProfile.STATE_CONNECTED); assertThat(mCachedDevice.isHfpDevice()).isTrue(); assertThat(mCachedDevice.isConnectedHfpDevice()).isTrue(); } @Test Loading @@ -565,7 +565,7 @@ public class CachedBluetoothDeviceTest { when(mHfpProfile.getConnectionStatus(mDevice)). thenReturn(BluetoothProfile.STATE_DISCONNECTING); assertThat(mCachedDevice.isHfpDevice()).isFalse(); assertThat(mCachedDevice.isConnectedHfpDevice()).isFalse(); } @Test Loading @@ -590,7 +590,7 @@ public class CachedBluetoothDeviceTest { public void isConnectedHfpDevice_profileIsNull_returnFalse() { when(mProfileManager.getHeadsetProfile()).thenReturn(null); assertThat(mCachedDevice.isHfpDevice()).isFalse(); assertThat(mCachedDevice.isConnectedHfpDevice()).isFalse(); } @Test Loading