LatinIME/java/src/com/android/inputmethod/latin
Ming-Shin Lu 6ae09365a5 Fix Keyboard Theme update when device orientation changed
As CL[1] introduces diplayContext to address
IME service context's Resources / DisplayMetrics update when
switching IME window to another display after onConfigurationChange.

In LatinIME#onInitializeInterface, we only update keyboard theme context
and displayContent when the displayId is changed, but overlooked even
the displayId is the same, the display context's resource configuration
might changed like the device orientation changd.

It leads getDefaultKeyboardHeight will get wrong config_max_keyboard_height
fraction value when rotating to landcape because the context resources
didn't get updated.

Add a check to update keyboard theme context when the current display
configuation is changed accordingly.

[1]: I0ed6a079af1ed90c75fee1d36d5ce3ef3c41f8ed

Fix: 186507147
Test: manual as issue steps
    1) Turn on auto-rotate
    2) Open Settings
    3) Rotating the device to landscape mode
    4) Tap “Search settings", verify if the soft-keyboard shown and the
       size is expected.
Change-Id: I288a31baf04fa2e63d6b4a14ad81b401cb36ece5
Merged-In: I288a31baf04fa2e63d6b4a14ad81b401cb36ece5
2021-06-18 02:16:19 +00:00
..
about Update language to comply with Android’s inclusive language guidance 2020-07-22 14:08:35 -07:00
accounts Migrated various apps under packages/inputmethods/LatinIME/ to androidx 2018-05-15 14:55:43 -07:00
define Merge java-overridable/ into java/ again 2018-05-06 20:46:17 -07:00
inputlogic Update language to comply with Android’s inclusive language guidance 2020-07-22 14:08:35 -07:00
makedict Fix dicttool build 2018-10-29 15:59:05 +09:00
network Fix Javadoc and null analysis related warnings 2014-10-23 09:58:42 +09:00
permissions Migrated various apps under packages/inputmethods/LatinIME/ to androidx 2018-05-15 14:55:43 -07:00
personalization Use BinaryDicitonary.MAX_PREV_WORD_COUNT_FOR_NGRAM for D2 dictioanries. 2015-03-17 11:43:16 -07:00
settings Update language to comply with Android’s inclusive language guidance 2020-07-22 14:08:35 -07:00
setup Migrated various apps under packages/inputmethods/LatinIME/ to androidx 2018-05-15 14:55:43 -07:00
spellcheck Migrated various apps under packages/inputmethods/LatinIME/ to androidx 2018-05-15 14:55:43 -07:00
suggestions Migrated various apps under packages/inputmethods/LatinIME/ to androidx 2018-05-15 14:55:43 -07:00
touchinputconsumer Merge java-overridable/ into java/ again 2018-05-06 20:46:17 -07:00
userdictionary Bring back shortcuts and add to dictionary UI 2015-07-06 17:32:13 -07:00
utils Update language to comply with Android’s inclusive language guidance 2020-07-22 14:08:35 -07:00
AssetFileAddress.java More verbosity when reporting broken dictionaries 2014-11-14 13:42:24 -08:00
AudioAndHapticFeedbackManager.java Move Constants.java to the latin.common package 2014-10-23 20:27:37 +09:00
BackupAgent.java Don't restore debug preferences 2014-10-13 18:59:48 -07:00
BinaryDictionary.java Add prev words context to the SuggestedWordInfo. 2015-03-19 16:07:04 -07:00
BinaryDictionaryFileDumper.java Update language to comply with Android's inclusive language guidance 2020-07-31 09:33:35 -06:00
BinaryDictionaryGetter.java Update language to comply with Android’s inclusive language guidance 2020-07-22 14:08:35 -07:00
ContactsBinaryDictionary.java [LatinIME] Support MNC permissions. 2015-07-15 22:51:53 +00:00
ContactsContentObserver.java [LatinIME] Support MNC permissions. 2015-07-15 22:51:53 +00:00
ContactsDictionaryConstants.java Add affinity model for contact names. 2015-04-16 11:33:54 -07:00
ContactsDictionaryUtils.java Refactor content provider code from ContactsDict 2015-02-11 16:29:14 -08:00
ContactsManager.java Add affinity model for contact names. 2015-04-16 11:33:54 -07:00
DicTraverseSession.java Move decoder specific constants to DecoderSpecificConstants.java 2015-02-05 13:27:36 -08:00
Dictionary.java Add shortcut support to UserDictionaryLookup. 2015-04-02 11:15:27 -07:00
DictionaryCollection.java Remove Dict dependency on WordComposer and ProximityInfo 2014-10-29 12:27:24 +09:00
DictionaryDumpBroadcastReceiver.java Add dictionary dump buttons in debug settings. 2014-02-04 21:29:09 +09:00
DictionaryFacilitator.java Look up thresholds during decoder reset. 2015-05-04 14:48:28 -07:00
DictionaryFacilitatorImpl.java [LatinIME] Support MNC permissions. 2015-07-15 22:51:53 +00:00
DictionaryFacilitatorLruCache.java Remove ALS from LatinIME. 2015-03-11 17:29:12 -07:00
DictionaryFacilitatorProvider.java Merge java-overridable/ into java/ again 2018-05-06 20:46:17 -07:00
DictionaryFactory.java Don't notify dictpack for updates for service dump 2015-03-27 11:10:00 -07:00
DictionaryPackInstallBroadcastReceiver.java Move util classes to the latin/utils directory 2013-06-24 17:04:40 +09:00
DictionaryStats.java Specify fileName argument as Nullable. 2015-04-23 14:12:33 -07:00
EmojiAltPhysicalKeyDetector.java Fix AltR+1 -> ESC shortcuts bringing on-screen keyboard 2015-11-03 17:36:15 +00:00
ExpandableBinaryDictionary.java Log interrupted tasks in AOSP. 2015-04-02 14:47:36 -07:00
InputAttributes.java Update language to comply with Android’s inclusive language guidance 2020-07-22 14:08:35 -07:00
InputView.java Fix Javadoc and null analysis related warnings 2014-10-23 09:58:42 +09:00
LastComposedWord.java Move decoder specific constants to DecoderSpecificConstants.java 2015-02-05 13:27:36 -08:00
LatinIME.java Fix Keyboard Theme update when device orientation changed 2021-06-18 02:16:19 +00:00
NgramContext.java Carry over the mMaxPreWordCount when creating the new NgramContext 2015-03-17 12:31:18 -07:00
PunctuationSuggestions.java Add prev words context to the SuggestedWordInfo. 2015-03-19 16:07:04 -07:00
ReadOnlyBinaryDictionary.java Remove Dict dependency on WordComposer and ProximityInfo 2014-10-29 12:27:24 +09:00
RichInputConnection.java Merge "Small optimization to eliminate a >0 check in RichInputConnection." into jb-ub-latinimegoogle 2015-06-24 19:44:37 +00:00
RichInputMethodManager.java Experimental automatic language switching support. 2016-01-22 02:24:28 -08:00
RichInputMethodSubtype.java Update LatinIME to comply with Android's inclusive language guidance 2020-08-12 13:07:02 +02:00
Suggest.java Update language to comply with Android's inclusive language guidance 2020-07-31 09:33:35 -06:00
SuggestedWords.java Add prev words context to the SuggestedWordInfo. 2015-03-19 16:07:04 -07:00
SystemBroadcastReceiver.java Do not force downloads on package replace. 2015-06-23 10:15:34 -07:00
UserBinaryDictionary.java Remove shortcut support from LatinIME. 2015-02-11 13:02:41 -08:00
WordComposer.java Race condition in cursor move. 2015-02-27 10:29:47 -08:00
WordListInfo.java Arrange to send the rawChecksum to LatinIME. 2014-05-22 11:01:04 +09:00