Merge "Register Ime consumer only when insets are enabled." into qt-dev

This commit is contained in:
Tarandeep Singh
2019-04-24 19:34:20 +00:00
committed by Android (Google) Code Review

View File

@@ -2814,10 +2814,14 @@ public final class ViewRootImpl implements ViewParent,
hasWindowFocus = mUpcomingWindowFocus;
inTouchMode = mUpcomingInTouchMode;
}
if (hasWindowFocus) {
mInsetsController.onWindowFocusGained();
} else {
mInsetsController.onWindowFocusLost();
if (sNewInsetsMode != NEW_INSETS_MODE_NONE) {
// TODO (b/131181940): Make sure this doesn't leak Activity with mActivityConfigCallback
// config changes.
if (hasWindowFocus) {
mInsetsController.onWindowFocusGained();
} else {
mInsetsController.onWindowFocusLost();
}
}
if (mAdded) {