summaryrefslogtreecommitdiffstats
path: root/src/com/android/incallui/CallList.java
diff options
context:
space:
mode:
authorSantos Cordon <santoscordon@google.com>2014-09-04 16:16:51 -0700
committerSantos Cordon <santoscordon@google.com>2014-09-05 16:18:30 -0700
commit52c30ebe11e132c5b00a15aabdf4a411355bf0f4 (patch)
tree11bd21ac930d208b6adcfad423767cf82cffd2fd /src/com/android/incallui/CallList.java
parent913ee5e915bbfd799f412dcad903dc773680aea4 (diff)
downloadpackages_apps_InCallUI-52c30ebe11e132c5b00a15aabdf4a411355bf0f4.tar.gz
packages_apps_InCallUI-52c30ebe11e132c5b00a15aabdf4a411355bf0f4.tar.bz2
packages_apps_InCallUI-52c30ebe11e132c5b00a15aabdf4a411355bf0f4.zip
Support CDMA conference calling.
Bug:17316859 Change from using GENERIC_CONFERENCE to a better MANAGE_CONFERENCE. Change-Id: I0306aaa5cf4d35bf095d85db63b3d08395394645
Diffstat (limited to 'src/com/android/incallui/CallList.java')
-rw-r--r--src/com/android/incallui/CallList.java42
1 files changed, 24 insertions, 18 deletions
diff --git a/src/com/android/incallui/CallList.java b/src/com/android/incallui/CallList.java
index 7f76cd5d..8c5b467e 100644
--- a/src/com/android/incallui/CallList.java
+++ b/src/com/android/incallui/CallList.java
@@ -71,15 +71,24 @@ public class CallList implements InCallPhoneListener {
private Phone.Listener mPhoneListener = new Phone.Listener() {
@Override
- public void onCallAdded(Phone phone, android.telecomm.Call call) {
- // TODO: The Call adds itself to various singletons within its ctor. Refactor
- // so that this is done more explicitly; otherwise, the below looks like we're creating
- // an object and never using it.
- new Call(call);
+ public void onCallAdded(Phone phone, android.telecomm.Call telecommCall) {
+ Call call = new Call(telecommCall);
+ if (call.getState() == Call.State.INCOMING) {
+ onIncoming(call, call.getCannedSmsResponses());
+ } else {
+ onUpdate(call);
+ }
}
@Override
- public void onCallRemoved(Phone phone, android.telecomm.Call call) {
- // Handled by disconnection cascade from the Call itself
+ public void onCallRemoved(Phone phone, android.telecomm.Call telecommCall) {
+ if (mCallByTelecommCall.containsKey(telecommCall)) {
+ Call call = mCallByTelecommCall.get(telecommCall);
+ call.setState(Call.State.DISCONNECTED);
+ call.setDisconnectCause(DisconnectCause.NOT_VALID);
+ if (updateCallInMap(call)) {
+ Log.w(this, "Removing call not previously disconnected " + call.getId());
+ }
+ }
}
};
@@ -105,14 +114,10 @@ public class CallList implements InCallPhoneListener {
* Called when a single call disconnects.
*/
public void onDisconnect(Call call) {
- Log.d(this, "onDisconnect: ", call);
-
- boolean updated = updateCallInMap(call);
-
- if (updated) {
+ if (updateCallInMap(call)) {
+ Log.i(this, "onDisconnect: " + call);
// notify those listening for changes on this specific change
notifyCallUpdateListeners(call);
-
// notify those listening for all disconnects
notifyListenersOfDisconnect(call);
}
@@ -122,9 +127,9 @@ public class CallList implements InCallPhoneListener {
* Called when a single call has changed.
*/
public void onIncoming(Call call, List<String> textMessages) {
- Log.d(this, "onIncoming - " + call);
-
- updateCallInMap(call);
+ if (updateCallInMap(call)) {
+ Log.i(this, "onIncoming - " + call);
+ }
updateCallTextMap(call, textMessages);
for (Listener listener : mListeners) {
@@ -137,7 +142,6 @@ public class CallList implements InCallPhoneListener {
*/
public void onUpdate(Call call) {
onUpdateCall(call);
- Log.d(this, "onUpdate - ", call);
notifyGenericListeners();
}
@@ -373,7 +377,9 @@ public class CallList implements InCallPhoneListener {
*/
private void onUpdateCall(Call call) {
Log.d(this, "\t" + call);
- updateCallInMap(call);
+ if (updateCallInMap(call)) {
+ Log.i(this, "onUpdate - " + call);
+ }
updateCallTextMap(call, null);
notifyCallUpdateListeners(call);
}