diff options
Diffstat (limited to 'core/jni/android_bluetooth_BluetoothSocket.cpp')
-rw-r--r-- | core/jni/android_bluetooth_BluetoothSocket.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/jni/android_bluetooth_BluetoothSocket.cpp b/core/jni/android_bluetooth_BluetoothSocket.cpp index 51cf0cb..70d74d5 100644 --- a/core/jni/android_bluetooth_BluetoothSocket.cpp +++ b/core/jni/android_bluetooth_BluetoothSocket.cpp @@ -124,11 +124,13 @@ static void initSocketNative(JNIEnv *env, jobject obj) { switch (type) { case TYPE_RFCOMM: lm |= auth ? RFCOMM_LM_AUTH : 0; - lm |= encrypt? RFCOMM_LM_ENCRYPT : 0; + lm |= encrypt ? RFCOMM_LM_ENCRYPT : 0; + lm |= (auth && encrypt) ? RFCOMM_LM_SECURE : 0; break; case TYPE_L2CAP: lm |= auth ? L2CAP_LM_AUTH : 0; - lm |= encrypt? L2CAP_LM_ENCRYPT : 0; + lm |= encrypt ? L2CAP_LM_ENCRYPT : 0; + lm |= (auth && encrypt) ? L2CAP_LM_SECURE : 0; break; } |