Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LatinIME
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
keyboard
LatinIME
Commits
e2e41dc2
Commit
e2e41dc2
authored
10 years ago
by
Ken Wakasa
Committed by
Android (Google) Code Review
10 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Revert "[CB22] Merge add and delete""
parents
a179f0a3
ef0498a8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/src/com/android/inputmethod/latin/WordComposer.java
+19
-13
19 additions, 13 deletions
java/src/com/android/inputmethod/latin/WordComposer.java
with
19 additions
and
13 deletions
java/src/com/android/inputmethod/latin/WordComposer.java
+
19
−
13
View file @
e2e41dc2
...
...
@@ -169,7 +169,26 @@ public final class WordComposer {
* coordinates.
*/
public
void
add
(
final
Event
event
)
{
final
int
primaryCode
=
event
.
mCodePoint
;
final
int
keyX
=
event
.
mX
;
final
int
keyY
=
event
.
mY
;
final
int
newIndex
=
size
();
processEvent
(
event
);
if
(
newIndex
<
MAX_WORD_LENGTH
)
{
mPrimaryKeyCodes
[
newIndex
]
=
primaryCode
>=
Constants
.
CODE_SPACE
?
Character
.
toLowerCase
(
primaryCode
)
:
primaryCode
;
// In the batch input mode, the {@code mInputPointers} holds batch input points and
// shouldn't be overridden by the "typed key" coordinates
// (See {@link #setBatchInputWord}).
if
(!
mIsBatchMode
)
{
// TODO: Set correct pointer id and time
mInputPointers
.
addPointerAt
(
newIndex
,
keyX
,
keyY
,
0
,
0
);
}
}
mIsFirstCharCapitalized
=
isFirstCharCapitalized
(
newIndex
,
primaryCode
,
mIsFirstCharCapitalized
);
if
(
Character
.
isUpperCase
(
primaryCode
))
mCapsCount
++;
if
(
Character
.
isDigit
(
primaryCode
))
mDigitsCount
++;
}
private
void
processEvent
(
final
Event
event
)
{
...
...
@@ -204,19 +223,6 @@ public final class WordComposer {
}
else
{
mTrailingSingleQuotesCount
=
0
;
}
if
(
newIndex
<
MAX_WORD_LENGTH
)
{
// In the batch input mode, the {@code mInputPointers} holds batch input points and
// shouldn't be overridden by the "typed key" coordinates
// (See {@link #setBatchInputWord}).
if
(!
mIsBatchMode
)
{
// TODO: Set correct pointer id and time
mInputPointers
.
addPointerAt
(
newIndex
,
keyX
,
keyY
,
0
,
0
);
}
}
mIsFirstCharCapitalized
=
isFirstCharCapitalized
(
newIndex
,
primaryCode
,
mIsFirstCharCapitalized
);
if
(
Character
.
isUpperCase
(
primaryCode
))
mCapsCount
++;
if
(
Character
.
isDigit
(
primaryCode
))
mDigitsCount
++;
}
mAutoCorrection
=
null
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment