summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothsocket_bluez.cpp
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@theqtcompany.com>2015-03-18 10:21:22 +0100
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-03-18 10:46:45 +0000
commit669b427653f8f708269431917f720f7e76680191 (patch)
tree1c14bc34541eb32a25efb7ef97307b18abf807c7 /src/bluetooth/qbluetoothsocket_bluez.cpp
parent935975a268279671a34084e306b44901d266c419 (diff)
Android: Fix crash in QBluetoothLocalDevice ctor due to Java exception
In general BluetoothAdapter.getDefaultAdapter should not throw an exception. If the device does not support Bluetooth the function should return a null reference only. However some devices throw a RuntimeException as well. We need to catch it to prevent unwinding of the stack. At the same time the patch simplifies the code by using QAndroidJniObject where possible. [ChangeLog][QtBluetooth][Android] Fixed crash in QBluetoothLocalDevice ctor on some devices due to a platform exception in QBluetoothAdapter.getDefaultAdapter(). Task-number: QTBUG-45066 Change-Id: I933783cda891127e5e37722f96f477c13b433ca7 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Diffstat (limited to 'src/bluetooth/qbluetoothsocket_bluez.cpp')
0 files changed, 0 insertions, 0 deletions