Merge "Fix NPE when calling PasswordViewEntry.getWindowInsetsController().hide()" into sc-dev am: 5235bc493d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15309902

Change-Id: I1a33101dd5aac59aee2f321f1036725fc40edd80
This commit is contained in:
TreeHugger Robot
2021-07-16 17:41:47 +00:00
committed by Automerger Merge Worker

View File

@@ -228,12 +228,16 @@ public class KeyguardPasswordViewController
super.onPause(); super.onPause();
}); });
} }
mPasswordEntry.getWindowInsetsController().hide(WindowInsets.Type.ime()); if (mPasswordEntry.isAttachedToWindow()) {
mPasswordEntry.getWindowInsetsController().hide(WindowInsets.Type.ime());
}
} }
@Override @Override
public void onStartingToHide() { public void onStartingToHide() {
mPasswordEntry.getWindowInsetsController().hide(WindowInsets.Type.ime()); if (mPasswordEntry.isAttachedToWindow()) {
mPasswordEntry.getWindowInsetsController().hide(WindowInsets.Type.ime());
}
} }
private void updateSwitchImeButton() { private void updateSwitchImeButton() {