Fixed single line state on TextView.
singleLine flag is set to false by default. However, when no singleLine or input
type is provided, the inputType of the TextView is not set to
EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE for edit texts.
Change-Id: Id747d3319afcddb3ab6ae0463947e8b3e470ef73
diff --git a/core/java/android/inputmethodservice/ExtractEditText.java b/core/java/android/inputmethodservice/ExtractEditText.java
index b7d53e2..22968b0 100644
--- a/core/java/android/inputmethodservice/ExtractEditText.java
+++ b/core/java/android/inputmethodservice/ExtractEditText.java
@@ -109,6 +109,7 @@
/**
* We are always considered to be an input method target.
*/
+ @Override
public boolean isInputMethodTarget() {
return true;
}
@@ -125,7 +126,7 @@
* highlight and cursor will be displayed.
*/
@Override public boolean hasWindowFocus() {
- return this.isEnabled() ? true : false;
+ return this.isEnabled();
}
/**
@@ -133,7 +134,7 @@
* highlight and cursor will be displayed.
*/
@Override public boolean isFocused() {
- return this.isEnabled() ? true : false;
+ return this.isEnabled();
}
/**
@@ -141,6 +142,6 @@
* highlight and cursor will be displayed.
*/
@Override public boolean hasFocus() {
- return this.isEnabled() ? true : false;
+ return this.isEnabled();
}
}