Index: chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestSection.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestSection.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestSection.java |
index 57cf28dded6b429baf653f3782ee11962403e7d0..11a091775d1221aa3dfd0bf982af096fdd73c485 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestSection.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestSection.java |
@@ -83,9 +83,6 @@ |
/** Called when the user requests adding a new PaymentOption to a given section. */ |
void onAddPaymentOption(OptionSection section); |
- /** Checks whether or not the text should be formatted with a bold label. */ |
- boolean isBoldLabelNeeded(OptionSection section); |
- |
/** Checks whether or not the user should be allowed to click on controls. */ |
boolean isAcceptingUserInput(); |
@@ -653,8 +650,7 @@ |
ApiCompatibilityUtils.setTextAppearance(labelView, isEnabled |
? R.style.PaymentsUiSectionDefaultText |
: R.style.PaymentsUiSectionDisabledText); |
- labelView.setText(convertOptionToString( |
- mOption, mDelegate.isBoldLabelNeeded(OptionSection.this))); |
+ labelView.setText(convertOptionToString(mOption)); |
labelView.setEnabled(isEnabled); |
} else if (mRowType == OPTION_ROW_TYPE_ADD) { |
// Shows string saying that the user can add a new option, e.g. credit card no. |
@@ -865,7 +861,7 @@ |
} |
} else { |
setLogoResource(selectedItem.getDrawableIconId()); |
- setSummaryText(convertOptionToString(selectedItem, false), null); |
+ setSummaryText(convertOptionToString(selectedItem), null); |
} |
} |
@@ -917,24 +913,9 @@ |
} |
} |
- private CharSequence convertOptionToString(PaymentOption item, boolean useBoldLabel) { |
- SpannableStringBuilder builder = new SpannableStringBuilder(item.getLabel()); |
- if (useBoldLabel) { |
- builder.setSpan( |
- new StyleSpan(android.graphics.Typeface.BOLD), 0, builder.length(), 0); |
- } |
- |
- if (!TextUtils.isEmpty(item.getSublabel())) { |
- if (builder.length() > 0) builder.append("\n"); |
- builder.append(item.getSublabel()); |
- } |
- |
- if (!TextUtils.isEmpty(item.getTertiaryLabel())) { |
- if (builder.length() > 0) builder.append("\n"); |
- builder.append(item.getTertiaryLabel()); |
- } |
- |
- return builder; |
+ private CharSequence convertOptionToString(PaymentOption item) { |
+ if (TextUtils.isEmpty(item.getSublabel())) return item.getLabel(); |
+ return new StringBuilder(item.getLabel()).append("\n").append(item.getSublabel()); |
} |
/** |