improved shutdown cleanup procedure to completely prevent the UI not disappearing when another keyboard is selected, and subsequent crashes
This commit is contained in:
parent
770667cce9
commit
8a014dafea
2 changed files with 13 additions and 3 deletions
|
|
@ -106,7 +106,6 @@ abstract public class CommandHandler extends TextEditingHandler {
|
||||||
suggestionOps.cancelDelayedAccept();
|
suggestionOps.cancelDelayedAccept();
|
||||||
stopVoiceInput();
|
stopVoiceInput();
|
||||||
UI.showChangeKeyboardDialog(this);
|
UI.showChangeKeyboardDialog(this);
|
||||||
onDeath();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,17 @@ public class TraditionalT9 extends MainViewHandler {
|
||||||
public boolean onEvaluateInputViewShown() {
|
public boolean onEvaluateInputViewShown() {
|
||||||
super.onEvaluateInputViewShown();
|
super.onEvaluateInputViewShown();
|
||||||
setInputField(getCurrentInputConnection(), getCurrentInputEditorInfo());
|
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");
|
Logger.w("onDeath", "===> Killing self");
|
||||||
requestHideSelf(0);
|
requestHideSelf(0);
|
||||||
onStop();
|
onStop();
|
||||||
|
normalizationHandler.removeCallbacksAndMessages(null);
|
||||||
stopSelf();
|
stopSelf();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
|
||||||
onDeath();
|
onDeath();
|
||||||
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue