diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2014-11-19 18:51:29 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-11-19 18:51:29 -0800 |
commit | d93cd0e91f1de225c1c71aa93aa30c486b0db795 (patch) | |
tree | 078f3fb0db25f4ca244240199aeb98cdf835dc68 /src | |
parent | cb37db0af281016d3a4d83bc64b378178d7f65cc (diff) | |
parent | 28e23d48a202dde059f4421b2bd8c0e512fd057c (diff) | |
download | android_packages_apps_BluetoothExt-d93cd0e91f1de225c1c71aa93aa30c486b0db795.tar.gz android_packages_apps_BluetoothExt-d93cd0e91f1de225c1c71aa93aa30c486b0db795.tar.bz2 android_packages_apps_BluetoothExt-d93cd0e91f1de225c1c71aa93aa30c486b0db795.zip |
Merge "Bluetooth: Fix KW issues for DUN profile"
Diffstat (limited to 'src')
-rw-r--r-- | src/org/codeaurora/bluetooth/dun/BluetoothDunService.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/org/codeaurora/bluetooth/dun/BluetoothDunService.java b/src/org/codeaurora/bluetooth/dun/BluetoothDunService.java index 58bba02..92ec785 100644 --- a/src/org/codeaurora/bluetooth/dun/BluetoothDunService.java +++ b/src/org/codeaurora/bluetooth/dun/BluetoothDunService.java @@ -529,7 +529,7 @@ public class BluetoothDunService extends Service { removeTimeoutMsg = false; } - if (removeTimeoutMsg) { + if (removeTimeoutMsg && mDunHandler != null) { mDunHandler.removeMessages(MESSAGE_DUN_USER_TIMEOUT); } } @@ -1264,7 +1264,8 @@ public class BluetoothDunService extends Service { IpcMsgBuffer.putShort(DUN_IPC_MSG_OFF_MSG_LEN,DUN_IPC_CTRL_MSG_SIZE); IpcMsgBuffer.put(DUN_IPC_MSG_OFF_MSG, DUN_CRTL_MSG_DISCONNECT_REQ); try { - mDundOutputStream.write(IpcMsgBuffer.array(), 0, WriteLen); + if (mDundOutputStream != null) + mDundOutputStream.write(IpcMsgBuffer.array(), 0, WriteLen); } catch (IOException ex) { Log.w(TAG, "disconnect: Handled mDundOutputStream write exception: " + ex.toString()); } @@ -1293,7 +1294,8 @@ public class BluetoothDunService extends Service { IpcMsgBuffer.putShort(DUN_IPC_MSG_OFF_MSG_LEN,DUN_IPC_MDM_STATUS_MSG_SIZE); IpcMsgBuffer.put(DUN_IPC_MSG_OFF_MSG, status); try { - mDundOutputStream.write(IpcMsgBuffer.array(), 0, WriteLen); + if (mDundOutputStream != null) + mDundOutputStream.write(IpcMsgBuffer.array(), 0, WriteLen); } catch (IOException ex) { Log.e(TAG, "Handled mDundOutputStream write exception: " + ex.toString()); } |