Fix JNI for sendDtmfNative
sendDtmfNative had the parameters reversed in the static function
declaration causing DTMF (dial tones durring a call) to crash the BT
stack.
Bug: 36359320
Test: Make a phonecall via HFP and tap digits, observe no crash and
proper AT+VTS commands in btsnoop_hci.log.
Change-Id: Icf66a22886bfebd6aebcf1033f59d0562c57db2f
diff --git a/jni/com_android_bluetooth_hfpclient.cpp b/jni/com_android_bluetooth_hfpclient.cpp
index 9ae7d85..4bb1380 100644
--- a/jni/com_android_bluetooth_hfpclient.cpp
+++ b/jni/com_android_bluetooth_hfpclient.cpp
@@ -697,8 +697,8 @@
return (status == BT_STATUS_SUCCESS) ? JNI_TRUE : JNI_FALSE;
}
-static jboolean sendDtmfNative(JNIEnv* env, jobject object, jbyte code,
- jbyteArray address) {
+static jboolean sendDtmfNative(JNIEnv* env, jobject object, jbyteArray address,
+ jbyte code) {
if (!sBluetoothHfpClientInterface) return JNI_FALSE;
jbyte* addr = env->GetByteArrayElements(address, NULL);