Fix jank when dismissing InputMethodAndSubtypeEnabler.

am: 6452b84

* commit '6452b84763f864139a3744bd3406f72a0014301a':
  Fix jank when dismissing InputMethodAndSubtypeEnabler.

Change-Id: I36ddc96a4551d0afee1b4334b6b01cb5f6305724
This commit is contained in:
Yohei Yukawa
2016-04-01 08:01:23 +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()) {