Fix jank when dismissing InputMethodAndSubtypeEnabler.
am: 6452b84
* commit '6452b84763f864139a3744bd3406f72a0014301a':
Fix jank when dismissing InputMethodAndSubtypeEnabler.
Change-Id: I36ddc96a4551d0afee1b4334b6b01cb5f6305724
This commit is contained in:
@@ -121,8 +121,6 @@ public class InputMethodAndSubtypeEnabler extends SettingsPreferenceFragment
|
|||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
// Clear all subtypes of all IMEs to make sure
|
|
||||||
updateImplicitlyEnabledSubtypes(null /* targetImiId */, false /* check */);
|
|
||||||
InputMethodAndSubtypeUtil.saveInputMethodSubtypeList(this, getContentResolver(),
|
InputMethodAndSubtypeUtil.saveInputMethodSubtypeList(this, getContentResolver(),
|
||||||
mInputMethodInfoList, mHaveHardKeyboard);
|
mInputMethodInfoList, mHaveHardKeyboard);
|
||||||
}
|
}
|
||||||
|
@@ -209,7 +209,12 @@ class InputMethodAndSubtypeUtil {
|
|||||||
needsToResetSelectedSubtype = true;
|
needsToResetSelectedSubtype = true;
|
||||||
subtypePrefFound = 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);
|
subtypesSet.add(subtypeHashCodeStr);
|
||||||
if (isCurrentInputMethod) {
|
if (isCurrentInputMethod) {
|
||||||
if (selectedInputMethodSubtype == subtype.hashCode()) {
|
if (selectedInputMethodSubtype == subtype.hashCode()) {
|
||||||
|
Reference in New Issue
Block a user