diff options
author | Santos Cordon <santoscordon@google.com> | 2013-09-19 01:52:27 -0700 |
---|---|---|
committer | Santos Cordon <santoscordon@google.com> | 2013-09-19 19:50:13 -0700 |
commit | 193fb4ff74b006f8923628c7d537630860b2d4cf (patch) | |
tree | 5f4adfca297e3133aec7f56fd57e9f75b5f27b8b | |
parent | 91b4a5803e9e86195b1dc1c0408ef13799bc8d04 (diff) |
Add "retrying" text for CDMA redial calls.
listening for new REDIALING state.
bug:10824223
Change-Id: I2b6f2f74713197902c93deca203f4f136732f7a2
5 files changed, 15 insertions, 11 deletions
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java index 21dad0cd7..e6c5bce2b 100644 --- a/InCallUI/src/com/android/incallui/CallCardFragment.java +++ b/InCallUI/src/com/android/incallui/CallCardFragment.java @@ -244,7 +244,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr // 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 + final boolean skipAnimation = (Call.State.isDialing(state) || state == Call.State.DISCONNECTED || state == Call.State.DISCONNECTING); LayoutTransition transition = null; if (skipAnimation) { @@ -370,10 +370,10 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr } else if (Call.State.ONHOLD == state) { callStateLabel = context.getString(R.string.card_title_on_hold); - } else if (Call.State.DIALING == state) { callStateLabel = context.getString(R.string.card_title_dialing); - + } else if (Call.State.REDIALING == state) { + callStateLabel = context.getString(R.string.card_title_redialing); } else if (Call.State.INCOMING == state || Call.State.CALL_WAITING == state) { callStateLabel = context.getString(R.string.card_title_incoming_call); diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java index af7ee1bfc..4ff4d6523 100644 --- a/InCallUI/src/com/android/incallui/CallCardPresenter.java +++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java @@ -421,7 +421,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> if (mPrimary == null) { return false; } - return (mPrimary.getState() == Call.State.DIALING && + return (Call.State.isDialing(mPrimary.getState()) && !TextUtils.isEmpty(mPrimary.getGatewayNumber()) && !TextUtils.isEmpty(mPrimary.getGatewayPackage())); } diff --git a/InCallUI/src/com/android/incallui/CallList.java b/InCallUI/src/com/android/incallui/CallList.java index 21f86f74c..53288de03 100644 --- a/InCallUI/src/com/android/incallui/CallList.java +++ b/InCallUI/src/com/android/incallui/CallList.java @@ -187,7 +187,11 @@ public class CallList { } public Call getOutgoingCall() { - return getFirstCallWithState(Call.State.DIALING); + Call call = getFirstCallWithState(Call.State.DIALING); + if (call == null) { + call = getFirstCallWithState(Call.State.REDIALING); + } + return call; } public Call getActiveCall() { @@ -231,7 +235,7 @@ public class CallList { // TODO: should we switch to a simple list and pull the first one? Call result = getIncomingCall(); if (result == null) { - result = getFirstCallWithState(Call.State.DIALING); + result = getOutgoingCall(); } if (result == null) { result = getFirstCallWithState(Call.State.ACTIVE); diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java index 4f687a86e..47fe91194 100644 --- a/InCallUI/src/com/android/incallui/InCallPresenter.java +++ b/InCallUI/src/com/android/incallui/InCallPresenter.java @@ -488,7 +488,7 @@ public class InCallPresenter implements CallList.Listener { Log.i(this, "Start Full Screen in call UI"); mStatusBarNotifier.updateNotificationAndLaunchIncomingCallUi(newState, mCallList); } else if (newState == InCallState.NO_CALLS) { - Log.i(this, "Hide in call UI"); + Log.e(this, "Hide in call UI", new Exception()); // The new state is the no calls state. Tear everything down. if (mInCallActivity != null) { diff --git a/InCallUI/src/com/android/incallui/StatusBarNotifier.java b/InCallUI/src/com/android/incallui/StatusBarNotifier.java index b2593f989..89d074463 100644 --- a/InCallUI/src/com/android/incallui/StatusBarNotifier.java +++ b/InCallUI/src/com/android/incallui/StatusBarNotifier.java @@ -205,7 +205,7 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener { // back. However, it can happen much later. Before we continue, we need to make sure that // the call being passed in is still the one we want to show in the notification. final Call call = getCallToShow(CallList.getInstance()); - if (call.getCallId() != originalCall.getCallId()) { + if (call == null || call.getCallId() != originalCall.getCallId()) { return; } @@ -251,8 +251,8 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener { // Add hang up option for any active calls (active | onhold), outgoing calls (dialing). if (state == Call.State.ACTIVE || - state == Call.State.DIALING || - state == Call.State.ONHOLD) { + state == Call.State.ONHOLD || + Call.State.isDialing(state)) { addHangupAction(builder); } @@ -370,7 +370,7 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener { } else if (call.getState() == Call.State.ONHOLD) { resId = R.string.notification_on_hold; - } else if (call.getState() == Call.State.DIALING) { + } else if (Call.State.isDialing(call.getState())) { resId = R.string.notification_dialing; } |