summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNancy Chen <nancychen@google.com>2014-11-03 17:02:47 -0800
committerNancy Chen <nancychen@google.com>2014-11-03 17:02:47 -0800
commitab86f04c5ed385eafcd9099fa4ca50fd2f4c5c33 (patch)
treec2bd4b273f1f192bd2e005c1be892279c809594d
parentb5d055b15fcd9bbc083c88958e26c52a28b939dc (diff)
Remove provider icon from InCallUI.
Because we are now using the SIM color to designate which SIM is being used in the InCallUI, we are removing the icon from the primary and secondary call info fields. Bug: 18204058 Change-Id: Ibc0b74ce2a104e7aa506a2d200c0e1b9997df7d5
-rw-r--r--InCallUI/res/layout/secondary_call_info.xml8
-rw-r--r--InCallUI/src/com/android/incallui/CallCardFragment.java7
-rw-r--r--InCallUI/src/com/android/incallui/CallCardPresenter.java21
-rw-r--r--InCallUI/src/com/android/incallui/InCallActivity.java5
4 files changed, 8 insertions, 33 deletions
diff --git a/InCallUI/res/layout/secondary_call_info.xml b/InCallUI/res/layout/secondary_call_info.xml
index 8666c2ae8..a1d12a4df 100644
--- a/InCallUI/res/layout/secondary_call_info.xml
+++ b/InCallUI/res/layout/secondary_call_info.xml
@@ -69,14 +69,6 @@
android:orientation="horizontal"
android:visibility="gone" >
- <ImageView android:id="@+id/secondaryCallProviderIcon"
- android:layout_width="@dimen/call_provider_small_icon_size"
- android:layout_height="@dimen/call_provider_small_icon_size"
- android:layout_marginRight="2dp"
- android:baselineAlignBottom="true"
- android:scaleType="centerInside"
- android:tint="@color/incall_banner_secondary_text_color" />
-
<TextView android:id="@+id/secondaryCallProviderLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java
index a3804b15d..8b37c608a 100644
--- a/InCallUI/src/com/android/incallui/CallCardFragment.java
+++ b/InCallUI/src/com/android/incallui/CallCardFragment.java
@@ -90,7 +90,6 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
private TextView mSecondaryCallName;
private View mSecondaryCallProviderInfo;
private TextView mSecondaryCallProviderLabel;
- private ImageView mSecondaryCallProviderIcon;
private View mSecondaryCallConferenceCallIcon;
private View mProgressSpinner;
@@ -448,8 +447,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
@Override
public void setSecondary(boolean show, String name, boolean nameIsNumber, String label,
- String providerLabel, Drawable providerIcon, boolean isConference,
- boolean canManageConference) {
+ String providerLabel, boolean isConference, boolean canManageConference) {
if (show != mSecondaryCallInfo.isShown()) {
updateFabPositionForSecondaryCallInfo();
@@ -470,7 +468,6 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
mSecondaryCallName.setText(name);
if (hasProvider) {
mSecondaryCallProviderLabel.setText(providerLabel);
- mSecondaryCallProviderIcon.setImageDrawable(providerIcon);
}
int nameDirection = View.TEXT_DIRECTION_INHERIT;
@@ -727,8 +724,6 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
mSecondaryCallProviderInfo.setVisibility(View.VISIBLE);
mSecondaryCallProviderLabel = (TextView) getView()
.findViewById(R.id.secondaryCallProviderLabel);
- mSecondaryCallProviderIcon = (ImageView) getView()
- .findViewById(R.id.secondaryCallProviderIcon);
}
}
}
diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java
index ac85019bc..a757f09ab 100644
--- a/InCallUI/src/com/android/incallui/CallCardPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java
@@ -502,11 +502,10 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
final boolean nameIsNumber = nameForCall != null && nameForCall.equals(
mSecondaryContactInfo.number);
ui.setSecondary(true /* show */, nameForCall, nameIsNumber, mSecondaryContactInfo.label,
- getCallProviderLabel(mSecondary), getCallProviderIcon(mSecondary),
- isConference, canManageConference);
+ getCallProviderLabel(mSecondary), isConference, canManageConference);
} else {
// reset to nothing so that it starts off blank next time we use it.
- ui.setSecondary(false, null, false, null, null, null, isConference, canManageConference);
+ ui.setSecondary(false, null, false, null, null, isConference, canManageConference);
}
}
@@ -533,17 +532,6 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
}
/**
- * Return the Drawable object of the icon to display to the left of the connection label.
- */
- private Drawable getCallProviderIcon(Call call) {
- PhoneAccount account = getAccountForCall(call);
- if (account != null && getTelecomManager().hasMultipleCallCapableAccounts()) {
- return account.getIcon(mContext);
- }
- return null;
- }
-
- /**
* Return the string label to represent the call provider
*/
private String getCallProviderLabel(Call call) {
@@ -587,7 +575,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
return icon;
}
}
- return getCallProviderIcon(mPrimary);
+ return null;
}
private boolean hasOutgoingGatewayCall() {
@@ -671,8 +659,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
Drawable photo, boolean isConference, boolean canManageConference,
boolean isSipCall);
void setSecondary(boolean show, String name, boolean nameIsNumber, String label,
- String providerLabel, Drawable providerIcon, boolean isConference,
- boolean canManageConference);
+ String providerLabel, boolean isConference, boolean canManageConference);
void setCallState(int state, int videoState, int sessionModificationState,
DisconnectCause disconnectCause, String connectionLabel,
Drawable connectionIcon, String gatewayNumber);
diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java
index 2ccf59886..1444b11ce 100644
--- a/InCallUI/src/com/android/incallui/InCallActivity.java
+++ b/InCallUI/src/com/android/incallui/InCallActivity.java
@@ -552,8 +552,9 @@ public class InCallActivity extends Activity {
}
};
- SelectPhoneAccountDialogFragment.showAccountDialog(getFragmentManager(), true,
- phoneAccountHandles, listener);
+ SelectPhoneAccountDialogFragment.showAccountDialog(getFragmentManager(),
+ R.string.select_phone_account_for_calls, true, phoneAccountHandles,
+ listener);
} else {
mCallCardFragment.setVisible(true);
}