-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
removed check in shouldbeoff #364
Conversation
First, let me answer your question, why does The ultimate goal is to remove the state variable completely and just use some But never mind the above, it has nothing to do with your problem. The InputMethodService is always on, even if you don't see it, even it there is no focused text/number field and even if there is no opened app at the moment. This is why you can use the DPAD to select and start an application, or you can start typing numbers on the launcher screen and call someone. This is all normal. I believe the problem in your case is |
onFinishInputView() is what is called when I open a specific contact. When I navigate back, nothing is called (such as onStart or onStartInputView) so that is why when I press a button nothing happens. It recognizes the keypress but isActive is set to false so when it runs the shouldBeOff function it checks for isActive. |
* removed isActive and fixed a startup crash in onEvaluateInputViewShown() (#364, #385, #389) * fixed the MainView is visible in dropdowns or other non-text inputs (#367) * fixed logging settings not being applied at startup sometimes * code cleanup: remove using isThereText (#347) * removed the Messenger Lite hacks, since the app has been discontinued and no longer works --------- Co-authored-by: alexknop <knopalex@msu.edu> Co-authored-by: Alex Knop <alexknoptech@protonmail.com>
Problem:
On my Contacts app, I can type at the top
and when I select a contact, onFinishInputView() is called but not onFinishInput(), so the keyboard is still active,
but if I go back, the boolean isActive was already set to false, so number presses no longer activate the keyboard due to the check in shouldBeOff().
Solution:
Since it seems you want onFinishTyping() to be called in both onFinishInput() and onFinishInputView() in order to cover all bases, such as an app calling either one or both, I removed the check from shouldBeOff() so for scenarios where an app runs just onFinishInputView() and the user tries to type something, it works. shouldBeOff() is still looking at other factors.
With Fix:
Though in my phone's instance this could also be fixed by only calling onFinishTyping() in onFinishInput() and not onFinishInputView() so that isActive stays true. I wonder if this ever came up in your app testing and what apps I could try to work with these weird scenarios where it's necessary to call onFinishTyping() in onFinishInputView(). I have a few phones myself and haven't found a scenario where it's not calling onFinishInput() where it makes sense to.
P.S. We are also calling showWindow in forceShowWindowIfHidden() which may already take care of some of the logic that was once there, such as calling onRestart(), onEvaluateInputViewShown(), etc. Honestly, does implementing that on number presses now remove the need for isActive?