parent
ea9098ca69
commit
a0493fa070
|
@ -0,0 +1,38 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
**
|
||||||
|
** Copyright 2011, The Android Open Source Project
|
||||||
|
**
|
||||||
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
** you may not use this file except in compliance with the License.
|
||||||
|
** You may obtain a copy of the License at
|
||||||
|
**
|
||||||
|
** http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
**
|
||||||
|
** Unless required by applicable law or agreed to in writing, software
|
||||||
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
** See the License for the specific language governing permissions and
|
||||||
|
** limitations under the License.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||||
|
<!--
|
||||||
|
An entry of the whitelist word should be:
|
||||||
|
1. (int)frequency
|
||||||
|
2. (String)before
|
||||||
|
3. (String)after
|
||||||
|
-->
|
||||||
|
<string-array name="wordlist_whitelist" translatable="false">
|
||||||
|
|
||||||
|
<item>255</item>
|
||||||
|
<item>ill</item>
|
||||||
|
<item>I\'ll</item>
|
||||||
|
|
||||||
|
<item>255</item>
|
||||||
|
<item>thisd</item>
|
||||||
|
<item>this\'d</item>
|
||||||
|
|
||||||
|
</string-array>
|
||||||
|
</resources>
|
|
@ -25,14 +25,5 @@
|
||||||
3. (String)after
|
3. (String)after
|
||||||
-->
|
-->
|
||||||
<string-array name="wordlist_whitelist">
|
<string-array name="wordlist_whitelist">
|
||||||
|
|
||||||
<item>255</item>
|
|
||||||
<item>ill</item>
|
|
||||||
<item>I\'ll</item>
|
|
||||||
|
|
||||||
<item>255</item>
|
|
||||||
<item>thisd</item>
|
|
||||||
<item>this\'d</item>
|
|
||||||
|
|
||||||
</string-array>
|
</string-array>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -39,6 +39,7 @@ public class WhitelistDictionary extends Dictionary {
|
||||||
public static WhitelistDictionary init(Context context) {
|
public static WhitelistDictionary init(Context context) {
|
||||||
synchronized (sInstance) {
|
synchronized (sInstance) {
|
||||||
if (context != null) {
|
if (context != null) {
|
||||||
|
// Wordlist is initialized by the proper language in Suggestion.java#init
|
||||||
sInstance.initWordlist(
|
sInstance.initWordlist(
|
||||||
context.getResources().getStringArray(R.array.wordlist_whitelist));
|
context.getResources().getStringArray(R.array.wordlist_whitelist));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue