private CharSequence getBlockedMessage() { return ContactDisplayUtils.getTtsSpannedPhoneNumber(getResources(), R.string.snackbar_number_blocked, mDisplayNumber); }
private CharSequence getUnblockedMessage() { return ContactDisplayUtils.getTtsSpannedPhoneNumber(getResources(), R.string.snackbar_number_unblocked, mDisplayNumber); }
/** * Construct the "on {accountLabel} via {viaNumber}" accessibility description for the account * list item, depending on the existence of the accountLabel and viaNumber. * @param viaNumber The number that this call is being placed via. * @param accountLabel The {@link PhoneAccount} label that this call is being placed with. * @return The description of the account that this call has been placed on. */ public static CharSequence createAccountLabelDescription(Resources resources, @Nullable String viaNumber, @Nullable CharSequence accountLabel) { if((!TextUtils.isEmpty(viaNumber)) && !TextUtils.isEmpty(accountLabel)) { String msg = resources.getString(R.string.description_via_number_phone_account, accountLabel, viaNumber); CharSequence accountNumberLabel = ContactDisplayUtils.getTelephoneTtsSpannable(msg, viaNumber); return (accountNumberLabel == null) ? msg : accountNumberLabel; } else if (!TextUtils.isEmpty(viaNumber)) { CharSequence viaNumberLabel = ContactDisplayUtils.getTtsSpannedPhoneNumber(resources, R.string.description_via_number, viaNumber); return (viaNumberLabel == null) ? viaNumber : viaNumberLabel; } else if (!TextUtils.isEmpty(accountLabel)) { return TextUtils.expandTemplate( resources.getString(R.string.description_phone_account), accountLabel); } return ""; } }
CharSequence msg = ContactDisplayUtils.getTtsSpannedPhoneNumber( context.getResources(), R.string.menu_callNumber, name); Toast.makeText(context, msg, Toast.LENGTH_SHORT).show();
@Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); if (!FilteredNumbersUtil.canBlockNumber(getActivity(), mNumber, mCountryIso)) { dismiss(); Toast.makeText(getContext(), ContactDisplayUtils.getTtsSpannedPhoneNumber( getResources(), R.string.invalidNumber, mDisplayNumber), Toast.LENGTH_SHORT).show(); } }
@Override public void onCheckComplete(Integer id) { if (id == null) { BlockNumberDialogFragment.show( id, number, countryIso, PhoneNumberUtils.formatNumber(number, countryIso), R.id.blocked_numbers_activity_container, getFragmentManager(), BlockedListSearchFragment.this); } else { Toast.makeText(getContext(), ContactDisplayUtils.getTtsSpannedPhoneNumber(getResources(), R.string.alreadyBlocked, number), Toast.LENGTH_SHORT).show(); } } };
private void blockContactNumber(final String number, final Integer blockId) { if (blockId != null) { Toast.makeText(getContext(), ContactDisplayUtils.getTtsSpannedPhoneNumber( getResources(), R.string.alreadyBlocked, number), Toast.LENGTH_SHORT).show(); return; } BlockNumberDialogFragment.show( blockId, number, GeoUtil.getCurrentCountryIso(getContext()), number, R.id.blocked_numbers_activity_container, getFragmentManager(), this); } }
switch (shortcutType) { case SHORTCUT_DIRECT_CALL: text = ContactDisplayUtils.getTtsSpannedPhoneNumber(resources, R.string.search_shortcut_call_number, mBidiFormatter.unicodeWrap(number, TextDirectionHeuristics.LTR));
if (!success) { Toast.makeText(getContext(), ContactDisplayUtils.getTtsSpannedPhoneNumber( getResources(), R.string.invalidNumber, number), Toast.LENGTH_SHORT).show();
title = null; okText = getString(R.string.unblock_number_ok); message = ContactDisplayUtils.getTtsSpannedPhoneNumber(getResources(), R.string.unblock_number_confirmation_title, mDisplayNumber).toString(); } else { title = ContactDisplayUtils.getTtsSpannedPhoneNumber(getResources(), R.string.block_number_confirmation_title, mDisplayNumber);
CharSequence msg = ContactDisplayUtils.getTtsSpannedPhoneNumber( resources, R.string.notification_new_voicemail_ticker,