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
574b80aa
Commit
574b80aa
authored
12 years ago
by
Jean Chalard
Browse files
Options
Downloads
Patches
Plain Diff
Remove debug prints.
Bug: 7226098 Change-Id: Ibacb740022a6af56c9d555d6797dd402a89f6ca4
parent
6052a81e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
java/src/com/android/inputmethod/latin/LatinIME.java
+4
-0
4 additions, 0 deletions
java/src/com/android/inputmethod/latin/LatinIME.java
java/src/com/android/inputmethod/latin/RichInputConnection.java
+13
-12
13 additions, 12 deletions
...rc/com/android/inputmethod/latin/RichInputConnection.java
with
17 additions
and
12 deletions
java/src/com/android/inputmethod/latin/LatinIME.java
+
4
−
0
View file @
574b80aa
...
...
@@ -1878,6 +1878,10 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
mIsAutoCorrectionIndicatorOn
=
newAutoCorrectionIndicator
;
final
CharSequence
textWithUnderline
=
getTextWithUnderline
(
mWordComposer
.
getTypedWord
());
// TODO: when called from an updateSuggestionStrip() call that results from a posted
// message, this is called outside any batch edit. Potentially, this may result in some
// janky flickering of the screen, although the display speed makes it unlikely in
// the practice.
mConnection
.
setComposingText
(
textWithUnderline
,
1
);
}
}
...
...
This diff is collapsed.
Click to expand it.
java/src/com/android/inputmethod/latin/RichInputConnection.java
+
13
−
12
View file @
574b80aa
...
...
@@ -45,6 +45,7 @@ public final class RichInputConnection {
private
static
final
String
TAG
=
RichInputConnection
.
class
.
getSimpleName
();
private
static
final
boolean
DBG
=
false
;
private
static
final
boolean
DEBUG_PREVIOUS_TEXT
=
false
;
private
static
final
boolean
DEBUG_BATCH_NESTING
=
false
;
// Provision for a long word pair and a separator
private
static
final
int
LOOKBACK_CHARACTER_NUM
=
BinaryDictionary
.
MAX_WORD_LENGTH
*
2
+
1
;
private
static
final
Pattern
spaceRegex
=
Pattern
.
compile
(
"\\s+"
);
...
...
@@ -128,7 +129,7 @@ public final class RichInputConnection {
Log
.
e
(
TAG
,
"Nest level too deep : "
+
mNestLevel
);
}
}
checkBatchEdit
();
if
(
DEBUG_BATCH_NESTING
)
checkBatchEdit
();
if
(
DEBUG_PREVIOUS_TEXT
)
checkConsistencyForDebug
();
}
...
...
@@ -163,7 +164,7 @@ public final class RichInputConnection {
}
public
void
finishComposingText
()
{
checkBatchEdit
();
if
(
DEBUG_BATCH_NESTING
)
checkBatchEdit
();
if
(
DEBUG_PREVIOUS_TEXT
)
checkConsistencyForDebug
();
mCommittedTextBeforeComposingText
.
append
(
mComposingText
);
mCurrentCursorPosition
+=
mComposingText
.
length
();
...
...
@@ -177,7 +178,7 @@ public final class RichInputConnection {
}
public
void
commitText
(
final
CharSequence
text
,
final
int
i
)
{
checkBatchEdit
();
if
(
DEBUG_BATCH_NESTING
)
checkBatchEdit
();
if
(
DEBUG_PREVIOUS_TEXT
)
checkConsistencyForDebug
();
mCommittedTextBeforeComposingText
.
append
(
text
);
mCurrentCursorPosition
+=
text
.
length
()
-
mComposingText
.
length
();
...
...
@@ -247,7 +248,7 @@ public final class RichInputConnection {
}
public
void
deleteSurroundingText
(
final
int
i
,
final
int
j
)
{
checkBatchEdit
();
if
(
DEBUG_BATCH_NESTING
)
checkBatchEdit
();
final
int
remainingChars
=
mComposingText
.
length
()
-
i
;
if
(
remainingChars
>=
0
)
{
mComposingText
.
setLength
(
remainingChars
);
...
...
@@ -283,7 +284,7 @@ public final class RichInputConnection {
}
public
void
sendKeyEvent
(
final
KeyEvent
keyEvent
)
{
checkBatchEdit
();
if
(
DEBUG_BATCH_NESTING
)
checkBatchEdit
();
if
(
keyEvent
.
getAction
()
==
KeyEvent
.
ACTION_DOWN
)
{
if
(
DEBUG_PREVIOUS_TEXT
)
checkConsistencyForDebug
();
// This method is only called for enter or backspace when speaking to old
...
...
@@ -331,7 +332,7 @@ public final class RichInputConnection {
}
public
void
setComposingText
(
final
CharSequence
text
,
final
int
i
)
{
checkBatchEdit
();
if
(
DEBUG_BATCH_NESTING
)
checkBatchEdit
();
if
(
DEBUG_PREVIOUS_TEXT
)
checkConsistencyForDebug
();
mCurrentCursorPosition
+=
text
.
length
()
-
mComposingText
.
length
();
mComposingText
.
setLength
(
0
);
...
...
@@ -347,7 +348,7 @@ public final class RichInputConnection {
}
public
void
setSelection
(
final
int
from
,
final
int
to
)
{
checkBatchEdit
();
if
(
DEBUG_BATCH_NESTING
)
checkBatchEdit
();
if
(
DEBUG_PREVIOUS_TEXT
)
checkConsistencyForDebug
();
if
(
null
!=
mIC
)
{
mIC
.
setSelection
(
from
,
to
);
...
...
@@ -361,7 +362,7 @@ public final class RichInputConnection {
}
public
void
commitCorrection
(
final
CorrectionInfo
correctionInfo
)
{
checkBatchEdit
();
if
(
DEBUG_BATCH_NESTING
)
checkBatchEdit
();
if
(
DEBUG_PREVIOUS_TEXT
)
checkConsistencyForDebug
();
// This has no effect on the text field and does not change its content. It only makes
// TextView flash the text for a second based on indices contained in the argument.
...
...
@@ -375,7 +376,7 @@ public final class RichInputConnection {
}
public
void
commitCompletion
(
final
CompletionInfo
completionInfo
)
{
checkBatchEdit
();
if
(
DEBUG_BATCH_NESTING
)
checkBatchEdit
();
if
(
DEBUG_PREVIOUS_TEXT
)
checkConsistencyForDebug
();
final
CharSequence
text
=
completionInfo
.
getText
();
mCommittedTextBeforeComposingText
.
append
(
text
);
...
...
@@ -575,7 +576,7 @@ public final class RichInputConnection {
}
public
void
removeTrailingSpace
()
{
checkBatchEdit
();
if
(
DEBUG_BATCH_NESTING
)
checkBatchEdit
();
final
CharSequence
lastOne
=
getTextBeforeCursor
(
1
,
0
);
if
(
lastOne
!=
null
&&
lastOne
.
length
()
==
1
&&
lastOne
.
charAt
(
0
)
==
Keyboard
.
CODE_SPACE
)
{
...
...
@@ -631,7 +632,7 @@ public final class RichInputConnection {
}
public
boolean
revertDoubleSpace
()
{
checkBatchEdit
();
if
(
DEBUG_BATCH_NESTING
)
checkBatchEdit
();
// Here we test whether we indeed have a period and a space before us. This should not
// be needed, but it's there just in case something went wrong.
final
CharSequence
textBeforeCursor
=
getTextBeforeCursor
(
2
,
0
);
...
...
@@ -649,7 +650,7 @@ public final class RichInputConnection {
}
public
boolean
revertSwapPunctuation
()
{
checkBatchEdit
();
if
(
DEBUG_BATCH_NESTING
)
checkBatchEdit
();
// Here we test whether we indeed have a space and something else before us. This should not
// be needed, but it's there just in case something went wrong.
final
CharSequence
textBeforeCursor
=
getTextBeforeCursor
(
2
,
0
);
...
...
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