1
0
Fork 0

reduced the zombie check interval

This commit is contained in:
sspanak 2024-08-26 10:56:19 +03:00 committed by Dimo Karaivanov
parent 2dd9de71da
commit 9e1feca96f
3 changed files with 3 additions and 3 deletions

View file

@ -21,7 +21,6 @@ abstract public class AbstractHandler extends InputMethodService {
abstract protected boolean onStart(InputConnection inputConnection, EditorInfo inputField); abstract protected boolean onStart(InputConnection inputConnection, EditorInfo inputField);
abstract protected void onFinishTyping(); abstract protected void onFinishTyping();
abstract protected void onStop(); abstract protected void onStop();
abstract protected void onDeath();
abstract protected void setInputField(InputConnection inputConnection, EditorInfo inputField); abstract protected void setInputField(InputConnection inputConnection, EditorInfo inputField);
// UI // UI

View file

@ -175,10 +175,10 @@ public class TraditionalT9 extends MainViewHandler {
* On Android 11 the IME is sometimes not killed when the user switches to a different one. * On Android 11 the IME is sometimes not killed when the user switches to a different one.
* Here we attempt to detect if we are disabled, then hide and kill ourselves. * Here we attempt to detect if we are disabled, then hide and kill ourselves.
*/ */
protected void onDeath() { private void onDeath() {
if (SystemSettings.isTT9Active(this)) { if (SystemSettings.isTT9Active(this)) {
Logger.w("onDeath", "===> Still active, rescheduling"); Logger.w("onDeath", "===> Still active, rescheduling");
deathDetector.postDelayed(this::onDeath, 2000); deathDetector.postDelayed(this::onDeath, SettingsStore.ZOMBIE_CHECK_INTERVAL);
return; return;
} else { } else {
deathDetector.removeCallbacksAndMessages(null); deathDetector.removeCallbacksAndMessages(null);

View file

@ -32,6 +32,7 @@ public class SettingsStore extends SettingsUI {
public final static int WORD_FREQUENCY_MAX = 25500; public final static int WORD_FREQUENCY_MAX = 25500;
public final static int WORD_FREQUENCY_NORMALIZATION_DIVIDER = 100; // normalized frequency = WORD_FREQUENCY_MAX / WORD_FREQUENCY_NORMALIZATION_DIVIDER public final static int WORD_FREQUENCY_NORMALIZATION_DIVIDER = 100; // normalized frequency = WORD_FREQUENCY_MAX / WORD_FREQUENCY_NORMALIZATION_DIVIDER
public final static int WORD_NORMALIZATION_DELAY = 15000; // ms public final static int WORD_NORMALIZATION_DELAY = 15000; // ms
public final static int ZOMBIE_CHECK_INTERVAL = 666; // ms
/************* hacks *************/ /************* hacks *************/
public final static int PREFERENCES_CLICK_DEBOUNCE_TIME = 250; // ms public final static int PREFERENCES_CLICK_DEBOUNCE_TIME = 250; // ms