summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2014-10-28 11:51:01 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2014-10-28 11:51:01 -0700
commit85feb6ca0e52decc387a3849c59cba500be918eb (patch)
treee3770e978fb050af945416c9a09d6c22cbe186b5
parent4dc194508868501b0627a81169ff736cf783b6ba (diff)
parent21605628047edfd2b23c154f9e9abeffc49a154f (diff)
downloadandroid_packages_apps_BluetoothExt-85feb6ca0e52decc387a3849c59cba500be918eb.tar.gz
android_packages_apps_BluetoothExt-85feb6ca0e52decc387a3849c59cba500be918eb.tar.bz2
android_packages_apps_BluetoothExt-85feb6ca0e52decc387a3849c59cba500be918eb.zip
Merge "SAP: Fix Klocwork issues."
-rw-r--r--src/org/codeaurora/bluetooth/sap/BluetoothSapService.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/org/codeaurora/bluetooth/sap/BluetoothSapService.java b/src/org/codeaurora/bluetooth/sap/BluetoothSapService.java
index 4cb378d..70697b3 100644
--- a/src/org/codeaurora/bluetooth/sap/BluetoothSapService.java
+++ b/src/org/codeaurora/bluetooth/sap/BluetoothSapService.java
@@ -542,7 +542,8 @@ public class BluetoothSapService extends Service {
}
if (removeTimeoutMsg) {
- mSapHandler.removeMessages(MESSAGE_SAP_USER_TIMEOUT);
+ if (mSapHandler != null)
+ mSapHandler.removeMessages(MESSAGE_SAP_USER_TIMEOUT);
}
}
@@ -1226,7 +1227,8 @@ public class BluetoothSapService extends Service {
IpcMsgBuffer.putShort(SAP_IPC_MSG_OFF_MSG_LEN,SAP_IPC_CTRL_MSG_SIZE);
IpcMsgBuffer.put(SAP_IPC_MSG_OFF_MSG, SAP_CRTL_MSG_DISCONNECT_REQ);
try {
- mSapdOutputStream.write(IpcMsgBuffer.array(), 0, WriteLen);
+ if (mSapdOutputStream != null)
+ mSapdOutputStream.write(IpcMsgBuffer.array(), 0, WriteLen);
} catch (IOException ex) {
if (VERBOSE) Log.v(TAG, "mSapdOutputStream wrtie exception: " + ex.toString());
}
@@ -1254,7 +1256,8 @@ public class BluetoothSapService extends Service {
IpcMsgBuffer.putShort(SAP_IPC_MSG_OFF_MSG_LEN,SAP_IPC_CTRL_MSG_SIZE);
IpcMsgBuffer.put(SAP_IPC_MSG_OFF_MSG, SAP_CRTL_MSG_DISCONNECT_REQ_IMM);
try {
- mSapdOutputStream.write(IpcMsgBuffer.array(), 0, WriteLen);
+ if (mSapdOutputStream != null)
+ mSapdOutputStream.write(IpcMsgBuffer.array(), 0, WriteLen);
} catch (IOException ex) {
if (VERBOSE) Log.v(TAG, "mSapdOutputStream wrtie exception: " + ex.toString());
}