This change also eliminates a reference of
AudioAndHapticFeedbackManager from KeyboardSwitcher and MainKeyboard.
Bug: 6522943
Change-Id: Iac42ec8ff00c66deb76a660ffc07477923a58959
This is much better interface-wise. It eliminates all blinking
of the line in the practice.
Bug: 8874148
Bug: 8864306
Change-Id: I87754e44784327c2e9c8b162d598d145e20668e8
I548d899b introduced a new method to fix a sync miss between
the cursor position and the cached cursor position, but did not
take into account that it should also update the cached text
before and after the cursor in this case and that there was
already a method for doing this.
Change-Id: I31bd741893207c822827304e77791b1159774e1a
in the hope of avoiding UnsatisfiedLinkError. This is definitely not a
confident fix as we still don't know the root cause of the issue.
bug: 9325110
Change-Id: I1abf8031b98509f63fce6a2d069d497895ea712c
SpannableStrings are not the only type of Spanned, they are
only the mutable kind. SpannedString is the immutable one.
Spanned is the correct class to use there.
Bug: 8839763
Bug: 8862327
Change-Id: Ic5e6199a51f22368914f2748ac2d0d1ca6a33f78
This changes how the Range class stores its data, but not its
functionality. It also improves encapsulation a bit.
Bug: 8839763
Bug: 8862327
Change-Id: I5bd583b3fc96a99b93a2632882d8fd587c03ab76
The documentation for setComposingRegion states explicitly
that it does not move the cursor. This is just a bug.
This does not have any ill effects right now, but it will have
in later changes if not fixed.
As for the selection handling, the specific test that this code
removes used to serve a purpose, but it does not any more because
the code using the value has been much sanitized. Now the variable
can just take the obvious value, and become so self-explanatory
that the comments are unnecessary.
Change-Id: I548d899b38776bd3ab5f5361aab0d89d98f12e73
This will spare a lot of IPC for Latin IME at the cost of very little
retained memory.
This improves the loading by potentially a lot - between 15 and 30%
when the layout is cached (which should now be the case almost every
time), and half that if it's not. More importantly, it makes the
load time less sensitive to high device load, which is one of the
sore points.
Bug: 8689779
Change-Id: I2e07736f1a92c38eed0e203bc690761a181da8b9
This change utilizes the no panel auto more key feature to implement
long press shift key for shift lock.
Change-Id: I3995d25dc35aea3c67b5aa29299815462eff9cad
Now that separators have their own LogUnits, they must be uncommitted
from the LogBuffer when backspacing over them.
Bug: 9088919
Change-Id: Ib36cc94939b93abe18850a06bced17caf8aaa5b9
Currently when the user reverts a batch input, a LogUnit is uncommitted
from the LogBuffer. It should not be, because the LogUnit containing the
batch input is never committed in the first place (it is only committed
to the LogBuffer when a key is pressed or a new batch input is entered).
Bug: 9088919
Change-Id: I323af453ce082437a663ccae977b21b775a964bc
This should be done in onFinishInput rather than onFinishInputView
but for an unknown reason onFinishInput never comes.
Bug: 9113167
Change-Id: Iafb40846a3ed8fad78bfc160d17cd431f81fe891
Punctuation is currently put into the same LogUnit as the
following word. This is counter-intuitive and makes
post-processing more complicated.
This change causes punctuation to be put into its own
LogUnit.
A tricky case is the phantom space. A phantom space is
inserted right before other text, whose MotionEvents have
already been collected and inserted into mCurrentLogBuffer.
Phantom spaces are handled by creating their own LogUnit and
inserting it into the LogBuffer right before
mCurrentLogBuffer is shifted in.
Change-Id: I102d7cd93982ad37ba0abb6c1ac0f66b85b5f95d
When the user reverts a commit, this causes the committed
word to be changed. The user usually then goes back to edit
that word. Going back to edit causes an uncommit, so that
the editing actions are added onto the LogUnit containing
the operations used to construct the word.
But currently, reverting also involves its own
commit/uncommit pair, with the caller performing the
uncommit, and the commit happening inside the revert
command. This may have been necessary in the past, when
revert was called in different situations, but is
unnecessary now. Furthermore, the guarding conditions are
currently such that the uncommit doesn't always undo the
effects of the commit, corrupting the log output.
Change-Id: I74af41f4f1db2fcabfa496dcc4a2d7bd0af19b3a
- Don't call finishComposingText when useless.
- Add safeguards against calling setComposingRegion when the
data returned by the editor is inconsistent.
- Cancel pending recorrection messages when new messages arrive.
Bug: 8842941
Bug: 8845001
Change-Id: I939701033cf5c2bbd85871ecf83e329021ddeb91
Also, theoretically, we don't want to retrieve older suggestions if
there are no results for a recorrection - that would look random.
This bug addresses this too.
Bug: 8657919
Change-Id: I44f36d34a708a968ab71fa0592da57f4c97d4b7f
This is about as ad-hoc as it gets, but then again, what we want
is probably as ad-hoc as it gets.
All URL boxes I know of double as search bars, and not adding
automatic spaces there sucks (e.g. in Chrome URL bar).
And in other boxes actually you don't want to add a space if
it looks like a URL. QSB isn't even a search box, and it behaves
like this.
So I think this is actually the right answer to the problem.
Bug: 7062925
Change-Id: Ib09472b34644fd5bf2dc84bb97cedeeba28bcd02
The only place where it's used is checked for nullity.
Also, it's possible, also difficult, to match a different
recapitalize with the old code, triggering a bug that
this fixes.
Change-Id: I717d6df489025c75d1caca290a9086c3b39a9306
Upon pressing Shift, if there is currently a selected string, have
Latin IME change its capitalization.
This does not yet have the keyboard mode follow the mode - the change
is complicated enough as is.
Bug: 7657025
Change-Id: I54fe8485f44e04efd72c71ac9feee5ce21ba06f2
If the user gestures a word, then hits backspace in
disapproval, and gestures about the same thing again,
make sure that we don't suggest the same thing again.
Bug: 7549311
Change-Id: I793bc4df7c3841fa8f2f4146707c26e873f374c1
This uses the old suggestions. It does not try to recompute
new suggestions if there are no old suggestions yet: this is
coming in a later change.
If there are no suggestions, this shows the word itself
as a suggestion.
Bug: 8084810
Change-Id: I4c2e25df0ff3673be1825f57a0c19a9d23d47a48
Previously handleSeparator() caused the ResearchLogger to mark the time at which a LogUnit should be
broken. However, this causes the motion data associated with a separator to be associated with the
LogUnit of the previous word. This change corrects this bug.
Change-Id: I8b4d4fa6de2a013de9e2a28bb668c446a07f1957
Previously, ResearchLogger#onWordFinished() was called with an outdated parameter value for
isBatchMode, causing it to report false even for gestures. This changes fixes this problem.
Change-Id: Ifcabee236ba5fe20376ad882155d3f3142cd7613
Previously, ResearchLogger#stop() was called both in
LatinIME#onFinishInputView() and in LatinIME#onWindowHidden(). This
resulted in multiple logs being written.
Since onFinishInputView is the more reliable of the two (it is called
in InputMethodService#onDestroy; onWindowHidden is not), the code now
uses onFinishInputView as a stopping signal.
Change-Id: Iae4b8c3bdab226027624eeab19b3737367e4a108
This unifies the software and hardware keyboard code
under a single decision process that works.
Bug: 8129303
Bug: 8152758
Change-Id: I7574c563d5f957d57bfe62fe5e3eec59a519d335
- Add support for replaying log files to the ResearchLogger. This will let
users preview data that they choose to upload.
- When the user explicitly requests that the system record their action, it
will record everything up to, and including, the motion involved in shutting
off the recording. This change also removes the stop-recording motion
commands.
Change-Id: Ib1df383bbf1881512cb111fab9f6749c25e436ba
This change adds the following flags to the intent to lauch settings activity.
- Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
- Intent.FLAG_ACTIVITY_CLEAR_TOP
Bug: 8055342
Change-Id: I85284409bbba3fd284442e5ac4c7a55e58ad15ec
Heuristic to determine whether a word was a typo correction or a complete
replacement by examining a correction to see if it falls within the list of
suggested words of the original.
Change-Id: Ieec4861a811e96aef0d14622e662b589ef8b4772
The implementation is not really ready yet, so we want to
disable it for normal builds for now.
This goes together with Ic1edc6ed
Bug: 7987492
Change-Id: Id81f417e200c118f24424943823665f0b8bd6849
It would insert a space when it shouldn't when composing a
word ending in either dash or apostrophe and gesturing right
away.
Bug: 7889078
Change-Id: Ib3e2f6f5e551888cc081b464a641e2deac6f5ef7
ResearchLogger.latinIME_handleSeparator wasn't doing anything really specific to
the separator, so its implementation has been renamed according to its role.
Change-Id: I24e8691c7dc440dd067e96d23e50463683e17cfc
- Normal delete events are recorded
- Includes number of characters deleted for both batch and normal delete
Change-Id: I422da3ddc94fa0ccd6c7586eaacf14c62dd16679
- Fix function calls to happen at more resilient times
- In the case of phantom spaces, ensure that the logStatement goes to the
correct logUnit
Change-Id: Ida8f6eba1e4f33d9f9b4735316e3c6316ed316c0
This change moves dismiss timer of gesture floating preview text from
PreviewPlacerView to KeyboardView.
Bug: 7967461
Change-Id: I0ca5beddc93cb4bc4a405f914d217d37b997402b