Add Input & Gesture/Language & Region pages under System.
- Removed LanguageAndInputDashboardAlias because now the contents are moved to new pages. Bug: 32637613 Bug: 32643833 Test: RunSettingsRoboTests Change-Id: Ia66a942a449a07b9cbba53bdc97738148aafadb4
This commit is contained in:
@@ -41,12 +41,14 @@ public class Settings extends SettingsActivity {
|
||||
public static class WifiSettingsActivity extends SettingsActivity { /* empty */ }
|
||||
public static class WifiP2pSettingsActivity extends SettingsActivity { /* empty */ }
|
||||
public static class InputMethodAndLanguageSettingsActivity extends SettingsActivity { /* empty */ }
|
||||
public static class InputAndGestureSettingsActivity extends SettingsActivity { /* empty */ }
|
||||
public static class AvailableVirtualKeyboardActivity extends SettingsActivity { /* empty */ }
|
||||
public static class KeyboardLayoutPickerActivity extends SettingsActivity { /* empty */ }
|
||||
public static class PhysicalKeyboardActivity extends SettingsActivity { /* empty */ }
|
||||
public static class InputMethodAndSubtypeEnablerActivity extends SettingsActivity { /* empty */ }
|
||||
public static class SpellCheckersSettingsActivity extends SettingsActivity { /* empty */ }
|
||||
public static class LocalePickerActivity extends SettingsActivity { /* empty */ }
|
||||
public static class LanguageAndRegionSettingsActivity extends SettingsActivity { /* empty */ }
|
||||
public static class UserDictionarySettingsActivity extends SettingsActivity { /* empty */ }
|
||||
public static class HomeSettingsActivity extends SettingsActivity { /* empty */ }
|
||||
public static class DisplaySettingsActivity extends SettingsActivity { /* empty */ }
|
||||
|
@@ -99,11 +99,13 @@ import com.android.settings.fuelgauge.PowerUsageDetail;
|
||||
import com.android.settings.fuelgauge.PowerUsageSummary;
|
||||
import com.android.settings.gestures.GestureSettings;
|
||||
import com.android.settings.inputmethod.AvailableVirtualKeyboardFragment;
|
||||
import com.android.settings.inputmethod.InputAndGestureSettings;
|
||||
import com.android.settings.inputmethod.InputMethodAndLanguageSettings;
|
||||
import com.android.settings.inputmethod.KeyboardLayoutPickerFragment;
|
||||
import com.android.settings.inputmethod.PhysicalKeyboardFragment;
|
||||
import com.android.settings.inputmethod.SpellCheckersSettings;
|
||||
import com.android.settings.inputmethod.UserDictionaryList;
|
||||
import com.android.settings.language.LanguageAndRegionSettings;
|
||||
import com.android.settings.localepicker.LocaleListEditor;
|
||||
import com.android.settings.location.LocationSettings;
|
||||
import com.android.settings.network.NetworkDashboardFragment;
|
||||
@@ -291,7 +293,8 @@ public class SettingsActivity extends SettingsDrawerActivity
|
||||
// Home page > Security
|
||||
"com.android.settings.Settings.LocationDashboardAlias",
|
||||
// Home page > System
|
||||
"com.android.settings.Settings.LanguageAndInputDashboardAlias",
|
||||
Settings.LanguageAndRegionSettingsActivity.class.getName(),
|
||||
Settings.InputAndGestureSettingsActivity.class.getName(),
|
||||
"com.android.settings.Settings.DateTimeDashboardAlias",
|
||||
"com.android.settings.Settings.AccessibilityDashboardAlias",
|
||||
"com.android.settings.Settings.AboutDeviceDashboardAlias",
|
||||
@@ -311,6 +314,8 @@ public class SettingsActivity extends SettingsDrawerActivity
|
||||
LocaleListEditor.class.getName(),
|
||||
InputMethodAndLanguageSettings.class.getName(),
|
||||
AvailableVirtualKeyboardFragment.class.getName(),
|
||||
InputAndGestureSettings.class.getName(),
|
||||
LanguageAndRegionSettings.class.getName(),
|
||||
SpellCheckersSettings.class.getName(),
|
||||
UserDictionaryList.class.getName(),
|
||||
UserDictionarySettings.class.getName(),
|
||||
|
@@ -40,6 +40,8 @@ public abstract class InstrumentedFragment extends ObservablePreferenceFragment
|
||||
protected final int NETWORK_CATEGORY_FRAGMENT = PLACEHOLDER_METRIC + 3;
|
||||
protected final int CONNECTED_DEVICE_CATEGORY_FRAGMENT = PLACEHOLDER_METRIC + 4;
|
||||
protected final int APP_AND_NOTIFICATION_CATEGORY_FRAGMENT = PLACEHOLDER_METRIC + 5;
|
||||
protected final int INPUT_AND_GESTURE_CATEGORY_FRAGMENT = PLACEHOLDER_METRIC + 6;
|
||||
protected final int LANGUAGE_AND_REGION_CATEGORY_FRAGMENT = PLACEHOLDER_METRIC + 7;
|
||||
|
||||
public InstrumentedFragment() {
|
||||
// Mixin that logs visibility change for activity.
|
||||
|
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright (C) 2016 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.settings.inputmethod;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.PreferenceController;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settingslib.drawer.CategoryKey;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class InputAndGestureSettings extends DashboardFragment {
|
||||
|
||||
private static final String TAG = "InputAndGestureSettings";
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return INPUT_AND_GESTURE_CATEGORY_FRAGMENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getCategoryKey() {
|
||||
return CategoryKey.CATEGORY_SYSTEM_INPUT;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getLogTag() {
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getPreferenceScreenResId() {
|
||||
return R.xml.input_and_gesture;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<PreferenceController> getPreferenceControllers(Context context) {
|
||||
final GameControllerPreferenceController gameControllerPreferenceController
|
||||
= new GameControllerPreferenceController(context);
|
||||
getLifecycle().addObserver(gameControllerPreferenceController);
|
||||
|
||||
final List<PreferenceController> controllers = new ArrayList<>();
|
||||
controllers.add(gameControllerPreferenceController);
|
||||
|
||||
return controllers;
|
||||
}
|
||||
}
|
@@ -51,6 +51,11 @@ import com.android.settingslib.drawer.CategoryKey;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @deprecated New features should use {@code InputAndGestureSettings} and
|
||||
* {@code LanguageAndRegionSettings} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public class InputMethodAndLanguageSettings extends DashboardFragment
|
||||
implements KeyboardLayoutDialogFragment.OnSetupKeyboardLayoutsListener, Indexable {
|
||||
|
||||
|
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Copyright (C) 2016 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.settings.language;
|
||||
|
||||
import android.content.Context;
|
||||
import android.speech.tts.TtsEngines;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.PreferenceController;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settings.inputmethod.SpellCheckerPreferenceController;
|
||||
import com.android.settingslib.drawer.CategoryKey;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LanguageAndRegionSettings extends DashboardFragment {
|
||||
|
||||
private static final String TAG = "LangAndRegionSettings";
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return LANGUAGE_AND_REGION_CATEGORY_FRAGMENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getCategoryKey() {
|
||||
return CategoryKey.CATEGORY_SYSTEM_LANGUAGE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getLogTag() {
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getPreferenceScreenResId() {
|
||||
return R.xml.language_and_region;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<PreferenceController> getPreferenceControllers(Context context) {
|
||||
final List<PreferenceController> controllers = new ArrayList<>();
|
||||
controllers.add(new PhoneLanguagePreferenceController(context));
|
||||
controllers.add(new SpellCheckerPreferenceController(context));
|
||||
controllers.add(new UserDictionaryPreferenceController(context));
|
||||
controllers.add(new TtsPreferenceController(context, new TtsEngines(context)));
|
||||
return controllers;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user