summaryrefslogtreecommitdiffstats
path: root/src/com/android/incallui/CallCardFragment.java
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2015-03-26 10:50:42 -0700
committerYorke Lee <yorkelee@google.com>2015-03-26 10:50:42 -0700
commit87445345ce0312abdce4114fd5c2b10f3e26ccb6 (patch)
tree8a12c2a98a425a5673bcaf2d89c5437563ed3dd4 /src/com/android/incallui/CallCardFragment.java
parent6e6c1b7f87ac57fe45609bf88e4b918fb2cb246c (diff)
parenta26a21d227598f350a6d545bf046ea805d4dca34 (diff)
downloadpackages_apps_InCallUI-87445345ce0312abdce4114fd5c2b10f3e26ccb6.tar.gz
packages_apps_InCallUI-87445345ce0312abdce4114fd5c2b10f3e26ccb6.tar.bz2
packages_apps_InCallUI-87445345ce0312abdce4114fd5c2b10f3e26ccb6.zip
merge changes from m-wireless
Change-Id: Id93b2d6e840baaa0b9b42b4595bca0dc41972994
Diffstat (limited to 'src/com/android/incallui/CallCardFragment.java')
-rw-r--r--src/com/android/incallui/CallCardFragment.java20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/com/android/incallui/CallCardFragment.java b/src/com/android/incallui/CallCardFragment.java
index 5f5146e1..94e4ef16 100644
--- a/src/com/android/incallui/CallCardFragment.java
+++ b/src/com/android/incallui/CallCardFragment.java
@@ -491,10 +491,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());
@@ -502,6 +503,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;
}
@@ -655,10 +660,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
@@ -672,7 +678,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) {
@@ -689,7 +695,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);
@@ -700,7 +706,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);