Merge "Set failed state when failed to transfer a disconnected device" into rvc-dev

This commit is contained in:
tim peng
2020-05-29 05:09:04 +00:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 2 deletions

View File

@@ -639,7 +639,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;
dispatchOnRequestFailed(REASON_UNKNOWN_ERROR);
}

View File

@@ -506,7 +506,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