OSDN Git Service

Add debug to CallManager#canDial.
authorWink Saville <wink@google.com>
Tue, 25 Jan 2011 07:25:31 +0000 (23:25 -0800)
committerWink Saville <wink@google.com>
Tue, 25 Jan 2011 07:25:31 +0000 (23:25 -0800)
Add some debug to trackdown why canDial is sometime
returning false, see bug 3381435.

Change-Id: I0caade5ffdf9d67cdee0557971a8918182718512

telephony/java/com/android/internal/telephony/CallManager.java

index 719e5b4..43fae69 100644 (file)
@@ -774,13 +774,23 @@ public final class CallManager {
         boolean allLinesTaken = hasActiveCall && hasHoldingCall;
         Call.State fgCallState = getActiveFgCallState();
 
-        return (serviceState != ServiceState.STATE_POWER_OFF
+        boolean result = (serviceState != ServiceState.STATE_POWER_OFF
                 && !hasRingingCall
                 && !allLinesTaken
                 && ((fgCallState == Call.State.ACTIVE)
                     || (fgCallState == Call.State.IDLE)
                     || (fgCallState == Call.State.DISCONNECTED)));
-            }
+
+        if (result == false) {
+            Log.d(LOG_TAG, "canDial serviceState=" + serviceState
+                            + " hasRingingCall=" + hasRingingCall
+                            + " hasActiveCall=" + hasActiveCall
+                            + " hasHoldingCall=" + hasHoldingCall
+                            + " allLinesTaken=" + allLinesTaken
+                            + " fgCallState=" + fgCallState);
+        }
+        return result;
+    }
 
     /**
      * Whether or not the phone can do explicit call transfer in the current