Fix Keyboard Theme update when device orientation changed am: 6ae09365a5

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/inputmethods/LatinIME/+/15021672

Change-Id: I33a6fa7093b4633fc5bbd535b2c3d9d287022bc8
This commit is contained in:
Ming-Shin Lu 2021-06-18 15:08:19 +00:00 committed by Automerger Merge Worker
commit 7f3bcefd9f

View file

@ -803,7 +803,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// create new display context and re-init keyboard layout with this context.
final WindowManager wm = getSystemService(WindowManager.class);
final int newDisplayId = wm.getDefaultDisplay().getDisplayId();
if (mCurDisplayId != newDisplayId) {
if (mCurDisplayId != newDisplayId || !mDisplayContext.getResources().getConfiguration()
.equals(getResources().getConfiguration())) {
mCurDisplayId = newDisplayId;
mDisplayContext = createDisplayContext(wm.getDefaultDisplay());
mKeyboardSwitcher.updateKeyboardTheme(mDisplayContext);