Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46cbba39 authored by Tim Peng's avatar Tim Peng
Browse files

Set failed state when failed to transfer a disconnected device

-Update test case

Bug: 157139936
Test: make -j50 RunSettingsLibRoboTests
Change-Id: I1c908e108fa7795550e2b84758b5dd6f13d541e5
parent 4f94389c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();
+1 −1
Original line number Diff line number Diff line
@@ -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