Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -460,13 +460,10 @@ public boolean isLanguageSwitchKeyEnabled() {
if (!mShowsLanguageSwitchKey) {
return false;
}
// The behavior preference (mLanguageSwitchKeyToOtherImes / mLanguageSwitchKeyToOtherSubtypes)
// only controls what tapping the key does — it must not gate visibility, otherwise the
// toggle silently has no effect for users with a single enabled subtype (the common case).
final RichInputMethodManager imm = RichInputMethodManager.getInstance();
if (!mLanguageSwitchKeyToOtherSubtypes) {
return imm.hasMultipleEnabledIMEsOrSubtypes(false /* include aux subtypes */);
}
if (!mLanguageSwitchKeyToOtherImes) {
return imm.hasMultipleEnabledSubtypesInThisIme(false /* include aux subtypes */);
}
return imm.hasMultipleEnabledSubtypesInThisIme(false /* include aux subtypes */)
|| imm.hasMultipleEnabledIMEsOrSubtypes(false /* include aux subtypes */);
}
Expand Down