Skip to content
Snippets Groups Projects
Commit 375f45cd authored by satok's avatar satok Committed by Android (Google) Code Review
Browse files

Merge "Fix whitelist"

parents 144e97f1 a0493fa0
No related branches found
No related tags found
No related merge requests found
<?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 @@ ...@@ -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 { ...@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment