Assign the state to the serviceState variable.
Jaikumar Ganesh [Tue, 21 Jul 2009 23:44:26 +0000 (16:44 -0700)]
src/com/android/phone/BluetoothHandsfree.java

index e4c1d2c..bb51402 100644 (file)
@@ -447,8 +447,9 @@ public class BluetoothHandsfree {
 
             cdmaIconLevel = (levelDbm < levelEcio) ? levelDbm : levelEcio;
 
-            if ((mServiceState.getRadioTechnology() == ServiceState.RADIO_TECHNOLOGY_EVDO_0)
-                  || (mServiceState.getRadioTechnology() == ServiceState.RADIO_TECHNOLOGY_EVDO_A)) {
+            if (mServiceState != null &&
+                  (mServiceState.getRadioTechnology() == ServiceState.RADIO_TECHNOLOGY_EVDO_0) ||
+                  (mServiceState.getRadioTechnology() == ServiceState.RADIO_TECHNOLOGY_EVDO_A)) {
                   int evdoEcio = signalStrength.getEvdoEcio();
                   int evdoSnr = signalStrength.getEvdoSnr();
                   int levelEvdoEcio = 0;
@@ -553,7 +554,7 @@ public class BluetoothHandsfree {
             int roam = state.getRoaming() ? 1 : 0;
             int stat;
             AtCommandResult result = new AtCommandResult(AtCommandResult.UNSOLICITED);
-
+            mServiceState = state;
             if (service == 0) {
                 stat = 0;
             } else {