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

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

Merge "Set IME Switcher nav hint based on IME visibility" into main

parents d0a20212 43ce1d62
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -107,9 +107,11 @@ public class Utilities {
     * Gets the updated navigation icon hints, based on the current ones and the given IME state.
     *
     * @param oldHints        current navigation icon hints.
     * @param backDisposition the IME back disposition mode.
     * @param backDisposition the IME back disposition mode. Only takes effect if
     *                        {@code imeShown} is {@code true}.
     * @param imeShown        whether the IME is currently visible.
     * @param showImeSwitcher whether the IME Switcher button should be shown.
     * @param showImeSwitcher whether the IME Switcher button should be shown. Only takes effect if
     *                        {@code imeShown} is {@code true}.
     */
    @NavigationHint
    public static int calculateNavigationIconHints(@NavigationHint int oldHints,
@@ -134,7 +136,7 @@ public class Utilities {
        } else {
            hints &= ~NAVIGATION_HINT_IME_SHOWN;
        }
        if (showImeSwitcher) {
        if (showImeSwitcher && imeShown) {
            hints |= NAVIGATION_HINT_IME_SWITCHER_BUTTON_SHOWN;
        } else {
            hints &= ~NAVIGATION_HINT_IME_SWITCHER_BUTTON_SHOWN;
+0 −1
Original line number Diff line number Diff line
@@ -490,7 +490,6 @@ public class TaskbarDelegate implements CommandQueue.Callbacks,
            // Count imperceptible changes as visible so we transition taskbar out quickly.
            imeShown = (vis & InputMethodService.IME_VISIBLE_IMPERCEPTIBLE) != 0;
        }
        showImeSwitcher = imeShown && showImeSwitcher;
        int hints = Utilities.calculateNavigationIconHints(mNavigationIconHints, backDisposition,
                imeShown, showImeSwitcher);
        if (hints == mNavigationIconHints) {
+0 −1
Original line number Diff line number Diff line
@@ -1139,7 +1139,6 @@ public class NavigationBar extends ViewController<NavigationBarView> implements
            return;
        }
        boolean imeShown = mNavBarHelper.isImeShown(vis);
        showImeSwitcher = imeShown && showImeSwitcher;
        int hints = Utilities.calculateNavigationIconHints(mNavigationIconHints, backDisposition,
                imeShown, showImeSwitcher);
        if (hints == mNavigationIconHints) {