Update the method name from isHfpDevice() to isConnectedHfpDevice()
Bug: 110072747 Test: make -j50 RunSettingsRoboTests Change-Id: I4f42a4d55a107c870c76761434f4e5999ac76904
This commit is contained in:
@@ -84,7 +84,7 @@ public class AvailableMediaBluetoothDeviceUpdater extends BluetoothDeviceUpdater
|
|||||||
isFilterMatched = cachedDevice.isA2dpDevice();
|
isFilterMatched = cachedDevice.isA2dpDevice();
|
||||||
break;
|
break;
|
||||||
case BluetoothProfile.HEADSET:
|
case BluetoothProfile.HEADSET:
|
||||||
isFilterMatched = cachedDevice.isHfpDevice();
|
isFilterMatched = cachedDevice.isConnectedHfpDevice();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (DBG) {
|
if (DBG) {
|
||||||
|
@@ -85,7 +85,7 @@ public class ConnectedBluetoothDeviceUpdater extends BluetoothDeviceUpdater {
|
|||||||
isFilterMatched = !cachedDevice.isA2dpDevice();
|
isFilterMatched = !cachedDevice.isA2dpDevice();
|
||||||
break;
|
break;
|
||||||
case BluetoothProfile.HEADSET:
|
case BluetoothProfile.HEADSET:
|
||||||
isFilterMatched = !cachedDevice.isHfpDevice();
|
isFilterMatched = !cachedDevice.isConnectedHfpDevice();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (DBG) {
|
if (DBG) {
|
||||||
|
@@ -35,8 +35,6 @@ import com.android.settings.testutils.shadow.ShadowAudioManager;
|
|||||||
import com.android.settings.testutils.shadow.ShadowBluetoothAdapter;
|
import com.android.settings.testutils.shadow.ShadowBluetoothAdapter;
|
||||||
import com.android.settings.testutils.shadow.ShadowCachedBluetoothDeviceManager;
|
import com.android.settings.testutils.shadow.ShadowCachedBluetoothDeviceManager;
|
||||||
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
|
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
|
||||||
import com.android.settingslib.bluetooth.HeadsetProfile;
|
|
||||||
import com.android.settingslib.bluetooth.LocalBluetoothProfileManager;
|
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
@@ -101,7 +99,7 @@ public class AvailableMediaBluetoothDeviceUpdaterTest {
|
|||||||
mShadowAudioManager.setMode(AudioManager.MODE_IN_CALL);
|
mShadowAudioManager.setMode(AudioManager.MODE_IN_CALL);
|
||||||
when(mBluetoothDeviceUpdater.
|
when(mBluetoothDeviceUpdater.
|
||||||
isDeviceConnected(any(CachedBluetoothDevice.class))).thenReturn(true);
|
isDeviceConnected(any(CachedBluetoothDevice.class))).thenReturn(true);
|
||||||
when(mCachedBluetoothDevice.isHfpDevice()).thenReturn(true);
|
when(mCachedBluetoothDevice.isConnectedHfpDevice()).thenReturn(true);
|
||||||
mCachedDevices.add(mCachedBluetoothDevice);
|
mCachedDevices.add(mCachedBluetoothDevice);
|
||||||
|
|
||||||
mBluetoothDeviceUpdater.onAudioModeChanged();
|
mBluetoothDeviceUpdater.onAudioModeChanged();
|
||||||
@@ -114,7 +112,7 @@ public class AvailableMediaBluetoothDeviceUpdaterTest {
|
|||||||
mShadowAudioManager.setMode(AudioManager.MODE_NORMAL);
|
mShadowAudioManager.setMode(AudioManager.MODE_NORMAL);
|
||||||
when(mBluetoothDeviceUpdater.
|
when(mBluetoothDeviceUpdater.
|
||||||
isDeviceConnected(any(CachedBluetoothDevice.class))).thenReturn(true);
|
isDeviceConnected(any(CachedBluetoothDevice.class))).thenReturn(true);
|
||||||
when(mCachedBluetoothDevice.isHfpDevice()).thenReturn(true);
|
when(mCachedBluetoothDevice.isConnectedHfpDevice()).thenReturn(true);
|
||||||
mCachedDevices.add(mCachedBluetoothDevice);
|
mCachedDevices.add(mCachedBluetoothDevice);
|
||||||
|
|
||||||
mBluetoothDeviceUpdater.onAudioModeChanged();
|
mBluetoothDeviceUpdater.onAudioModeChanged();
|
||||||
@@ -179,7 +177,7 @@ public class AvailableMediaBluetoothDeviceUpdaterTest {
|
|||||||
mShadowAudioManager.setMode(AudioManager.MODE_NORMAL);
|
mShadowAudioManager.setMode(AudioManager.MODE_NORMAL);
|
||||||
when(mBluetoothDeviceUpdater.
|
when(mBluetoothDeviceUpdater.
|
||||||
isDeviceConnected(any(CachedBluetoothDevice.class))).thenReturn(true);
|
isDeviceConnected(any(CachedBluetoothDevice.class))).thenReturn(true);
|
||||||
when(mCachedBluetoothDevice.isHfpDevice()).thenReturn(true);
|
when(mCachedBluetoothDevice.isConnectedHfpDevice()).thenReturn(true);
|
||||||
|
|
||||||
mBluetoothDeviceUpdater.onProfileConnectionStateChanged(mCachedBluetoothDevice,
|
mBluetoothDeviceUpdater.onProfileConnectionStateChanged(mCachedBluetoothDevice,
|
||||||
BluetoothProfile.STATE_CONNECTED, BluetoothProfile.A2DP);
|
BluetoothProfile.STATE_CONNECTED, BluetoothProfile.A2DP);
|
||||||
@@ -192,7 +190,7 @@ public class AvailableMediaBluetoothDeviceUpdaterTest {
|
|||||||
mShadowAudioManager.setMode(AudioManager.MODE_IN_CALL);
|
mShadowAudioManager.setMode(AudioManager.MODE_IN_CALL);
|
||||||
when(mBluetoothDeviceUpdater.
|
when(mBluetoothDeviceUpdater.
|
||||||
isDeviceConnected(any(CachedBluetoothDevice.class))).thenReturn(true);
|
isDeviceConnected(any(CachedBluetoothDevice.class))).thenReturn(true);
|
||||||
when(mCachedBluetoothDevice.isHfpDevice()).thenReturn(true);
|
when(mCachedBluetoothDevice.isConnectedHfpDevice()).thenReturn(true);
|
||||||
|
|
||||||
mBluetoothDeviceUpdater.onProfileConnectionStateChanged(mCachedBluetoothDevice,
|
mBluetoothDeviceUpdater.onProfileConnectionStateChanged(mCachedBluetoothDevice,
|
||||||
BluetoothProfile.STATE_CONNECTED, BluetoothProfile.A2DP);
|
BluetoothProfile.STATE_CONNECTED, BluetoothProfile.A2DP);
|
||||||
|
@@ -97,7 +97,7 @@ public class ConnectedBluetoothDeviceUpdaterTest {
|
|||||||
mShadowAudioManager.setMode(AudioManager.MODE_NORMAL);
|
mShadowAudioManager.setMode(AudioManager.MODE_NORMAL);
|
||||||
when(mBluetoothDeviceUpdater.
|
when(mBluetoothDeviceUpdater.
|
||||||
isDeviceConnected(any(CachedBluetoothDevice.class))).thenReturn(true);
|
isDeviceConnected(any(CachedBluetoothDevice.class))).thenReturn(true);
|
||||||
when(mCachedBluetoothDevice.isHfpDevice()).thenReturn(true);
|
when(mCachedBluetoothDevice.isConnectedHfpDevice()).thenReturn(true);
|
||||||
mCachedDevices.add(mCachedBluetoothDevice);
|
mCachedDevices.add(mCachedBluetoothDevice);
|
||||||
|
|
||||||
mBluetoothDeviceUpdater.onAudioModeChanged();
|
mBluetoothDeviceUpdater.onAudioModeChanged();
|
||||||
@@ -110,7 +110,7 @@ public class ConnectedBluetoothDeviceUpdaterTest {
|
|||||||
mShadowAudioManager.setMode(AudioManager.MODE_IN_CALL);
|
mShadowAudioManager.setMode(AudioManager.MODE_IN_CALL);
|
||||||
when(mBluetoothDeviceUpdater.
|
when(mBluetoothDeviceUpdater.
|
||||||
isDeviceConnected(any(CachedBluetoothDevice.class))).thenReturn(true);
|
isDeviceConnected(any(CachedBluetoothDevice.class))).thenReturn(true);
|
||||||
when(mCachedBluetoothDevice.isHfpDevice()).thenReturn(true);
|
when(mCachedBluetoothDevice.isConnectedHfpDevice()).thenReturn(true);
|
||||||
mCachedDevices.add(mCachedBluetoothDevice);
|
mCachedDevices.add(mCachedBluetoothDevice);
|
||||||
|
|
||||||
mBluetoothDeviceUpdater.onAudioModeChanged();
|
mBluetoothDeviceUpdater.onAudioModeChanged();
|
||||||
@@ -175,7 +175,7 @@ public class ConnectedBluetoothDeviceUpdaterTest {
|
|||||||
mShadowAudioManager.setMode(AudioManager.MODE_IN_CALL);
|
mShadowAudioManager.setMode(AudioManager.MODE_IN_CALL);
|
||||||
when(mBluetoothDeviceUpdater.
|
when(mBluetoothDeviceUpdater.
|
||||||
isDeviceConnected(any(CachedBluetoothDevice.class))).thenReturn(true);
|
isDeviceConnected(any(CachedBluetoothDevice.class))).thenReturn(true);
|
||||||
when(mCachedBluetoothDevice.isHfpDevice()).thenReturn(true);
|
when(mCachedBluetoothDevice.isConnectedHfpDevice()).thenReturn(true);
|
||||||
|
|
||||||
mBluetoothDeviceUpdater.onProfileConnectionStateChanged(mCachedBluetoothDevice,
|
mBluetoothDeviceUpdater.onProfileConnectionStateChanged(mCachedBluetoothDevice,
|
||||||
BluetoothProfile.STATE_CONNECTED, BluetoothProfile.A2DP);
|
BluetoothProfile.STATE_CONNECTED, BluetoothProfile.A2DP);
|
||||||
@@ -188,7 +188,7 @@ public class ConnectedBluetoothDeviceUpdaterTest {
|
|||||||
mShadowAudioManager.setMode(AudioManager.MODE_NORMAL);
|
mShadowAudioManager.setMode(AudioManager.MODE_NORMAL);
|
||||||
when(mBluetoothDeviceUpdater.
|
when(mBluetoothDeviceUpdater.
|
||||||
isDeviceConnected(any(CachedBluetoothDevice.class))).thenReturn(true);
|
isDeviceConnected(any(CachedBluetoothDevice.class))).thenReturn(true);
|
||||||
when(mCachedBluetoothDevice.isHfpDevice()).thenReturn(true);
|
when(mCachedBluetoothDevice.isConnectedHfpDevice()).thenReturn(true);
|
||||||
|
|
||||||
mBluetoothDeviceUpdater.onProfileConnectionStateChanged(mCachedBluetoothDevice,
|
mBluetoothDeviceUpdater.onProfileConnectionStateChanged(mCachedBluetoothDevice,
|
||||||
BluetoothProfile.STATE_CONNECTED, BluetoothProfile.A2DP);
|
BluetoothProfile.STATE_CONNECTED, BluetoothProfile.A2DP);
|
||||||
|
Reference in New Issue
Block a user