Set failed state when failed to transfer a disconnected device

-Update test case

Bug: 157139936
Test: make -j50 RunSettingsLibRoboTests
Change-Id: I1c908e108fa7795550e2b84758b5dd6f13d541e5
This commit is contained in:
Tim Peng
2020-05-27 16:46:45 +08:00
parent 4f94389c6d
commit 46cbba39ef
2 changed files with 2 additions and 2 deletions

View File

@@ -624,7 +624,7 @@ public class LocalMediaManager implements BluetoothCallback {
.isBusy()
&& !mOnTransferBluetoothDevice.isConnected()) {
// Failed to connect
mOnTransferBluetoothDevice.setState(MediaDeviceState.STATE_DISCONNECTED);
mOnTransferBluetoothDevice.setState(MediaDeviceState.STATE_CONNECTING_FAILED);
mOnTransferBluetoothDevice = null;
}
dispatchDeviceAttributesChanged();

View File

@@ -505,7 +505,7 @@ public class LocalMediaManagerTest {
mLocalMediaManager.connectDevice(device);
mLocalMediaManager.mDeviceAttributeChangeCallback.onDeviceAttributesChanged();
verify(device).setState(LocalMediaManager.MediaDeviceState.STATE_DISCONNECTED);
verify(device).setState(LocalMediaManager.MediaDeviceState.STATE_CONNECTING_FAILED);
}
@Test