2013-10-09 05:19:24 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2013 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.utils;
|
|
|
|
|
|
|
|
import com.android.inputmethod.dictionarypack.DictionarySettingsFragment;
|
|
|
|
import com.android.inputmethod.latin.about.AboutPreferences;
|
2014-07-27 06:41:09 +00:00
|
|
|
import com.android.inputmethod.latin.settings.AdvancedSettingsFragment;
|
2014-07-27 06:28:48 +00:00
|
|
|
import com.android.inputmethod.latin.settings.CorrectionSettingsFragment;
|
2014-07-24 06:34:35 +00:00
|
|
|
import com.android.inputmethod.latin.settings.CustomInputStyleSettingsFragment;
|
2014-07-24 07:48:52 +00:00
|
|
|
import com.android.inputmethod.latin.settings.DebugSettingsFragment;
|
2014-07-27 06:28:48 +00:00
|
|
|
import com.android.inputmethod.latin.settings.GestureSettingsFragment;
|
2014-07-24 00:08:18 +00:00
|
|
|
import com.android.inputmethod.latin.settings.InputSettingsFragment;
|
2014-07-24 06:34:35 +00:00
|
|
|
import com.android.inputmethod.latin.settings.MultiLingualSettingsFragment;
|
2013-10-09 05:19:24 +00:00
|
|
|
import com.android.inputmethod.latin.settings.SettingsFragment;
|
2014-07-29 06:33:40 +00:00
|
|
|
import com.android.inputmethod.latin.settings.ThemeSettingsFragment;
|
2013-10-09 05:19:24 +00:00
|
|
|
import com.android.inputmethod.latin.spellcheck.SpellCheckerSettingsFragment;
|
|
|
|
import com.android.inputmethod.latin.userdictionary.UserDictionaryAddWordFragment;
|
|
|
|
import com.android.inputmethod.latin.userdictionary.UserDictionaryList;
|
|
|
|
import com.android.inputmethod.latin.userdictionary.UserDictionaryLocalePicker;
|
|
|
|
import com.android.inputmethod.latin.userdictionary.UserDictionarySettings;
|
|
|
|
|
|
|
|
import java.util.HashSet;
|
|
|
|
|
|
|
|
public class FragmentUtils {
|
2014-05-23 11:18:17 +00:00
|
|
|
private static final HashSet<String> sLatinImeFragments = new HashSet<>();
|
2013-10-09 05:19:24 +00:00
|
|
|
static {
|
|
|
|
sLatinImeFragments.add(DictionarySettingsFragment.class.getName());
|
|
|
|
sLatinImeFragments.add(AboutPreferences.class.getName());
|
2014-07-24 00:08:18 +00:00
|
|
|
sLatinImeFragments.add(InputSettingsFragment.class.getName());
|
2014-07-29 06:33:40 +00:00
|
|
|
sLatinImeFragments.add(ThemeSettingsFragment.class.getName());
|
2014-07-24 06:34:35 +00:00
|
|
|
sLatinImeFragments.add(MultiLingualSettingsFragment.class.getName());
|
|
|
|
sLatinImeFragments.add(CustomInputStyleSettingsFragment.class.getName());
|
2014-07-27 06:28:48 +00:00
|
|
|
sLatinImeFragments.add(GestureSettingsFragment.class.getName());
|
2014-07-27 06:28:48 +00:00
|
|
|
sLatinImeFragments.add(CorrectionSettingsFragment.class.getName());
|
2014-07-27 06:41:09 +00:00
|
|
|
sLatinImeFragments.add(AdvancedSettingsFragment.class.getName());
|
2014-07-24 07:48:52 +00:00
|
|
|
sLatinImeFragments.add(DebugSettingsFragment.class.getName());
|
2013-10-09 05:19:24 +00:00
|
|
|
sLatinImeFragments.add(SettingsFragment.class.getName());
|
|
|
|
sLatinImeFragments.add(SpellCheckerSettingsFragment.class.getName());
|
|
|
|
sLatinImeFragments.add(UserDictionaryAddWordFragment.class.getName());
|
|
|
|
sLatinImeFragments.add(UserDictionaryList.class.getName());
|
|
|
|
sLatinImeFragments.add(UserDictionaryLocalePicker.class.getName());
|
|
|
|
sLatinImeFragments.add(UserDictionarySettings.class.getName());
|
|
|
|
}
|
|
|
|
|
|
|
|
public static boolean isValidFragment(String fragmentName) {
|
|
|
|
return sLatinImeFragments.contains(fragmentName);
|
|
|
|
}
|
|
|
|
}
|