diff options
5 files changed, 22 insertions, 22 deletions
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java index 49ee786cd..dd3e8aea4 100644 --- a/InCallUI/src/com/android/incallui/CallCardFragment.java +++ b/InCallUI/src/com/android/incallui/CallCardFragment.java @@ -231,15 +231,15 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr // States other than disconnected not yet supported callStateLabel = getCallStateLabelFromState(state, cause); - Log.v(this, "setCallState ", callStateLabel); - Log.v(this, "DisconnectCause ", cause); - Log.v(this, "bluetooth on ", bluetoothOn); + Log.v(this, "setCallState " + callStateLabel); + Log.v(this, "DisconnectCause " + cause); + Log.v(this, "bluetooth on " + bluetoothOn); Log.v(this, "gateway " + gatewayLabel + gatewayNumber); // There are cases where we totally skip the animation, in which case remove the transition // animation here and restore it afterwards. final boolean skipAnimation = (state == Call.State.DIALING - || state == Call.State.DISCONNECTED); + || state == Call.State.DISCONNECTED || state == Call.State.DISCONNECTING); LayoutTransition transition = null; if (skipAnimation) { transition = mSupplementaryInfoContainer.getLayoutTransition(); @@ -371,15 +371,14 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr } else if (Call.State.INCOMING == state || Call.State.CALL_WAITING == state) { callStateLabel = context.getString(R.string.card_title_incoming_call); - // TODO(klp): Add a disconnecting state - //} else if (Call.State.DISCONNECTING) { - // While in the DISCONNECTING state we display a "Hanging up" - // message in order to make the UI feel more responsive. (In - // GSM it's normal to see a delay of a couple of seconds while - // negotiating the disconnect with the network, so the "Hanging - // up" state at least lets the user know that we're doing - // something. This state is currently not used with CDMA.) - //callStateLabel = context.getString(R.string.card_title_hanging_up); + } else if (Call.State.DISCONNECTING == state) { + // While in the DISCONNECTING state we display a "Hanging up" + // message in order to make the UI feel more responsive. (In + // GSM it's normal to see a delay of a couple of seconds while + // negotiating the disconnect with the network, so the "Hanging + // up" state at least lets the user know that we're doing + // something. This state is currently not used with CDMA.) + callStateLabel = context.getString(R.string.card_title_hanging_up); } else if (Call.State.DISCONNECTED == state) { callStateLabel = getCallFailedString(cause); diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java index 1830f054c..af7ee1bfc 100644 --- a/InCallUI/src/com/android/incallui/CallCardPresenter.java +++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java @@ -318,6 +318,10 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> // to let user know quickly what call has disconnected. Disconnected // calls are very short lived. if (!skipDisconnected) { + retval = callList.getDisconnectingCall(); + if (retval != null && retval != ignore) { + return retval; + } retval = callList.getDisconnectedCall(); if (retval != null && retval != ignore) { return retval; diff --git a/InCallUI/src/com/android/incallui/CallList.java b/InCallUI/src/com/android/incallui/CallList.java index 8249fd481..21f86f74c 100644 --- a/InCallUI/src/com/android/incallui/CallList.java +++ b/InCallUI/src/com/android/incallui/CallList.java @@ -202,6 +202,10 @@ public class CallList { return getFirstCallWithState(Call.State.DISCONNECTED); } + public Call getDisconnectingCall() { + return getFirstCallWithState(Call.State.DISCONNECTING); + } + public Call getSecondBackgroundCall() { return getCallWithState(Call.State.ONHOLD, 1); } @@ -223,7 +227,6 @@ public class CallList { return call; } - public Call getFirstCall() { // TODO: should we switch to a simple list and pull the first one? Call result = getIncomingCall(); @@ -316,7 +319,6 @@ public class CallList { final Integer id = new Integer(call.getCallId()); if (call.getState() == Call.State.DISCONNECTED) { - // update existing (but do not add!!) disconnected calls if (mCallMap.containsKey(id)) { diff --git a/InCallUI/src/com/android/incallui/ContactInfoCache.java b/InCallUI/src/com/android/incallui/ContactInfoCache.java index 6c05650b9..13f8dd00d 100644 --- a/InCallUI/src/com/android/incallui/ContactInfoCache.java +++ b/InCallUI/src/com/android/incallui/ContactInfoCache.java @@ -330,12 +330,6 @@ public class ContactInfoCache implements ContactsAsyncHelper.OnImageLoadComplete photo = context.getResources().getDrawable(R.drawable.picture_unknown); } else { cce.personUri = personUri; - - // If the image load is too slow, we show a default avatar icon afterward. - // If it is fast enough, this message will be canceled on onImageLoadComplete(). - // TODO (klp): Figure out if this handler is still needed. - // mHandler.removeMessages(MESSAGE_SHOW_UNKNOWN_PHOTO); - // mHandler.sendEmptyMessageDelayed(MESSAGE_SHOW_UNKNOWN_PHOTO, MESSAGE_DELAY); } } diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java index 8c52aab2c..935399a62 100644 --- a/InCallUI/src/com/android/incallui/InCallPresenter.java +++ b/InCallUI/src/com/android/incallui/InCallPresenter.java @@ -223,7 +223,8 @@ public class InCallPresenter implements CallList.Listener { newState = InCallState.OUTGOING; } else if (callList.getActiveCall() != null || callList.getBackgroundCall() != null || - callList.getDisconnectedCall() != null) { + callList.getDisconnectedCall() != null || + callList.getDisconnectingCall() != null) { newState = InCallState.INCALL; } |