Merge "Fix whitelist"
This commit is contained in:
commit
375f45cd19
3 changed files with 39 additions and 9 deletions
38
java/res/values-en/whitelist.xml
Normal file
38
java/res/values-en/whitelist.xml
Normal file
|
@ -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
|
||||
-->
|
||||
<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>
|
||||
</resources>
|
||||
|
|
|
@ -39,6 +39,7 @@ public class WhitelistDictionary extends Dictionary {
|
|||
public static WhitelistDictionary init(Context context) {
|
||||
synchronized (sInstance) {
|
||||
if (context != null) {
|
||||
// Wordlist is initialized by the proper language in Suggestion.java#init
|
||||
sInstance.initWordlist(
|
||||
context.getResources().getStringArray(R.array.wordlist_whitelist));
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue