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
28bd6e22
Commit
28bd6e22
authored
11 years ago
by
Jean Chalard
Browse files
Options
Downloads
Patches
Plain Diff
Only update shift state if left in auto mode.
Bug: 12100417 Change-Id: I7bc2b19332e142a257b0399f2e5d128caf01fc7c
parent
a245d15d
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
+10
-1
10 additions, 1 deletion
java/src/com/android/inputmethod/latin/LatinIME.java
with
10 additions
and
1 deletion
java/src/com/android/inputmethod/latin/LatinIME.java
+
10
−
1
View file @
28bd6e22
...
@@ -1799,10 +1799,19 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
...
@@ -1799,10 +1799,19 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
final
int
codePointBeforeCursor
=
mConnection
.
getCodePointBeforeCursor
();
final
int
codePointBeforeCursor
=
mConnection
.
getCodePointBeforeCursor
();
if
(
Character
.
isLetterOrDigit
(
codePointBeforeCursor
)
if
(
Character
.
isLetterOrDigit
(
codePointBeforeCursor
)
||
currentSettingsValues
.
isUsuallyFollowedBySpace
(
codePointBeforeCursor
))
{
||
currentSettingsValues
.
isUsuallyFollowedBySpace
(
codePointBeforeCursor
))
{
final
boolean
autoShiftHasBeenOverriden
=
mKeyboardSwitcher
.
getKeyboardShiftMode
()
!=
getCurrentAutoCapsState
();
mSpaceState
=
SPACE_STATE_PHANTOM
;
mSpaceState
=
SPACE_STATE_PHANTOM
;
if
(!
autoShiftHasBeenOverriden
)
{
// When we change the space state, we need to update the shift state of the
// keyboard unless it has been overridden manually. This is happening for example
// after typing some letters and a period, then gesturing; the keyboard is not in
// caps mode yet, but since a gesture is starting, it should go in caps mode,
// unless the user explictly said it should not.
mKeyboardSwitcher
.
updateShiftState
();
}
}
}
mConnection
.
endBatchEdit
();
mConnection
.
endBatchEdit
();
mKeyboardSwitcher
.
updateShiftState
();
mWordComposer
.
setCapitalizedModeAndPreviousWordAtStartComposingTime
(
getActualCapsMode
(),
mWordComposer
.
setCapitalizedModeAndPreviousWordAtStartComposingTime
(
getActualCapsMode
(),
// Prev word is 1st word before cursor
// Prev word is 1st word before cursor
getNthPreviousWordForSuggestion
(
currentSettingsValues
,
1
/* nthPreviousWord */
));
getNthPreviousWordForSuggestion
(
currentSettingsValues
,
1
/* nthPreviousWord */
));
...
...
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