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
4c45fff2
Commit
4c45fff2
authored
10 years ago
by
Keisuke Kuroyanagi
Committed by
Android (Google) Code Review
10 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Fix: NPE when initializing AOSP keyboard."
parents
ccfc824a
34ed5b07
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/personalization/PersonalizationDictionaryUpdater.java
+12
-3
12 additions, 3 deletions
...tin/personalization/PersonalizationDictionaryUpdater.java
with
12 additions
and
3 deletions
java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionaryUpdater.java
+
12
−
3
View file @
4c45fff2
...
...
@@ -23,11 +23,14 @@ import android.content.Context;
import
com.android.inputmethod.latin.DictionaryFacilitator
;
public
class
PersonalizationDictionaryUpdater
{
final
Context
mContext
;
final
DictionaryFacilitator
mDictionaryFacilitator
;
boolean
mDictCleared
=
false
;
public
PersonalizationDictionaryUpdater
(
final
Context
context
,
final
DictionaryFacilitator
dictionaryFacilitator
)
{
// Clear and never update the personalization dictionary.
PersonalizationHelper
.
removeAllPersonalizationDictionaries
(
context
);
dictionaryFacilitator
.
clearPersonalizationDictionary
();
mContext
=
context
;
mDictionaryFacilitator
=
dictionaryFacilitator
;
}
public
Locale
getLocale
()
{
...
...
@@ -36,6 +39,12 @@ public class PersonalizationDictionaryUpdater {
public
void
onLoadSettings
(
final
boolean
usePersonalizedDicts
,
final
boolean
isSystemLocaleSameAsLocaleOfAllEnabledSubtypesOfEnabledImes
)
{
if
(!
mDictCleared
)
{
// Clear and never update the personalization dictionary.
PersonalizationHelper
.
removeAllPersonalizationDictionaries
(
mContext
);
mDictionaryFacilitator
.
clearPersonalizationDictionary
();
mDictCleared
=
true
;
}
}
public
void
onDestroy
()
{
...
...
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