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
168d2c09
Commit
168d2c09
authored
13 years ago
by
satok
Committed by
Android (Google) Code Review
13 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Fix coordinates sent to native code"
parents
61de759f
691f1c17
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
java/src/com/android/inputmethod/keyboard/KeyDetector.java
+2
-2
2 additions, 2 deletions
java/src/com/android/inputmethod/keyboard/KeyDetector.java
java/src/com/android/inputmethod/latin/WordComposer.java
+14
-8
14 additions, 8 deletions
java/src/com/android/inputmethod/latin/WordComposer.java
with
16 additions
and
10 deletions
java/src/com/android/inputmethod/keyboard/KeyDetector.java
+
2
−
2
View file @
168d2c09
...
...
@@ -65,11 +65,11 @@ public class KeyDetector {
return
mKeyHysteresisDistanceSquared
;
}
p
rotected
int
getTouchX
(
int
x
)
{
p
ublic
int
getTouchX
(
int
x
)
{
return
x
+
mCorrectionX
;
}
p
rotected
int
getTouchY
(
int
y
)
{
p
ublic
int
getTouchY
(
int
y
)
{
return
y
+
mCorrectionY
;
}
...
...
This diff is collapsed.
Click to expand it.
java/src/com/android/inputmethod/latin/WordComposer.java
+
14
−
8
View file @
168d2c09
...
...
@@ -123,21 +123,27 @@ public class WordComposer {
}
// TODO: remove input keyDetector
public
void
add
(
int
primaryCode
,
int
keyX
,
int
keyY
,
KeyDetector
keyDetector
)
{
public
void
add
(
int
primaryCode
,
int
x
,
int
y
,
KeyDetector
keyDetector
)
{
final
int
[]
codes
;
if
(
keyX
==
KeyboardActionListener
.
SPELL_CHECKER_COORDINATE
||
keyY
==
KeyboardActionListener
.
SPELL_CHECKER_COORDINATE
)
{
final
int
keyX
;
final
int
keyY
;
if
(
x
==
KeyboardActionListener
.
SPELL_CHECKER_COORDINATE
||
y
==
KeyboardActionListener
.
SPELL_CHECKER_COORDINATE
)
{
// only used for tests in InputLogicTests
addKeyForSpellChecker
(
primaryCode
,
AndroidSpellCheckerService
.
SCRIPT_LATIN
);
return
;
}
else
if
(
keyX
==
KeyboardActionListener
.
SUGGESTION_STRIP_COORDINATE
||
keyY
==
KeyboardActionListener
.
SUGGESTION_STRIP_COORDINATE
||
keyX
==
KeyboardActionListener
.
NOT_A_TOUCH_COORDINATE
||
keyY
==
KeyboardActionListener
.
NOT_A_TOUCH_COORDINATE
)
{
}
else
if
(
x
==
KeyboardActionListener
.
SUGGESTION_STRIP_COORDINATE
||
y
==
KeyboardActionListener
.
SUGGESTION_STRIP_COORDINATE
||
x
==
KeyboardActionListener
.
NOT_A_TOUCH_COORDINATE
||
y
==
KeyboardActionListener
.
NOT_A_TOUCH_COORDINATE
)
{
codes
=
new
int
[]
{
primaryCode
};
keyX
=
x
;
keyY
=
y
;
}
else
{
codes
=
keyDetector
.
newCodeArray
();
keyDetector
.
getKeyAndNearbyCodes
(
keyX
,
keyY
,
codes
);
keyDetector
.
getKeyAndNearbyCodes
(
x
,
y
,
codes
);
keyX
=
keyDetector
.
getTouchX
(
x
);
keyY
=
keyDetector
.
getTouchX
(
y
);
}
add
(
primaryCode
,
codes
,
keyX
,
keyY
);
}
...
...
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