summaryrefslogtreecommitdiff
path: root/InCallUI/src/com/android/incallui/CallCardFragment.java
diff options
context:
space:
mode:
Diffstat (limited to 'InCallUI/src/com/android/incallui/CallCardFragment.java')
-rw-r--r--InCallUI/src/com/android/incallui/CallCardFragment.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java
index 2b96a55a9..c2022d18c 100644
--- a/InCallUI/src/com/android/incallui/CallCardFragment.java
+++ b/InCallUI/src/com/android/incallui/CallCardFragment.java
@@ -131,6 +131,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
private TextView mCallTypeLabel;
private ImageView mHdAudioIcon;
private ImageView mForwardIcon;
+ private ImageView mSpamIcon;
private View mCallNumberAndLabel;
private TextView mElapsedTime;
private Drawable mPrimaryPhotoDrawable;
@@ -281,6 +282,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
mCallStateLabel = (TextView) view.findViewById(R.id.callStateLabel);
mHdAudioIcon = (ImageView) view.findViewById(R.id.hdAudioIcon);
mForwardIcon = (ImageView) view.findViewById(R.id.forwardIcon);
+ mSpamIcon = (ImageView) view.findViewById(R.id.spamIcon);
mCallNumberAndLabel = view.findViewById(R.id.labelAndNumber);
mCallTypeLabel = (TextView) view.findViewById(R.id.callTypeLabel);
mElapsedTime = (TextView) view.findViewById(R.id.elapsedTime);
@@ -915,7 +917,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
mElapsedTime.setText(callTimeElapsed);
String durationDescription =
- InCallDateUtils.formatDuration(getView().getContext(), duration);
+ InCallDateUtils.formatDuration(duration);
mElapsedTime.setContentDescription(
!TextUtils.isEmpty(durationDescription) ? durationDescription : null);
} else {
@@ -1216,6 +1218,19 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
mForwardIcon.setVisibility(visible ? View.VISIBLE : View.GONE);
}
+ /**
+ * Changes the visibility of the spam icon.
+ *
+ * @param visible {@code true} if the UI should show the spam icon.
+ */
+ @Override
+ public void showSpamIndicator(boolean visible) {
+ if (visible) {
+ mSpamIcon.setVisibility(View.VISIBLE);
+ mNumberLabel.setText(R.string.label_spam_caller);
+ mPhoneNumber.setVisibility(View.GONE);
+ }
+ }
/**
* Changes the visibility of the "manage conference call" button.