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

Commit c9dbc123 authored by Winson Chung's avatar Winson Chung Committed by android-build-merger
Browse files

Merge "Ensure that the IME switcher button is always touchable" into qt-dev

am: f106e0a8

Change-Id: I00f6aa22ba7569e3980b1c086ebdf55b1a773911
parents 985f1299 f106e0a8
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -238,7 +238,19 @@ public class NavigationBarView extends FrameLayout implements
            info.setTouchableInsets(InternalInsetsInfo.TOUCHABLE_INSETS_FRAME);
            return;
        }

        info.setTouchableInsets(InternalInsetsInfo.TOUCHABLE_INSETS_REGION);
        ButtonDispatcher imeSwitchButton = getImeSwitchButton();
        if (imeSwitchButton.getVisibility() == VISIBLE) {
            // If the IME is not up, but the ime switch button is visible, then make sure that
            // button is touchable
            int[] loc = new int[2];
            View buttonView = imeSwitchButton.getCurrentView();
            buttonView.getLocationInWindow(loc);
            info.touchableRegion.set(loc[0], loc[1], loc[0] + buttonView.getWidth(),
                    loc[1] + buttonView.getHeight());
            return;
        }
        info.touchableRegion.setEmpty();
    };