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

Commit fdffe034 authored by Cosmin Băieș's avatar Cosmin Băieș Committed by Android (Google) Code Review
Browse files

Merge "Remove IME_VISIBLE_IMPERCEPTIBLE" into main

parents facb9af4 5cab3691
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -527,21 +527,12 @@ public class InputMethodService extends AbstractInputMethodService {
    public static final int IME_ACTIVE = 1 << 0;

    /**
     * The IME is perceptibly visible to the user.
     * The IME is visible.
     *
     * @hide
     */
    public static final int IME_VISIBLE = 1 << 1;

    /**
     * The IME is visible, but not yet perceptible to the user (e.g. fading in)
     * by {@link android.view.WindowInsetsController}.
     *
     * @see InputMethodManager#reportPerceptible
     * @hide
     */
    public static final int IME_VISIBLE_IMPERCEPTIBLE = 1 << 2;

    /**
     * The IME window visibility state.
     *
@@ -550,7 +541,6 @@ public class InputMethodService extends AbstractInputMethodService {
    @IntDef(flag = true, prefix = { "IME_" }, value = {
            IME_ACTIVE,
            IME_VISIBLE,
            IME_VISIBLE_IMPERCEPTIBLE,
    })
    public @interface ImeWindowVisibility {}

+1 −4
Original line number Diff line number Diff line
@@ -44,7 +44,6 @@ import android.app.StatusBarManager.WindowVisibleState;
import android.content.Context;
import android.graphics.Rect;
import android.hardware.display.DisplayManager;
import android.inputmethodservice.InputMethodService;
import android.inputmethodservice.InputMethodService.BackDispositionMode;
import android.inputmethodservice.InputMethodService.ImeWindowVisibility;
import android.os.Handler;
@@ -503,9 +502,7 @@ public class TaskbarDelegate implements CommandQueue.Callbacks,
    @Override
    public void setImeWindowStatus(int displayId, @ImeWindowVisibility int vis,
            @BackDispositionMode int backDisposition, boolean showImeSwitcher) {
        // Count imperceptible changes as visible so we transition taskbar out quickly.
        final boolean isImeVisible = mNavBarHelper.isImeVisible(vis)
                || (vis & InputMethodService.IME_VISIBLE_IMPERCEPTIBLE) != 0;
        final boolean isImeVisible = mNavBarHelper.isImeVisible(vis);
        final int flags = Utilities.updateNavbarFlagsFromIme(mNavbarFlags, backDisposition,
                isImeVisible, showImeSwitcher);
        if (flags == mNavbarFlags) {
+1 −6
Original line number Diff line number Diff line
@@ -2902,12 +2902,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
        final long ident = Binder.clearCallingIdentity();
        try {
            if (windowPerceptible != null && !windowPerceptible) {
                if ((vis & InputMethodService.IME_VISIBLE) != 0) {
                vis &= ~InputMethodService.IME_VISIBLE;
                    vis |= InputMethodService.IME_VISIBLE_IMPERCEPTIBLE;
                }
            } else {
                vis &= ~InputMethodService.IME_VISIBLE_IMPERCEPTIBLE;
            }
            final var curId = bindingController.getCurId();
            // TODO(b/305849394): Make mMenuController multi-user aware.