1 /*
2  * Copyright (C) 2013 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.inputmethod.latin.personalization;
18 
19 import android.content.Context;
20 
21 import com.android.inputmethod.annotations.UsedForTesting;
22 import com.android.inputmethod.latin.Dictionary;
23 
24 import java.io.File;
25 import java.util.Locale;
26 
27 public class PersonalizationDictionary extends DecayingExpandableBinaryDictionaryBase {
28     /* package */ static final String NAME = PersonalizationDictionary.class.getSimpleName();
29 
30     // TODO: Make this constructor private
PersonalizationDictionary(final Context context, final Locale locale)31     /* package */ PersonalizationDictionary(final Context context, final Locale locale) {
32         super(context, getDictName(NAME, locale, null /* dictFile */), locale,
33                 Dictionary.TYPE_PERSONALIZATION, null /* dictFile */);
34     }
35 
36     @UsedForTesting
getDictionary(final Context context, final Locale locale, final File dictFile, final String dictNamePrefix)37     public static PersonalizationDictionary getDictionary(final Context context,
38             final Locale locale, final File dictFile, final String dictNamePrefix) {
39         return PersonalizationHelper.getPersonalizationDictionary(context, locale);
40     }
41 }
42