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
13b1be98
Commit
13b1be98
authored
12 years ago
by
Kurt Partridge
Committed by
Android (Google) Code Review
12 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Log LatinIME.commitCurrentAutoCorrection()"
parents
c1b4d143
226377e6
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/latin/LatinIME.java
+5
-0
5 additions, 0 deletions
java/src/com/android/inputmethod/latin/LatinIME.java
java/src/com/android/inputmethod/research/ResearchLogger.java
+21
-1
21 additions, 1 deletion
.../src/com/android/inputmethod/research/ResearchLogger.java
with
26 additions
and
1 deletion
java/src/com/android/inputmethod/latin/LatinIME.java
+
5
−
0
View file @
13b1be98
...
...
@@ -2095,6 +2095,11 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
typedWord
,
autoCorrection
.
toString
(),
separatorString
,
mWordComposer
);
}
mExpectingUpdateSelection
=
true
;
if
(
ProductionFlag
.
IS_EXPERIMENTAL
)
{
ResearchLogger
.
latinIme_commitCurrentAutoCorrection
(
typedWord
,
autoCorrection
.
toString
(),
separatorString
);
}
commitChosenWord
(
autoCorrection
,
LastComposedWord
.
COMMIT_TYPE_DECIDED_WORD
,
separatorString
);
if
(!
typedWord
.
equals
(
autoCorrection
))
{
...
...
This diff is collapsed.
Click to expand it.
java/src/com/android/inputmethod/research/ResearchLogger.java
+
21
−
1
View file @
13b1be98
...
...
@@ -1243,6 +1243,26 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
completionInfo
);
}
/**
* Log a call to LatinIME.commitCurrentAutoCorrection().
*
* SystemResponse: The IME has committed an auto-correction. An auto-correction changes the raw
* text input to another word that the user more likely desired to type.
*/
private
static
final
LogStatement
LOGSTATEMENT_LATINIME_COMMITCURRENTAUTOCORRECTION
=
new
LogStatement
(
"LatinIMECommitCurrentAutoCorrection"
,
true
,
false
,
"typedWord"
,
"autoCorrection"
,
"separatorString"
);
public
static
void
latinIme_commitCurrentAutoCorrection
(
final
String
typedWord
,
final
String
autoCorrection
,
final
String
separatorString
)
{
final
String
scrubbedTypedWord
=
scrubDigitsFromString
(
typedWord
);
final
String
scrubbedAutoCorrection
=
scrubDigitsFromString
(
autoCorrection
);
final
ResearchLogger
researchLogger
=
getInstance
();
researchLogger
.
enqueueEvent
(
LOGSTATEMENT_LATINIME_COMMITCURRENTAUTOCORRECTION
,
scrubbedTypedWord
,
scrubbedAutoCorrection
,
separatorString
);
researchLogger
.
onWordComplete
(
scrubbedAutoCorrection
,
Long
.
MAX_VALUE
,
false
/* isPartial */
);
}
private
boolean
isExpectingCommitText
=
false
;
public
static
void
latinIME_commitPartialText
(
final
CharSequence
committedWord
,
final
long
lastTimestampOfWordData
)
{
...
...
@@ -1265,9 +1285,9 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
final
ResearchLogger
researchLogger
=
getInstance
();
final
String
scrubbedWord
=
scrubDigitsFromString
(
committedWord
.
toString
());
if
(!
researchLogger
.
isExpectingCommitText
)
{
researchLogger
.
onWordComplete
(
scrubbedWord
,
Long
.
MAX_VALUE
,
false
/* isPartial */
);
researchLogger
.
enqueueEvent
(
LOGSTATEMENT_RICHINPUTCONNECTIONCOMMITTEXT
,
newCursorPosition
);
researchLogger
.
onWordComplete
(
scrubbedWord
,
Long
.
MAX_VALUE
,
false
/* isPartial */
);
}
researchLogger
.
isExpectingCommitText
=
false
;
}
...
...
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