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
e55d44c5
Commit
e55d44c5
authored
11 years ago
by
Keisuke Kuroyanagi
Committed by
Android (Google) Code Review
11 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Add a method to create dict with additional attributes."
parents
009bb564
18f91cf6
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/DecayingExpandableBinaryDictionaryBase.java
+12
-1
12 additions, 1 deletion
...rsonalization/DecayingExpandableBinaryDictionaryBase.java
with
12 additions
and
1 deletion
java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java
+
12
−
1
View file @
e55d44c5
...
...
@@ -50,6 +50,7 @@ public abstract class DecayingExpandableBinaryDictionaryBase extends ExpandableB
public
final
Locale
mLocale
;
private
final
String
mDictName
;
private
Map
<
String
,
String
>
mAdditionalAttributeMap
=
null
;
protected
DecayingExpandableBinaryDictionaryBase
(
final
Context
context
,
final
String
dictName
,
final
Locale
locale
,
final
String
dictionaryType
,
...
...
@@ -78,7 +79,10 @@ public abstract class DecayingExpandableBinaryDictionaryBase extends ExpandableB
@Override
protected
Map
<
String
,
String
>
getHeaderAttributeMap
()
{
HashMap
<
String
,
String
>
attributeMap
=
new
HashMap
<
String
,
String
>();
final
Map
<
String
,
String
>
attributeMap
=
new
HashMap
<
String
,
String
>();
if
(
mAdditionalAttributeMap
!=
null
)
{
attributeMap
.
putAll
(
mAdditionalAttributeMap
);
}
attributeMap
.
put
(
DictionaryHeader
.
USES_FORGETTING_CURVE_KEY
,
DictionaryHeader
.
ATTRIBUTE_VALUE_TRUE
);
attributeMap
.
put
(
DictionaryHeader
.
HAS_HISTORICAL_INFO_KEY
,
...
...
@@ -152,6 +156,13 @@ public abstract class DecayingExpandableBinaryDictionaryBase extends ExpandableB
asyncFlushBinaryDictionary
();
}
@UsedForTesting
public
void
clearAndFlushDictionaryWithAdditionalAttributes
(
final
Map
<
String
,
String
>
attributeMap
)
{
mAdditionalAttributeMap
=
attributeMap
;
clearAndFlushDictionary
();
}
/* package */
void
decayIfNeeded
()
{
runGCIfRequired
(
false
/* mindsBlockByGC */
);
}
...
...
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