Fix jank when dismissing InputMethodAndSubtypeEnabler. am: 6452b84

am: 7be3dd3

* commit '7be3dd3ee3000a1db15ff163bc208f718358629b':
  Fix jank when dismissing InputMethodAndSubtypeEnabler.

Change-Id: I708b4a7f9274488c07db26145f364dcbe7e64524
This commit is contained in:
Yohei Yukawa
2016-04-01 08:05:31 +00:00
committed by android-build-merger
2 changed files with 6 additions and 3 deletions

View File

@@ -121,8 +121,6 @@ public class InputMethodAndSubtypeEnabler extends SettingsPreferenceFragment
@Override
public void onPause() {
super.onPause();
// Clear all subtypes of all IMEs to make sure
updateImplicitlyEnabledSubtypes(null /* targetImiId */, false /* check */);
InputMethodAndSubtypeUtil.saveInputMethodSubtypeList(this, getContentResolver(),
mInputMethodInfoList, mHaveHardKeyboard);
}

View File

@@ -209,7 +209,12 @@ class InputMethodAndSubtypeUtil {
needsToResetSelectedSubtype = true;
subtypePrefFound = true;
}
if (subtypePref.isChecked()) {
// Checking <code>subtypePref.isEnabled()</code> is insufficient to determine
// whether the user manually enabled this subtype or not. Implicitly-enabled
// subtypes are also checked just as an indicator to users. We also need to
// check <code>subtypePref.isEnabled()</code> so that only manually enabled
// subtypes can be saved here.
if (subtypePref.isEnabled() && subtypePref.isChecked()) {
subtypesSet.add(subtypeHashCodeStr);
if (isCurrentInputMethod) {
if (selectedInputMethodSubtype == subtype.hashCode()) {