Loading packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java +1 −1 Original line number Diff line number Diff line Loading @@ -1189,7 +1189,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> /** * @return {@code true} if {@code cachedBluetoothDevice} is a2dp device */ public boolean isA2dpDevice() { public boolean isConnectedA2dpDevice() { A2dpProfile a2dpProfile = mProfileManager.getA2dpProfile(); return a2dpProfile != null && a2dpProfile.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 @@ -538,7 +538,7 @@ public class CachedBluetoothDeviceTest { when(mA2dpProfile.getConnectionStatus(mDevice)). thenReturn(BluetoothProfile.STATE_CONNECTED); assertThat(mCachedDevice.isA2dpDevice()).isTrue(); assertThat(mCachedDevice.isConnectedA2dpDevice()).isTrue(); } @Test Loading @@ -547,7 +547,7 @@ public class CachedBluetoothDeviceTest { when(mA2dpProfile.getConnectionStatus(mDevice)). thenReturn(BluetoothProfile.STATE_DISCONNECTING); assertThat(mCachedDevice.isA2dpDevice()).isFalse(); assertThat(mCachedDevice.isConnectedA2dpDevice()).isFalse(); } @Test Loading Loading @@ -597,7 +597,7 @@ public class CachedBluetoothDeviceTest { public void isConnectedA2dpDevice_profileIsNull_returnFalse() { when(mProfileManager.getA2dpProfile()).thenReturn(null); assertThat(mCachedDevice.isA2dpDevice()).isFalse(); assertThat(mCachedDevice.isConnectedA2dpDevice()).isFalse(); } @Test Loading Loading
packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java +1 −1 Original line number Diff line number Diff line Loading @@ -1189,7 +1189,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> /** * @return {@code true} if {@code cachedBluetoothDevice} is a2dp device */ public boolean isA2dpDevice() { public boolean isConnectedA2dpDevice() { A2dpProfile a2dpProfile = mProfileManager.getA2dpProfile(); return a2dpProfile != null && a2dpProfile.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 @@ -538,7 +538,7 @@ public class CachedBluetoothDeviceTest { when(mA2dpProfile.getConnectionStatus(mDevice)). thenReturn(BluetoothProfile.STATE_CONNECTED); assertThat(mCachedDevice.isA2dpDevice()).isTrue(); assertThat(mCachedDevice.isConnectedA2dpDevice()).isTrue(); } @Test Loading @@ -547,7 +547,7 @@ public class CachedBluetoothDeviceTest { when(mA2dpProfile.getConnectionStatus(mDevice)). thenReturn(BluetoothProfile.STATE_DISCONNECTING); assertThat(mCachedDevice.isA2dpDevice()).isFalse(); assertThat(mCachedDevice.isConnectedA2dpDevice()).isFalse(); } @Test Loading Loading @@ -597,7 +597,7 @@ public class CachedBluetoothDeviceTest { public void isConnectedA2dpDevice_profileIsNull_returnFalse() { when(mProfileManager.getA2dpProfile()).thenReturn(null); assertThat(mCachedDevice.isA2dpDevice()).isFalse(); assertThat(mCachedDevice.isConnectedA2dpDevice()).isFalse(); } @Test Loading