1
0
Fork 0

improved shutdown cleanup procedure to completely prevent the UI not disappearing when another keyboard is selected, and subsequent crashes

This commit is contained in:
sspanak 2024-08-01 17:39:02 +03:00 committed by Dimo Karaivanov
parent 770667cce9
commit 8a014dafea
2 changed files with 13 additions and 3 deletions

View file

@ -106,7 +106,6 @@ abstract public class CommandHandler extends TextEditingHandler {
suggestionOps.cancelDelayedAccept();
stopVoiceInput();
UI.showChangeKeyboardDialog(this);
onDeath();
}

View file

@ -29,7 +29,17 @@ public class TraditionalT9 extends MainViewHandler {
public boolean onEvaluateInputViewShown() {
super.onEvaluateInputViewShown();
setInputField(getCurrentInputConnection(), getCurrentInputEditorInfo());
return shouldBeVisible();
if (!shouldBeVisible()) {
return false;
}
if (SystemSettings.isTT9Enabled(this)) {
return true;
} else {
onDeath();
return false;
}
}
@ -177,14 +187,15 @@ public class TraditionalT9 extends MainViewHandler {
Logger.w("onDeath", "===> Killing self");
requestHideSelf(0);
onStop();
normalizationHandler.removeCallbacksAndMessages(null);
stopSelf();
}
@Override
public void onDestroy() {
super.onDestroy();
onDeath();
super.onDestroy();
}