diff options
author | Andrew Lee <anwlee@google.com> | 2015-03-25 19:02:43 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2015-03-25 19:02:43 +0000 |
commit | 22875bb1d3fa4f023e6ca127a77159ab42bbbabc (patch) | |
tree | b2991edb40c4f06c78dff156018a4faa43307fe7 /InCallUI/src/com/android/incallui/CallCardFragment.java | |
parent | a42005350c1dd0aa956fe5f911f59e704b58c1c7 (diff) | |
parent | 82332c921b8dcef213700822e2404b005adab00c (diff) |
Don\'t show SSID for Wi-Fi calls.
automerge: 1a3d05d
* commit '1a3d05dc126773f0e0d32135f9b1018f1a4c8b5e':
Don't show SSID for Wi-Fi calls.
Diffstat (limited to 'InCallUI/src/com/android/incallui/CallCardFragment.java')
-rw-r--r-- | InCallUI/src/com/android/incallui/CallCardFragment.java | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java index cc7efe7f9..6550eecdc 100644 --- a/InCallUI/src/com/android/incallui/CallCardFragment.java +++ b/InCallUI/src/com/android/incallui/CallCardFragment.java @@ -488,10 +488,11 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr DisconnectCause disconnectCause, String connectionLabel, Drawable callStateIcon, - String gatewayNumber) { + String gatewayNumber, + boolean isWifi) { boolean isGatewayCall = !TextUtils.isEmpty(gatewayNumber); CharSequence callStateLabel = getCallStateLabelFromState(state, videoState, - sessionModificationState, disconnectCause, connectionLabel, isGatewayCall); + sessionModificationState, disconnectCause, connectionLabel, isGatewayCall, isWifi); Log.v(this, "setCallState " + callStateLabel); Log.v(this, "DisconnectCause " + disconnectCause.toString()); @@ -499,6 +500,10 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr if (TextUtils.equals(callStateLabel, mCallStateLabel.getText())) { // Nothing to do if the labels are the same + if (state == Call.State.ACTIVE || state == Call.State.CONFERENCED) { + mCallStateLabel.clearAnimation(); + mCallStateIcon.clearAnimation(); + } return; } @@ -652,10 +657,11 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr * 2. Ongoing calls will display the name of the provider. * 3. Incoming calls will only display "Incoming via..." for accounts. * 4. Video calls, and session modification states (eg. requesting video). + * 5. Incoming and active Wi-Fi calls will show label provided by hint. */ private CharSequence getCallStateLabelFromState(int state, int videoState, int sessionModificationState, DisconnectCause disconnectCause, String label, - boolean isGatewayCall) { + boolean isGatewayCall, boolean isWifi) { final Context context = getView().getContext(); CharSequence callStateLabel = null; // Label to display as part of the call banner @@ -669,7 +675,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr case Call.State.ACTIVE: // We normally don't show a "call state label" at all in this state // (but we can use the call state label to display the provider name). - if (isAccount) { + if (isAccount || isWifi) { callStateLabel = label; } else if (sessionModificationState == Call.SessionModificationState.REQUEST_FAILED) { @@ -686,7 +692,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr break; case Call.State.CONNECTING: case Call.State.DIALING: - if (isSpecialCall) { + if (isSpecialCall && !isWifi) { callStateLabel = context.getString(R.string.calling_via_template, label); } else { callStateLabel = context.getString(R.string.card_title_dialing); @@ -697,7 +703,9 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr break; case Call.State.INCOMING: case Call.State.CALL_WAITING: - if (isAccount) { + if (isWifi) { + callStateLabel = label; + } else if (isAccount) { callStateLabel = context.getString(R.string.incoming_via_template, label); } else if (VideoProfile.VideoState.isBidirectional(videoState)) { callStateLabel = context.getString(R.string.notification_incoming_video_call); |