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
f1974572
Commit
f1974572
authored
11 years ago
by
Jean Chalard
Browse files
Options
Downloads
Patches
Plain Diff
Never pass negative values to setSelection.
Bug: 13136079 Change-Id: Ieae6bafbd5339a033f0f342ba9af7dcc4ce209fa
parent
2b72aa07
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/RichInputConnection.java
+6
-2
6 additions, 2 deletions
...rc/com/android/inputmethod/latin/RichInputConnection.java
with
6 additions
and
2 deletions
java/src/com/android/inputmethod/latin/RichInputConnection.java
+
6
−
2
View file @
f1974572
...
...
@@ -483,12 +483,16 @@ public final class RichInputConnection {
*
* @param start the character index where the selection should start.
* @param end the character index where the selection should end.
* @return Returns true on success, false if the input connection is no longer valid either when
* setting the selection or when retrieving the text cache at that point.
* @return Returns true on success, false on failure: either the input connection is no longer
* valid when setting the selection or when retrieving the text cache at that point, or
* invalid arguments were passed.
*/
public
boolean
setSelection
(
final
int
start
,
final
int
end
)
{
if
(
DEBUG_BATCH_NESTING
)
checkBatchEdit
();
if
(
DEBUG_PREVIOUS_TEXT
)
checkConsistencyForDebug
();
if
(
start
<
0
||
end
<
0
)
{
return
false
;
}
mExpectedSelStart
=
start
;
mExpectedSelEnd
=
end
;
if
(
null
!=
mIC
)
{
...
...
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