Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d47a5be authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Make EditorInfo.internalImeOptions parcelable." into sc-dev am: 4b0a9bd7

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13416449

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9acfefabf68002376ee6933790078c45273d6aa1
parents 3c7359cf 4b0a9bd7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+4 −3
Original line number Diff line number Diff line
@@ -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}
     *
     * <pre>
     *  1                                IME_FLAG_APP_WINDOW_PORTRAIT
     *                                 1 IME_INTERNAL_FLAG_APP_WINDOW_PORTRAIT
     * |-------|-------|-------|-------|</pre>
     */

@@ -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();
+1 −1
Original line number Diff line number Diff line
@@ -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.