diff --git a/WordPressUtils/src/main/java/org/wordpress/android/util/EditTextUtils.java b/WordPressUtils/src/main/java/org/wordpress/android/util/EditTextUtils.java index 64ee67e566a9..66a0c77fdf8f 100644 --- a/WordPressUtils/src/main/java/org/wordpress/android/util/EditTextUtils.java +++ b/WordPressUtils/src/main/java/org/wordpress/android/util/EditTextUtils.java @@ -4,6 +4,7 @@ import android.text.TextUtils; import android.view.inputmethod.InputMethodManager; import android.widget.EditText; +import android.widget.TextView; /** * EditText utils @@ -14,13 +15,10 @@ private EditTextUtils() { } /** - * returns text string from passed EditText + * returns non-null text string from passed TextView */ - public static String getText(EditText edit) { - if (edit.getText() == null) { - return ""; - } - return edit.getText().toString(); + public static String getText(TextView textView) { + return (textView != null) ? textView.getText().toString() : ""; } /**