Fix whitelist

Bug: 4090049
Change-Id: I1d57ddafcacb895196c65acaae198dad7499983b
main
satok 2011-05-26 20:25:51 +09:00
parent ea9098ca69
commit a0493fa070
3 changed files with 39 additions and 9 deletions

View 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>

View File

@ -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>

View File

@ -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 {