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
a690f3bc
Commit
a690f3bc
authored
11 years ago
by
Jean Chalard
Committed by
Android (Google) Code Review
11 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Readability improvement"
parents
173f74bb
fb72890a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/src/com/android/inputmethod/latin/LatinIME.java
+6
-2
6 additions, 2 deletions
java/src/com/android/inputmethod/latin/LatinIME.java
with
6 additions
and
2 deletions
java/src/com/android/inputmethod/latin/LatinIME.java
+
6
−
2
View file @
a690f3bc
...
...
@@ -928,14 +928,15 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
final
boolean
selectionChanged
=
mLastSelectionStart
!=
newSelStart
||
mLastSelectionEnd
!=
newSelEnd
;
// if composingSpanStart and composingSpanEnd are -1, it means there is no composing
// span in the view - we can use that to narrow down whether the cursor was moved
// by us or not. If we are composing a word but there is no composing span, then
// we know for sure the cursor moved while we were composing and we should reset
// the state. TODO: rescind this policy: the framework never removes the composing
// span on its own accord while editing. This test is useless.
final
boolean
noComposingSpan
=
composingSpanStart
==
-
1
&&
composingSpanEnd
==
-
1
;
// If the keyboard is not visible, we don't need to do all the housekeeping work, as it
// will be reset when the keyboard shows up anyway.
// TODO: revisit this when LatinIME supports hardware keyboards.
...
...
@@ -957,7 +958,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// state-related special processing to kick in.
mSpaceState
=
SPACE_STATE_NONE
;
if
((!
mWordComposer
.
isComposingWord
())
||
selectionChanged
||
noComposingSpan
)
{
// TODO: is it still necessary to test for composingSpan related stuff?
final
boolean
selectionChangedOrSafeToReset
=
selectionChanged
||
(!
mWordComposer
.
isComposingWord
())
||
noComposingSpan
;
if
(
selectionChangedOrSafeToReset
)
{
// If we are composing a word and moving the cursor, we would want to set a
// suggestion span for recorrection to work correctly. Unfortunately, that
// would involve the keyboard committing some new text, which would move the
...
...
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