summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNitin Shivpure <nshivpur@codeaurora.org>2015-09-28 12:43:46 +0530
committerLinux Build Service Account <lnxbuild@localhost>2015-10-06 03:23:57 -0600
commit614d2e0ffd618668d2d9593eeea460960b140b15 (patch)
treec0d44db3d29e03605a70b3f26a7493cfdbfee7e4
parent9392eeb8f50cf742eb25c9074caefe84bf24dd8a (diff)
downloadandroid_frameworks_opt_bluetooth-stable/cm-13.0-ZNH0E.tar.gz
android_frameworks_opt_bluetooth-stable/cm-13.0-ZNH0E.tar.bz2
android_frameworks_opt_bluetooth-stable/cm-13.0-ZNH0E.zip
Bluetooth: Fix to avoid crash during message listing due to disconnectstable/cm-13.0-ZNH0E
A case, where message listing is going on and user does explicitly disconnect. As mInterrupted is not set, so clientThread waits forever after completing existing MAS request. Hence setting mInterrupted while disconnecting MAS session to solve this crash. Change-Id: Icdbaf70e917e139bcd2e63544b315fde346f6c2f CRs-fixed: 914961
-rw-r--r--src/android/bluetooth/client/map/BluetoothMasObexClientSession.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/android/bluetooth/client/map/BluetoothMasObexClientSession.java b/src/android/bluetooth/client/map/BluetoothMasObexClientSession.java
index 025bd7a..37f758c 100644
--- a/src/android/bluetooth/client/map/BluetoothMasObexClientSession.java
+++ b/src/android/bluetooth/client/map/BluetoothMasObexClientSession.java
@@ -154,6 +154,12 @@ class BluetoothMasObexClientSession {
return true;
}
+
+ private void shutdown() {
+ Log.w(TAG, "shutdown ");
+ mInterrupted = true;
+ interrupt();
+ }
}
public BluetoothMasObexClientSession(ObexTransport transport, Handler handler) {
@@ -171,7 +177,7 @@ class BluetoothMasObexClientSession {
public void stop() {
if (mClientThread != null) {
- mClientThread.interrupt();
+ mClientThread.shutdown();
(new Thread() {
@Override