2012-04-23 17:45:48 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2012 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
package com.android.inputmethod.latin;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
|
|
|
|
import com.android.inputmethod.keyboard.ProximityInfo;
|
2012-06-12 21:57:40 +00:00
|
|
|
import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
2012-04-23 17:45:48 +00:00
|
|
|
|
2012-09-27 09:16:16 +00:00
|
|
|
public final class SynchronouslyLoadedUserBinaryDictionary extends UserBinaryDictionary {
|
2012-04-23 17:45:48 +00:00
|
|
|
|
|
|
|
public SynchronouslyLoadedUserBinaryDictionary(final Context context, final String locale) {
|
|
|
|
this(context, locale, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
public SynchronouslyLoadedUserBinaryDictionary(final Context context, final String locale,
|
|
|
|
final boolean alsoUseMoreRestrictiveLocales) {
|
|
|
|
super(context, locale, alsoUseMoreRestrictiveLocales);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2012-07-09 11:13:22 +00:00
|
|
|
public synchronized ArrayList<SuggestedWordInfo> getSuggestions(final WordComposer codes,
|
2013-05-01 11:36:36 +00:00
|
|
|
final String prevWordForBigrams, final ProximityInfo proximityInfo,
|
2013-08-28 10:24:28 +00:00
|
|
|
final boolean blockOffensiveWords, final int[] additionalFeaturesOptions) {
|
2012-04-23 17:45:48 +00:00
|
|
|
syncReloadDictionaryIfRequired();
|
2013-08-28 10:24:28 +00:00
|
|
|
return super.getSuggestions(codes, prevWordForBigrams, proximityInfo, blockOffensiveWords,
|
|
|
|
additionalFeaturesOptions);
|
2012-04-23 17:45:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2012-10-03 06:19:43 +00:00
|
|
|
public synchronized boolean isValidWord(final String word) {
|
2012-04-23 17:45:48 +00:00
|
|
|
syncReloadDictionaryIfRequired();
|
|
|
|
return isValidWordInner(word);
|
|
|
|
}
|
|
|
|
}
|