Merge "Fix Keyboard Theme update when device orientation changed" am: 7ae00baa87

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

Change-Id: I1d756d3f5a24e21b791ec0cd4726dadc1daa0759
main
Treehugger Robot 2021-05-28 06:00:13 +00:00 committed by Automerger Merge Worker
commit 16a01e7c0d
1 changed files with 2 additions and 1 deletions

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. // create new display context and re-init keyboard layout with this context.
final WindowManager wm = getSystemService(WindowManager.class); final WindowManager wm = getSystemService(WindowManager.class);
final int newDisplayId = wm.getDefaultDisplay().getDisplayId(); final int newDisplayId = wm.getDefaultDisplay().getDisplayId();
if (mCurDisplayId != newDisplayId) { if (mCurDisplayId != newDisplayId || !mDisplayContext.getResources().getConfiguration()
.equals(getResources().getConfiguration())) {
mCurDisplayId = newDisplayId; mCurDisplayId = newDisplayId;
mDisplayContext = createDisplayContext(wm.getDefaultDisplay()); mDisplayContext = createDisplayContext(wm.getDefaultDisplay());
mKeyboardSwitcher.updateKeyboardTheme(mDisplayContext); mKeyboardSwitcher.updateKeyboardTheme(mDisplayContext);