mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-14 14:02:44 +00:00
avoid immediate switch to other app when language key switches both layouts and keyboard apps
This commit is contained in:
parent
0298973d91
commit
2a13ae186a
1 changed files with 2 additions and 5 deletions
|
@ -526,7 +526,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
|
|
||||||
final class SubtypeState {
|
final class SubtypeState {
|
||||||
private InputMethodSubtype mLastActiveSubtype;
|
private InputMethodSubtype mLastActiveSubtype;
|
||||||
private boolean mCurrentSubtypeHasBeenUsed;
|
private boolean mCurrentSubtypeHasBeenUsed = true; // starting with true avoids immediate switch
|
||||||
|
|
||||||
public void setCurrentSubtypeHasBeenUsed() {
|
public void setCurrentSubtypeHasBeenUsed() {
|
||||||
mCurrentSubtypeHasBeenUsed = true;
|
mCurrentSubtypeHasBeenUsed = true;
|
||||||
|
@ -1477,13 +1477,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
}
|
}
|
||||||
if (shouldSwitchToOtherInputMethods()) {
|
if (shouldSwitchToOtherInputMethods()) {
|
||||||
final InputMethodSubtype nextSubtype = mRichImm.getNextSubtypeInThisIme(false);
|
final InputMethodSubtype nextSubtype = mRichImm.getNextSubtypeInThisIme(false);
|
||||||
// todo (later): this will switch IME if we are at the end of the list, but ideally we
|
|
||||||
// want to switch IME only if all internal subtypes are unused
|
|
||||||
// -> need to store used/unused subtypes in mSubtypeState
|
|
||||||
if (nextSubtype != null) {
|
if (nextSubtype != null) {
|
||||||
switchToSubtype(nextSubtype);
|
switchToSubtype(nextSubtype);
|
||||||
return;
|
return;
|
||||||
} else if (switchInputMethod()){
|
} else if (switchInputMethod()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue