aboutsummaryrefslogtreecommitdiffstats
path: root/java/jni
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2021-09-21 02:46:32 +0200
committerSven Gothel <[email protected]>2021-09-21 02:46:32 +0200
commitcf14e88fae8ed3dc5678ca550fa93c57197c3da6 (patch)
tree9b5da8451cd4100b9484364ac1ec31dfe051885e /java/jni
parentd952f08c74035bd795dd8bf507f90a80d864d207 (diff)
BTAdapter::initialize() validates power-on state and fails if not successful, same goes with BTAdapter::setPowered(bool)
Adapting dbt_scanner10/DBTScanner10 and dbt_peripheral/DBTPeripheral10, while also adding notion of earmarking chosen BTAdapter to avoid initializing two adapter (cough cough).
Diffstat (limited to 'java/jni')
-rw-r--r--java/jni/direct_bt/DBTAdapter.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/java/jni/direct_bt/DBTAdapter.cxx b/java/jni/direct_bt/DBTAdapter.cxx
index 259686c3..6a8303bd 100644
--- a/java/jni/direct_bt/DBTAdapter.cxx
+++ b/java/jni/direct_bt/DBTAdapter.cxx
@@ -866,11 +866,11 @@ jboolean Java_jau_direct_1bt_DBTAdapter_removeDiscoveredDeviceImpl1(JNIEnv *env,
// misc
//
-jboolean Java_jau_direct_1bt_DBTAdapter_setPowered(JNIEnv *env, jobject obj, jboolean value) {
+jboolean Java_jau_direct_1bt_DBTAdapter_setPowered(JNIEnv *env, jobject obj, jboolean power_on) {
try {
BTAdapter *adapter = jau::getJavaUplinkObject<BTAdapter>(env, obj);
jau::JavaGlobalObj::check(adapter->getJavaObject(), E_FILE_LINE);
- return adapter->setPowered(JNI_TRUE == value ? true : false) ? JNI_TRUE : JNI_FALSE;
+ return adapter->setPowered(JNI_TRUE == power_on ? true : false) ? JNI_TRUE : JNI_FALSE;
} catch(...) {
rethrow_and_raise_java_exception(env);
}