From df1320d940d56a2a8d2b98bde1bce1c4124e9950 Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Mon, 19 Jan 2015 11:04:06 +0100 Subject: Android: Enable pairing for Android v15+ The required API became public in Android v19 which is what was used as check so far. However the same API was already privately provided since Android v15. THis patch ensures that older Android versions can create pairing requests too. This patch was provided by George Najarian. Task-number: QTBUG-43757 Change-Id: I0f38e538a972341a6acf719098f1010e52b639b7 Reviewed-by: BogDan Vatra Reviewed-by: Timur Pocheptsov --- src/bluetooth/android/localdevicebroadcastreceiver.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/bluetooth/android/localdevicebroadcastreceiver.cpp') diff --git a/src/bluetooth/android/localdevicebroadcastreceiver.cpp b/src/bluetooth/android/localdevicebroadcastreceiver.cpp index c54c5e32..a3b92252 100644 --- a/src/bluetooth/android/localdevicebroadcastreceiver.cpp +++ b/src/bluetooth/android/localdevicebroadcastreceiver.cpp @@ -50,8 +50,8 @@ LocalDeviceBroadcastReceiver::LocalDeviceBroadcastReceiver(QObject *parent) : addAction(valueForStaticField(JavaNames::BluetoothAdapter, JavaNames::ActionScanModeChanged)); addAction(valueForStaticField(JavaNames::BluetoothDevice, JavaNames::ActionAclConnected)); addAction(valueForStaticField(JavaNames::BluetoothDevice, JavaNames::ActionAclDisconnected)); - if (QtAndroidPrivate::androidSdkVersion() >= 19) - addAction(valueForStaticField(JavaNames::BluetoothDevice, JavaNames::ActionPairingRequest)); //API 19 + if (QtAndroidPrivate::androidSdkVersion() >= 15) + addAction(valueForStaticField(JavaNames::BluetoothDevice, JavaNames::ActionPairingRequest)); //API 15 //cache integer values for host & bonding mode //don't use the java fields directly but refer to them by name -- cgit v1.2.3