diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java index 44a2e97e6f04f..7e2be01feb014 100644 --- a/core/java/android/inputmethodservice/InputMethodService.java +++ b/core/java/android/inputmethodservice/InputMethodService.java @@ -1732,7 +1732,7 @@ public class InputMethodService extends AbstractInputMethodService { // If app window has portrait orientation, regardless of what display orientation // is, IME shouldn't use fullscreen-mode. || (mInputEditorInfo.internalImeOptions - & EditorInfo.IME_FLAG_APP_WINDOW_PORTRAIT) != 0) { + & EditorInfo.IME_INTERNAL_FLAG_APP_WINDOW_PORTRAIT) != 0) { return false; } return true; diff --git a/core/java/android/view/inputmethod/EditorInfo.java b/core/java/android/view/inputmethod/EditorInfo.java index 2df75f6570db1..bde4cb7c4fc3d 100644 --- a/core/java/android/view/inputmethod/EditorInfo.java +++ b/core/java/android/view/inputmethod/EditorInfo.java @@ -299,7 +299,7 @@ public class EditorInfo implements InputType, Parcelable { * {@link EditorInfo} is using {@link Configuration#ORIENTATION_PORTRAIT} mode. * @hide */ - public static final int IME_FLAG_APP_WINDOW_PORTRAIT = 0x80000000; + public static final int IME_INTERNAL_FLAG_APP_WINDOW_PORTRAIT = 0x00000001; /** * Generic unspecified type for {@link #imeOptions}. @@ -321,7 +321,6 @@ public class EditorInfo implements InputType, Parcelable { * 1 1 IME_ACTION_NEXT * 11 IME_ACTION_DONE * 111 IME_ACTION_PREVIOUS - * 1 IME_FLAG_APP_WINDOW_PORTRAIT * 1 IME_FLAG_NO_PERSONALIZED_LEARNING * 1 IME_FLAG_NO_FULLSCREEN * 1 IME_FLAG_NAVIGATE_PREVIOUS @@ -356,7 +355,7 @@ public class EditorInfo implements InputType, Parcelable { * Masks for {@link internalImeOptions} * *
- * 1 IME_FLAG_APP_WINDOW_PORTRAIT
+ * 1 IME_INTERNAL_FLAG_APP_WINDOW_PORTRAIT
* |-------|-------|-------|-------|
*/
@@ -984,6 +983,7 @@ public class EditorInfo implements InputType, Parcelable {
dest.writeInt(inputType);
dest.writeInt(imeOptions);
dest.writeString(privateImeOptions);
+ dest.writeInt(internalImeOptions);
TextUtils.writeToParcel(actionLabel, dest, flags);
dest.writeInt(actionId);
dest.writeInt(initialSelStart);
@@ -1019,6 +1019,7 @@ public class EditorInfo implements InputType, Parcelable {
res.inputType = source.readInt();
res.imeOptions = source.readInt();
res.privateImeOptions = source.readString();
+ res.internalImeOptions = source.readInt();
res.actionLabel = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(source);
res.actionId = source.readInt();
res.initialSelStart = source.readInt();
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 8cfbca88c5964..7966070659440 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -8750,7 +8750,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
}
if (getResources().getConfiguration().orientation == ORIENTATION_PORTRAIT) {
- outAttrs.internalImeOptions |= EditorInfo.IME_FLAG_APP_WINDOW_PORTRAIT;
+ outAttrs.internalImeOptions |= EditorInfo.IME_INTERNAL_FLAG_APP_WINDOW_PORTRAIT;
}
if (isMultilineInputType(outAttrs.inputType)) {
// Multi-line text editors should always show an enter key.