DTMF Tones work in dialing state
plus some additional logging.
bug:10425120
Change-Id: I2a7ab27a3f387feb091340112dd6e41881c50429
diff --git a/src/com/android/phone/CallModeler.java b/src/com/android/phone/CallModeler.java
index a5e2044..94584a2 100644
--- a/src/com/android/phone/CallModeler.java
+++ b/src/com/android/phone/CallModeler.java
@@ -175,15 +175,17 @@
return false;
}
- public boolean hasOutstandingActiveCall() {
- return hasOutstandingActiveCallInternal(mCallMap) ||
- hasOutstandingActiveCallInternal(mConfCallMap);
+ public boolean hasOutstandingActiveOrDialingCall() {
+ return hasOutstandingActiveOrDialingCallInternal(mCallMap) ||
+ hasOutstandingActiveOrDialingCallInternal(mConfCallMap);
}
- private static boolean hasOutstandingActiveCallInternal(HashMap<Connection, Call> map) {
+ private static boolean hasOutstandingActiveOrDialingCallInternal(
+ HashMap<Connection, Call> map) {
for (Call call : map.values()) {
final int state = call.getState();
- if (Call.State.ACTIVE == state) {
+ if (state == Call.State.ACTIVE ||
+ state == Call.State.DIALING) {
return true;
}
}
@@ -192,6 +194,7 @@
}
private void onNewRingingConnection(AsyncResult r) {
+ Log.i(TAG, "onNewRingingConnection");
final Connection conn = (Connection) r.result;
final Call call = getCallFromMap(mCallMap, conn, true);
@@ -207,6 +210,7 @@
}
private void onDisconnect(AsyncResult r) {
+ Log.i(TAG, "onDisconnect");
final Connection conn = (Connection) r.result;
final Call call = getCallFromMap(mCallMap, conn, false);
@@ -237,6 +241,7 @@
* Called when the phone state changes.
*/
private void onPhoneStateChanged(AsyncResult r) {
+ Log.i(TAG, "onPhoneStateChanged: ");
final List<Call> updatedCalls = Lists.newArrayList();
doUpdate(false, updatedCalls);
@@ -267,6 +272,8 @@
final Call call = getCallFromMap(mCallMap, connection, true);
boolean changed = updateCallFromConnection(call, connection, false);
+
+ Log.i(TAG, "doUpdate: " + call);
if (fullUpdate || changed) {
out.add(call);
}