diff options
author | Christine Chen <christinech@google.com> | 2013-09-18 20:36:38 -0700 |
---|---|---|
committer | Christine Chen <christinech@google.com> | 2013-09-18 20:37:42 -0700 |
commit | 6258ff60a7edc760facc3f387fc9c8ceee3fb518 (patch) | |
tree | 9a33e989ce607dfb49040c38dab22ff09843782a /InCallUI/src/com/android/incallui/CallCardFragment.java | |
parent | 82d64da6612291b8a73db8e452c0b3a1c26abf92 (diff) |
Adds DISCONNECTING state support.
When user ends a call locally, we first set the call state to
DISCONNECTING and show "Hanging up" as the status. We then show the
"Call ended" status when the telephony layer comes back with the
DISCONNECTED state for the call.
Bug: 10808537
Change-Id: Iad5eda6ee34e2f04a861977ac1a2453a52081d27
Diffstat (limited to 'InCallUI/src/com/android/incallui/CallCardFragment.java')
-rw-r--r-- | InCallUI/src/com/android/incallui/CallCardFragment.java | 25 |
1 files changed, 12 insertions, 13 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); |