* @param resId resource id of the message
*/
public void setCarrierHelpText(int resId) {
- mCarrierHelpText = getContext().getText(resId);
+ mCarrierHelpText = getText(resId);
update(CARRIER_HELP_TEXT, mCarrierHelpText);
}
+ private CharSequence getText(int resId) {
+ return resId == 0 ? null : getContext().getText(resId);
+ }
+
/**
* Unlock help message. This is typically for help with unlock widgets, e.g. "wrong password"
* or "try again."
* @param lockIcon
*/
public void setHelpMessage(int textResId, int lockIcon) {
- mHelpMessageText = getContext().getString(textResId);
+ mHelpMessageText = getText(textResId).toString();
update(HELP_MESSAGE_TEXT, mHelpMessageText);
}