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

Commit 01192d2c authored by Hansong Zhang's avatar Hansong Zhang Committed by android-build-merger
Browse files

Merge "HID Device: add unit test cases" am: 7b672f72 am: 3fa8dc95

am: 51cb65f6

Change-Id: I08a398367fca8b4240c35a80494871fe2dfc5865
parents dda325dd 51cb65f6
Loading
Loading
Loading
Loading
+9 −12
Original line number Diff line number Diff line
@@ -68,10 +68,6 @@ public class HidDeviceService extends ProfileService {

    private HidDeviceServiceHandler mHandler;

    public HidDeviceService() {
        mHidDeviceNativeInterface = HidDeviceNativeInterface.getInstance();
    }

    private class HidDeviceServiceHandler extends Handler {
        @Override
        public void handleMessage(Message msg) {
@@ -553,6 +549,7 @@ public class HidDeviceService extends ProfileService {

        mHandler = new HidDeviceServiceHandler();
        setHidDeviceService(this);
        mHidDeviceNativeInterface = HidDeviceNativeInterface.getInstance();
        mHidDeviceNativeInterface.init();
        mNativeAvailable = true;
        return true;
@@ -741,21 +738,21 @@ public class HidDeviceService extends ProfileService {

    private static int convertHalState(int halState) {
        switch (halState) {
            case CONN_STATE_CONNECTED:
            case HAL_CONN_STATE_CONNECTED:
                return BluetoothProfile.STATE_CONNECTED;
            case CONN_STATE_CONNECTING:
            case HAL_CONN_STATE_CONNECTING:
                return BluetoothProfile.STATE_CONNECTING;
            case CONN_STATE_DISCONNECTED:
            case HAL_CONN_STATE_DISCONNECTED:
                return BluetoothProfile.STATE_DISCONNECTED;
            case CONN_STATE_DISCONNECTING:
            case HAL_CONN_STATE_DISCONNECTING:
                return BluetoothProfile.STATE_DISCONNECTING;
            default:
                return BluetoothProfile.STATE_DISCONNECTED;
        }
    }

    private static final int CONN_STATE_CONNECTED = 0;
    private static final int CONN_STATE_CONNECTING = 1;
    private static final int CONN_STATE_DISCONNECTED = 2;
    private static final int CONN_STATE_DISCONNECTING = 3;
    static final int HAL_CONN_STATE_CONNECTED = 0;
    static final int HAL_CONN_STATE_CONNECTING = 1;
    static final int HAL_CONN_STATE_DISCONNECTED = 2;
    static final int HAL_CONN_STATE_DISCONNECTING = 3;
}
+369 −14

File changed.

Preview size limit exceeded, changes collapsed.