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

Commit 400b17aa authored by Hansong Zhang's avatar Hansong Zhang
Browse files

Rename Bluetooth HID Service

Rename the Bluetooth HID Host and Device Service to make them more
clear. Also change the corresponding name for jni and config values.

Service:
HidService -> HidHostService
HidDevService -> HidDeviceService

JNI:
com_android_bluetooth_hid -> com_android_bluetooth_hid_host
com_android_bluetooth_hidd -> com_android_bluetooth_hid_device

res/values/config.xml:
profile_supported_hid -> profile_supported_hid_host
profile_supported_hidd -> profile_supported_hid_device

Test: with devices using HID Service.
Bug: 68055651

Change-Id: I8b51a923a31fb3baab599537c942d933f859b41f
parent f78c6651
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -325,8 +325,8 @@
        </service>
        <service
            android:process="@string/process"
            android:name = ".hid.HidService"
            android:enabled="@bool/profile_supported_hid">
            android:name = ".hid.HidHostService"
            android:enabled="@bool/profile_supported_hid_host">
            <intent-filter>
                <action android:name="android.bluetooth.IBluetoothHidHost" />
            </intent-filter>
@@ -387,8 +387,8 @@
                android:resource="@xml/authenticator" />
        </service>
        <service
            android:name = ".hid.HidDevService"
            android:enabled="@bool/profile_supported_hidd">
            android:name = ".hid.HidDeviceService"
            android:enabled="@bool/profile_supported_hid_device">
            <intent-filter>
                <action android:name="android.bluetooth.IBluetoothHidDevice" />
            </intent-filter>
+2 −2
Original line number Diff line number Diff line
@@ -9,8 +9,8 @@ cc_library_shared {
        "com_android_bluetooth_a2dp_sink.cpp",
        "com_android_bluetooth_avrcp.cpp",
        "com_android_bluetooth_avrcp_controller.cpp",
        "com_android_bluetooth_hid.cpp",
        "com_android_bluetooth_hidd.cpp",
        "com_android_bluetooth_hid_host.cpp",
        "com_android_bluetooth_hid_device.cpp",
        "com_android_bluetooth_hdp.cpp",
        "com_android_bluetooth_pan.cpp",
        "com_android_bluetooth_gatt.cpp",
+2 −2
Original line number Diff line number Diff line
@@ -83,9 +83,9 @@ int register_com_android_bluetooth_avrcp(JNIEnv* env);

int register_com_android_bluetooth_avrcp_controller(JNIEnv* env);

int register_com_android_bluetooth_hid(JNIEnv* env);
int register_com_android_bluetooth_hid_host(JNIEnv* env);

int register_com_android_bluetooth_hidd(JNIEnv* env);
int register_com_android_bluetooth_hid_device(JNIEnv* env);

int register_com_android_bluetooth_hdp(JNIEnv* env);

+2 −2
Original line number Diff line number Diff line
@@ -1347,13 +1347,13 @@ jint JNI_OnLoad(JavaVM* jvm, void* reserved) {
    return JNI_ERR;
  }

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

  status = android::register_com_android_bluetooth_hidd(e);
  status = android::register_com_android_bluetooth_hid_device(e);
  if (status < 0) {
    ALOGE("jni hidd registration failure: %d", status);
    return JNI_ERR;
+4 −4
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

#define LOG_TAG "BluetoothHidDevServiceJni"
#define LOG_TAG "BluetoothHidDeviceServiceJni"

#define LOG_NDEBUG 0

@@ -473,9 +473,9 @@ static JNINativeMethod sMethods[] = {
    {"disconnectNative", "()Z", (void*)disconnectNative},
};

int register_com_android_bluetooth_hidd(JNIEnv* env) {
int register_com_android_bluetooth_hid_device(JNIEnv* env) {
  return jniRegisterNativeMethods(env,
                                  "com/android/bluetooth/hid/HidDevService",
                                  "com/android/bluetooth/hid/HidDeviceService",
                                  sMethods, NELEM(sMethods));
}
}
}  // namespace android
Loading