summaryrefslogtreecommitdiffstats
path: root/src/com/android/bluetooth/opp/BluetoothOppService.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/bluetooth/opp/BluetoothOppService.java')
-rw-r--r--src/com/android/bluetooth/opp/BluetoothOppService.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/com/android/bluetooth/opp/BluetoothOppService.java b/src/com/android/bluetooth/opp/BluetoothOppService.java
index 10437fb30..1dc1d7ac8 100644
--- a/src/com/android/bluetooth/opp/BluetoothOppService.java
+++ b/src/com/android/bluetooth/opp/BluetoothOppService.java
@@ -399,10 +399,14 @@ public class BluetoothOppService extends Service {
mOppManager.isOPPServiceUp = false;
getContentResolver().unregisterContentObserver(mObserver);
unregisterReceiver(mBluetoothReceiver);
- mSocketListener.stop();
- mL2cSocketListener.stop();
- mSocketListener = null;
- mL2cSocketListener = null;
+ if (mSocketListener != null) {
+ mSocketListener.stop();
+ mSocketListener = null;
+ }
+ if (mL2cSocketListener != null) {
+ mL2cSocketListener.stop();
+ mL2cSocketListener = null;
+ }
if(mBatchs != null) {
mBatchs.clear();