Skip to content

Commit 5acc379

Browse files
author
Fabrice Di Meglio
committed
Fix bug #7457897 Error icons are not shown in credit card entry form
- fix regression: the error icon was no more showing is the widget was not focused Change-Id: I24cc00a0cb79d38e365d413f9820b5a6981de4f4
1 parent 18f9518 commit 5acc379

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)