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
4acdd3ad
Commit
4acdd3ad
authored
12 years ago
by
Kurt Partridge
Browse files
Options
Downloads
Patches
Plain Diff
[Rlog] Fix some potential NPEs
Change-Id: I07b18b5db81784dca32683e5f208088181c5eed9
parent
75e69753
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/research/ResearchLogger.java
+12
-2
12 additions, 2 deletions
.../src/com/android/inputmethod/research/ResearchLogger.java
with
12 additions
and
2 deletions
java/src/com/android/inputmethod/research/ResearchLogger.java
+
12
−
2
View file @
4acdd3ad
...
...
@@ -1202,7 +1202,12 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
public
static
void
latinIME_swapSwapperAndSpace
(
final
CharSequence
originalCharacters
,
final
String
charactersAfterSwap
)
{
final
ResearchLogger
researchLogger
=
getInstance
();
final
LogUnit
logUnit
=
researchLogger
.
mMainLogBuffer
.
peekLastLogUnit
();
final
LogUnit
logUnit
;
if
(
researchLogger
.
mMainLogBuffer
==
null
)
{
logUnit
=
null
;
}
else
{
logUnit
=
researchLogger
.
mMainLogBuffer
.
peekLastLogUnit
();
}
if
(
logUnit
!=
null
)
{
researchLogger
.
enqueueEvent
(
logUnit
,
LOGSTATEMENT_LATINIME_SWAPSWAPPERANDSPACE
,
originalCharacters
,
charactersAfterSwap
);
...
...
@@ -1273,7 +1278,12 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
final
String
originallyTypedWord
,
final
boolean
isBatchMode
)
{
final
ResearchLogger
researchLogger
=
getInstance
();
// TODO: Verify that mCurrentLogUnit has been restored and contains the reverted word.
final
LogUnit
logUnit
=
researchLogger
.
mMainLogBuffer
.
peekLastLogUnit
();
final
LogUnit
logUnit
;
if
(
researchLogger
.
mMainLogBuffer
==
null
)
{
logUnit
=
null
;
}
else
{
logUnit
=
researchLogger
.
mMainLogBuffer
.
peekLastLogUnit
();
}
if
(
originallyTypedWord
.
length
()
>
0
&&
hasLetters
(
originallyTypedWord
))
{
if
(
logUnit
!=
null
)
{
logUnit
.
setWord
(
originallyTypedWord
);
...
...
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