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

Commit 8bd6b55e authored by Himanshu Rawat's avatar Himanshu Rawat
Browse files

Log the reason when bonding fails to initiate


Bug: 260958486
Test: manual
Change-Id: Ia4a913d385a02b49a428bc7efbff18d9954083cd
parent a17741fe
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1137,6 +1137,11 @@ static jboolean createBondNative(JNIEnv* env, jobject obj, jbyteArray address,
  } else {
    ret = sBluetoothInterface->create_bond((RawAddress*)addr, transport);
  }

  if (ret != BT_STATUS_SUCCESS) {
    ALOGW("%s: Failed to initiate bonding. Status = %d", __func__, ret);
  }

  env->ReleaseByteArrayElements(address, addr, 0);
  return (ret == BT_STATUS_SUCCESS) ? JNI_TRUE : JNI_FALSE;
}