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

Commit 66ebc6ad authored by Casey Burkhardt's avatar Casey Burkhardt Committed by android-build-merger
Browse files

Merge "Ensures Accessibility button always overrides IME switcher" into oc-dev

am: 684607f7

Change-Id: I34b40003f5336c68bb6725ba8cc8023495f1f4bf
parents edafff3e 684607f7
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -417,7 +417,10 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
            getHomeButton().setImageDrawable(mHomeDefaultIcon);
        }

        final boolean showImeButton = ((hints & StatusBarManager.NAVIGATION_HINT_IME_SHOWN) != 0);
        // The Accessibility button always overrides the appearance of the IME switcher
        final boolean showImeButton =
                !mShowAccessibilityButton && ((hints & StatusBarManager.NAVIGATION_HINT_IME_SHOWN)
                        != 0);
        getImeSwitchButton().setVisibility(showImeButton ? View.VISIBLE : View.INVISIBLE);
        getImeSwitchButton().setImageDrawable(mImeIcon);

@@ -545,8 +548,9 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
        mShowAccessibilityButton = visible;
        mLongClickableAccessibilityButton = longClickable;
        if (visible) {
            // Accessibility button overrides Menu button.
            // Accessibility button overrides Menu and IME switcher buttons.
            setMenuVisibility(false, true);
            getImeSwitchButton().setVisibility(View.INVISIBLE);
        }

        getAccessibilityButton().setVisibility(visible ? View.VISIBLE : View.INVISIBLE);