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

Commit 35002149 authored by Hemant Gupta's avatar Hemant Gupta Committed by Linux Build Service Account
Browse files

Bluetooth: Add support for HID Device Role

This patch adds support for HID Device Role which enables phone being
used as a Bluetooth keyboad or mouse.

Change-Id: I931867442111ad997a34a166c7b2ec1daf317ddd
parent 112ca397
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -337,5 +337,13 @@
                <action android:name="android.wipower.IWipower" />
            </intent-filter>
        </service>
        <service
            android:process="@string/process"
            android:name = ".hid.HidDevService"
            android:enabled="@bool/profile_supported_hidd">
            <intent-filter>
                <action android:name="android.bluetooth.IBluetoothHidDevice" />
            </intent-filter>
        </service>
    </application>
</manifest>
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ LOCAL_SRC_FILES:= \
    com_android_bluetooth_avrcp.cpp \
    com_android_bluetooth_avrcp_controller.cpp \
    com_android_bluetooth_hid.cpp \
    com_android_bluetooth_hidd.cpp \
    com_android_bluetooth_hdp.cpp \
    com_android_bluetooth_pan.cpp \
    com_android_bluetooth_gatt.cpp \
+2 −0
Original line number Diff line number Diff line
@@ -46,6 +46,8 @@ int register_com_android_bluetooth_avrcp_controller(JNIEnv* env);

int register_com_android_bluetooth_hid(JNIEnv* env);

int register_com_android_bluetooth_hidd(JNIEnv* env);

int register_com_android_bluetooth_hdp(JNIEnv* env);

int register_com_android_bluetooth_pan(JNIEnv* env);
+7 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2013 The Linux Foundation. All rights reserved
 * Not a Contribution.
 * Copyright (C) 2012 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
@@ -1397,6 +1399,11 @@ jint JNI_OnLoad(JavaVM *jvm, void *reserved)
        return JNI_ERR;
    }

    if ((status = android::register_com_android_bluetooth_hidd(e)) < 0) {
        ALOGE("jni hidd registration failure: %d", status);
        return JNI_ERR;
    }

    if ((status = android::register_com_android_bluetooth_hdp(e)) < 0) {
        ALOGE("jni hdp registration failure: %d", status);
        return JNI_ERR;
+316 −302

File changed.

Preview size limit exceeded, changes collapsed.

Loading