diff options
author | Jay Shrauner <shrauner@google.com> | 2013-11-21 10:08:35 -0800 |
---|---|---|
committer | Jay Shrauner <shrauner@google.com> | 2013-11-22 14:57:26 -0800 |
commit | 4862a2d7d9cd9b95af84018754d14c3bf45e0bad (patch) | |
tree | 08dcdfc8502bbb4c4dd0b48430604f65cac636c0 | |
parent | e7b74f0404391d9ab2f27dd36894dcfef15d837b (diff) |
Remove Google Voice gateway number
Remove gateway number from call card when making a call.
Bug:11591481
Change-Id: Ib96cdd223c4e61c8a55536df2bd1ecf59a0339c4
-rw-r--r-- | InCallUI/res/layout/primary_call_info.xml | 52 | ||||
-rw-r--r-- | InCallUI/src/com/android/incallui/CallCardFragment.java | 23 |
2 files changed, 15 insertions, 60 deletions
diff --git a/InCallUI/res/layout/primary_call_info.xml b/InCallUI/res/layout/primary_call_info.xml index 0d37a737a..d013f7022 100644 --- a/InCallUI/res/layout/primary_call_info.xml +++ b/InCallUI/res/layout/primary_call_info.xml @@ -123,8 +123,10 @@ android:background="@color/incall_secondary_info_background" android:animateLayoutChanges="true"> - <!-- Shown when a gateway provider is used during any outgoing call. --> - <LinearLayout android:id="@+id/providerInfo" + <!-- The "call state label": In some states, this shows a special + indication like "Dialing" or "Incoming call" or "Call ended". + It's unused for the normal case of an active ongoing call. --> + <TextView android:id="@+id/callStateLabel" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingTop="@dimen/provider_info_top_bottom_padding" @@ -132,48 +134,12 @@ android:paddingStart="@dimen/call_banner_side_padding" android:paddingEnd="@dimen/call_banner_side_padding" android:gravity="end" - android:orientation="horizontal" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textColor="@color/incall_call_banner_text_color" + android:textAllCaps="true" android:background="@android:color/transparent" - android:visibility="gone"> - <TextView android:id="@+id/providerLabel" - android:layout_width="0px" - android:layout_height="wrap_content" - android:layout_weight="6" - android:textAppearance="?android:attr/textAppearanceSmall" - android:textAllCaps="true" - android:textColor="@color/incall_call_banner_text_color" - android:singleLine="true" - android:ellipsize="marquee" /> - <TextView android:id="@+id/providerAddress" - android:layout_width="0px" - android:layout_height="wrap_content" - android:layout_weight="4" - android:gravity="end" - android:paddingStart="8dp" - android:textAppearance="?android:attr/textAppearanceSmall" - android:textAllCaps="true" - android:textColor="@color/incall_call_banner_text_color" - android:singleLine="true" - android:ellipsize="middle" /> - </LinearLayout> - - <!-- The "call state label": In some states, this shows a special - indication like "Dialing" or "Incoming call" or "Call ended". - It's unused for the normal case of an active ongoing call. --> - <TextView android:id="@+id/callStateLabel" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingTop="@dimen/provider_info_top_bottom_padding" - android:paddingBottom="@dimen/provider_info_top_bottom_padding" - android:paddingStart="@dimen/call_banner_side_padding" - android:paddingEnd="@dimen/call_banner_side_padding" - android:gravity="end" - android:textAppearance="?android:attr/textAppearanceSmall" - android:textColor="@color/incall_call_banner_text_color" - android:textAllCaps="true" - android:background="@android:color/transparent" - android:singleLine="true" - android:ellipsize="end"/> + android:singleLine="true" + android:ellipsize="end"/> </LinearLayout> </LinearLayout> diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java index 0d26b82cc..23c6d6d7d 100644 --- a/InCallUI/src/com/android/incallui/CallCardFragment.java +++ b/InCallUI/src/com/android/incallui/CallCardFragment.java @@ -51,9 +51,6 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr private TextView mCallTypeLabel; private ImageView mPhoto; private TextView mElapsedTime; - private View mProviderInfo; - private TextView mProviderLabel; - private TextView mProviderNumber; private ViewGroup mSupplementaryInfoContainer; // Secondary caller info @@ -112,9 +109,6 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr mCallStateLabel = (TextView) view.findViewById(R.id.callStateLabel); mCallTypeLabel = (TextView) view.findViewById(R.id.callTypeLabel); mElapsedTime = (TextView) view.findViewById(R.id.elapsedTime); - mProviderInfo = view.findViewById(R.id.providerInfo); - mProviderLabel = (TextView) view.findViewById(R.id.providerLabel); - mProviderNumber = (TextView) view.findViewById(R.id.providerAddress); mSupplementaryInfoContainer = (ViewGroup) view.findViewById(R.id.supplementary_info_container); } @@ -237,8 +231,12 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr String gatewayLabel, String gatewayNumber) { String callStateLabel = null; - // States other than disconnected not yet supported - callStateLabel = getCallStateLabelFromState(state, cause); + if (Call.State.isDialing(state) && !TextUtils.isEmpty(gatewayLabel)) { + // Provider info: (e.g. "Calling via <gatewayLabel>") + callStateLabel = gatewayLabel; + } else { + callStateLabel = getCallStateLabelFromState(state, cause); + } Log.v(this, "setCallState " + callStateLabel); Log.v(this, "DisconnectCause " + cause); @@ -275,15 +273,6 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr } } - // Provider info: (e.g. "Calling via <gatewayLabel>") - if (!TextUtils.isEmpty(gatewayLabel) && !TextUtils.isEmpty(gatewayNumber)) { - mProviderLabel.setText(gatewayLabel); - mProviderNumber.setText(gatewayNumber); - mProviderInfo.setVisibility(View.VISIBLE); - } else { - mProviderInfo.setVisibility(View.GONE); - } - // Restore the animation. if (skipAnimation) { mSupplementaryInfoContainer.setLayoutTransition(transition); |