am 9bc27c8f: Merge "NPE in BluetoothPhoneService.java when switch users."

* commit '9bc27c8f517d1a1c8666119f3b4313c5441128f5':
  NPE in BluetoothPhoneService.java when switch users.
diff --git a/src/com/android/phone/BluetoothPhoneService.java b/src/com/android/phone/BluetoothPhoneService.java
index cd9c696..ed6f37e 100644
--- a/src/com/android/phone/BluetoothPhoneService.java
+++ b/src/com/android/phone/BluetoothPhoneService.java
@@ -332,7 +332,9 @@
         }
         // end the result
         // when index is 0, other parameter does not matter
-        mBluetoothHeadset.clccResponse(0, 0, 0, 0, false, "", 0);
+        if (mBluetoothHeadset != null) {
+            mBluetoothHeadset.clccResponse(0, 0, 0, 0, false, "", 0);
+        }
     }
 
     private void handleQueryPhoneState() {
@@ -527,7 +529,9 @@
             type = PhoneNumberUtils.toaFromString(number);
         }
 
-        mBluetoothHeadset.clccResponse(index + 1, direction, state, 0, mpty, number, type);
+        if (mBluetoothHeadset != null) {
+            mBluetoothHeadset.clccResponse(index + 1, direction, state, 0, mpty, number, type);
+        }
     }
 
     /** Build the +CLCC result for CDMA
@@ -660,7 +664,9 @@
             number = "";
         }
 
-        mBluetoothHeadset.clccResponse(index + 1, direction, state, 0, mpty, number, type);
+        if (mBluetoothHeadset != null) {
+            mBluetoothHeadset.clccResponse(index + 1, direction, state, 0, mpty, number, type);
+        }
     }
 
     private void handleCdmaSwapSecondCallState() {