Merge "Fix Keyboard Theme update when device orientation changed" am: 7ae00baa87 am: 16a01e7c0d am: 9d1ee4ae5a am: 524b30d70d

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

Change-Id: I1006b19a75f665776fb01db830a885617f7dfc1d
This commit is contained in:
Treehugger Robot 2021-05-28 07:10:53 +00:00 committed by Automerger Merge Worker
commit f8015171f8

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);