Skip to content

Commit 9d82d32

Browse files
Fabrice Di MeglioAndroid (Google) Code Review
authored andcommitted
Merge "Fix bug #7457897 Error icons are not shown in credit card entry form" into jb-mr1.1-dev
2 parents c1d5db7 + 5acc379 commit 9d82d32

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

core/java/android/widget/Editor.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ public void setError(CharSequence error, Drawable icon) {
291291
mErrorWasChanged = true;
292292

293293
if (mError == null) {
294+
setErrorIcon(null);
294295
if (mErrorPopup != null) {
295296
if (mErrorPopup.isShowing()) {
296297
mErrorPopup.dismiss();
@@ -299,10 +300,11 @@ public void setError(CharSequence error, Drawable icon) {
299300
mErrorPopup = null;
300301
}
301302

302-
setErrorIcon(null);
303-
} else if (mTextView.isFocused()) {
304-
showError();
303+
} else {
305304
setErrorIcon(icon);
305+
if (mTextView.isFocused()) {
306+
showError();
307+
}
306308
}
307309
}
308310

@@ -321,8 +323,6 @@ private void hideError() {
321323
if (mErrorPopup.isShowing()) {
322324
mErrorPopup.dismiss();
323325
}
324-
325-
setErrorIcon(null);
326326
}
327327

328328
mShowErrorAfterAttach = false;

0 commit comments

Comments
 (0)