1/*
2 * Copyright (C) 2011 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
17package com.android.settings.inputmethod;
18
19import android.util.Log;
20import android.view.textservice.SpellCheckerInfo;
21import android.view.textservice.TextServicesManager;
22
23public class SpellCheckerUtils {
24    private static final String TAG = SpellCheckerUtils.class.getSimpleName();
25    private static final boolean DBG = false;
26    public static void setSpellCheckersEnabled(TextServicesManager tsm, boolean enable) {
27    }
28    public static boolean getSpellCheckersEnabled(TextServicesManager tsm) {
29        return true;
30    }
31    public static void setCurrentSpellChecker(TextServicesManager tsm, SpellCheckerInfo info) {
32    }
33    public static SpellCheckerInfo getCurrentSpellChecker(TextServicesManager tsm) {
34        final SpellCheckerInfo retval = tsm.getCurrentSpellChecker();
35        if (DBG) {
36            Log.d(TAG, "getCurrentSpellChecker: " + retval);
37        }
38        return retval;
39    }
40    public static SpellCheckerInfo[] getEnabledSpellCheckers(TextServicesManager tsm) {
41        final SpellCheckerInfo[] retval = tsm.getEnabledSpellCheckers();
42        if (DBG) {
43            Log.d(TAG, "get spell checkers: " + retval.length);
44        }
45        return retval;
46    }
47}
48