Merge "Ensure that the IME switcher button is always touchable" into qt-dev am: f106e0a8fa am: c9dbc123ca

am: 52b1251305

Change-Id: I34f317596f1745f5cdd42e8ff163171d45286dd4
This commit is contained in:
Winson Chung
2019-06-05 15:11:03 -07:00
committed by android-build-merger

View File

@@ -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();
};