summaryrefslogtreecommitdiffstats
path: root/core/java/com/android/internal/widget/EditableInputConnection.java
diff options
context:
space:
mode:
authorGilles Debunne <debunne@google.com>2011-01-27 15:55:29 -0800
committerGilles Debunne <debunne@google.com>2011-01-27 16:03:52 -0800
commitb7fc63f7aac3689696f7f84953009b5928ac3db3 (patch)
tree0dc9913bb8885bbcf198e22276db2ea741ce5ddf /core/java/com/android/internal/widget/EditableInputConnection.java
parent270cbcc16a72f982d84afeb5e3fd3f166936394a (diff)
downloadframeworks_base-b7fc63f7aac3689696f7f84953009b5928ac3db3.zip
frameworks_base-b7fc63f7aac3689696f7f84953009b5928ac3db3.tar.gz
frameworks_base-b7fc63f7aac3689696f7f84953009b5928ac3db3.tar.bz2
Fix for TextView's error popup behavior when using soft keyboard.
Bug 3370191 The documented behavior is to hide the error when the text changes. However, this should not be the case if the error was reset by a text watcher. Comparing errorBefore and errorAfter as was done before is not sufficient in the case where the error is reset to the same value. String pool optimization will re-use the same Object and it will look like the error has not been modified (hence the blinking behavior reported in the bug). For this reason, TextView has a mErrorWasChanged flag. The fix is to export methods that can use this flag as in done inside TextView when a physical keyboard is used. These methods are hidden. Change-Id: Ie3ec59a368f3b1588b81242890b971ac48e8ff7e
Diffstat (limited to 'core/java/com/android/internal/widget/EditableInputConnection.java')
-rw-r--r--core/java/com/android/internal/widget/EditableInputConnection.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/com/android/internal/widget/EditableInputConnection.java b/core/java/com/android/internal/widget/EditableInputConnection.java
index e992e7c..9f9f020 100644
--- a/core/java/com/android/internal/widget/EditableInputConnection.java
+++ b/core/java/com/android/internal/widget/EditableInputConnection.java
@@ -138,9 +138,9 @@ public class EditableInputConnection extends BaseInputConnection {
return super.commitText(text, newCursorPosition);
}
- CharSequence errorBefore = mTextView.getError();
+ mTextView.resetErrorChangedFlag();
boolean success = super.commitText(text, newCursorPosition);
- CharSequence errorAfter = mTextView.getError();
+ mTextView.hideErrorIfUnchanged();
return success;
}