<!-- Title text for connecting to 24/7 available customer support [CHAR LIMIT=80]-->
<string name="support_escalation_24_7_title">We\'re here for you 24/7</string>
- <!-- Title text when customer support is closed [CHAR LIMIT=80]-->
- <string name="support_escalation_closed_title">Support closed</string>
-
<!-- Summary text for connecting to customer support [CHAR LIMIT=NONE]-->
<string name="support_escalation_summary">Our support team is here to address any issues</string>
<!-- Summary text when customer support is closed. [CHAR LIMIT=NONE]-->
<string name="support_escalation_closed_summary">Call us during support hours (local time)<br><b><xliff:g id="operation_hours">%s</xliff:g></b></string>
+ <!-- Summary text when customer support is unavailble in the region. [CHAR LIMIT=NONE]-->
+ <string name="support_escalation_unavailable_summary">Search help or explore tips & tricks</string>
+
<!-- Template for formatting support hours eg Mon - Fri, 8:00 AM - 19:30 PM. [CHAR LIMIT=NONE]-->
<string name="support_hour_format" translatable="false">
<xliff:g id="start_day">%s</xliff:g> - <xliff:g id="end_day">%s</xliff:g>, <xliff:g id="start_time">%s</xliff:g> - <xliff:g id="end_time">%s</xliff:g><br>
}
private void addEscalationCards() {
- if (mSupportFeatureProvider.isAlwaysOperating(PHONE, null /* countryCode */)
+ final boolean hasPhoneOperation =
+ mSupportFeatureProvider.isSupportTypeEnabled(mActivity, PHONE);
+ final boolean hasChatOperation =
+ mSupportFeatureProvider.isSupportTypeEnabled(mActivity, CHAT);
+ if (!hasPhoneOperation && !hasChatOperation) {
+ // No support at all.
+ mSupportData.add(new SupportData.Builder(mActivity, TYPE_TITLE)
+ .setText1(R.string.support_escalation_title)
+ .setText2(mActivity.getString(R.string.support_escalation_unavailable_summary))
+ .build());
+ } else if (mSupportFeatureProvider.isAlwaysOperating(PHONE, null /* countryCode */)
|| mSupportFeatureProvider.isAlwaysOperating(CHAT, null /* countryCode */)) {
+ // Support is available.
mSupportData.add(new SupportData.Builder(mActivity, TYPE_TITLE)
.setText1(R.string.support_escalation_24_7_title)
.setText2(mActivity.getString(R.string.support_escalation_24_7_summary))
.build());
} else if (mSupportFeatureProvider.isOperatingNow(PHONE)
|| mSupportFeatureProvider.isOperatingNow(CHAT)) {
+ // Support is available now.
mSupportData.add(new SupportData.Builder(mActivity, TYPE_TITLE)
.setText1(R.string.support_escalation_title)
.setText2(R.string.support_escalation_summary)
.build());
} else {
+ // Support is not temporarily unavailable.
mSupportData.add(new SupportData.Builder(mActivity, TYPE_TITLE)
- .setText1(R.string.support_escalation_closed_title)
+ .setText1(R.string.support_escalation_title)
.setText2(mSupportFeatureProvider.getOperationHours(mActivity, PHONE, null))
.build());
}
final SupportData.Builder builder =
new SupportData.Builder(mActivity, TYPE_ESCALATION_OPTIONS);
- if (mSupportFeatureProvider.isSupportTypeEnabled(mActivity, PHONE)) {
+ if (hasPhoneOperation) {
builder.setText1(R.string.support_escalation_by_phone);
builder.setSummary1(mSupportFeatureProvider.getEstimatedWaitTime(mActivity, PHONE));
builder.setEnabled1(mSupportFeatureProvider.isOperatingNow(PHONE));
}
- if (mSupportFeatureProvider.isSupportTypeEnabled(mActivity, CHAT)) {
+ if (hasChatOperation) {
builder.setText2(R.string.support_escalation_by_chat);
builder.setSummary2(mSupportFeatureProvider.getEstimatedWaitTime(mActivity, CHAT));
builder.setEnabled2(mSupportFeatureProvider.isOperatingNow(CHAT));