Most logic is copied from previous ListPreference however 1. Create PreferenceController for it 2. Extract API to check whether to display CMDA options 3. In controller, provide API to force display dialog Bug: 114749736 Test: RunSettingsRoboTests Change-Id: Ic40d2ac1dc1854df9c90d912ea9fc822531b413d
104 lines
4.2 KiB
XML
104 lines
4.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (C) 2008 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.
|
|
-->
|
|
<PreferenceScreen
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
|
android:key="mobile_network_pref_screen"
|
|
android:title="@string/network_settings_title"
|
|
settings:initialExpandedChildrenCount="4">
|
|
|
|
<PreferenceScreen
|
|
android:key="cdma_lte_data_service_key"
|
|
android:title="@string/cdma_lte_data_service">
|
|
</PreferenceScreen>
|
|
|
|
<SwitchPreference
|
|
android:key="mobile_data_enable"
|
|
android:title="@string/mobile_data_settings_title"
|
|
android:summary="@string/mobile_data_settings_summary"
|
|
settings:controller="com.android.settings.network.telephony.MobileDataPreferenceController"/>
|
|
|
|
<com.android.settingslib.RestrictedSwitchPreference
|
|
android:key="button_roaming_key"
|
|
android:title="@string/roaming"
|
|
android:persistent="false"
|
|
android:summaryOn="@string/roaming_enable"
|
|
android:summaryOff="@string/roaming_disable"/>
|
|
|
|
<com.android.settings.network.telephony.DataUsagePreference
|
|
android:key="data_usage_summary"
|
|
android:title="@string/data_usage_title" />
|
|
|
|
<SwitchPreference
|
|
android:key="enhanced_4g_lte"
|
|
android:title="@string/enhanced_4g_lte_mode_title"
|
|
android:persistent="false"
|
|
android:summary="@string/enhanced_4g_lte_mode_summary"/>
|
|
|
|
<ListPreference
|
|
android:key="preferred_network_mode_key"
|
|
android:title="@string/preferred_network_mode_title"
|
|
android:summary="@string/preferred_network_mode_summary"
|
|
android:entries="@array/preferred_network_mode_choices"
|
|
android:entryValues="@array/preferred_network_mode_values"
|
|
android:dialogTitle="@string/preferred_network_mode_dialogtitle" />
|
|
|
|
<ListPreference
|
|
android:key="enabled_networks_key"
|
|
android:title="@string/preferred_network_mode_title"
|
|
android:summary="@string/preferred_network_mode_summary"
|
|
android:entries="@array/enabled_networks_choices"
|
|
android:entryValues="@array/enabled_networks_values"
|
|
android:dialogTitle="@string/preferred_network_mode_dialogtitle" />
|
|
|
|
<Preference
|
|
android:key="carrier_settings_euicc_key"
|
|
android:title="@string/carrier_settings_euicc" />
|
|
|
|
<PreferenceCategory
|
|
android:key="calling"
|
|
android:title="@string/call_category">
|
|
|
|
<PreferenceScreen
|
|
android:key="wifi_calling_key"
|
|
android:title="@string/wifi_calling_settings_title">
|
|
|
|
<intent android:action="android.intent.action.MAIN"
|
|
android:targetPackage="com.android.settings"
|
|
android:targetClass="com.android.settings.Settings$WifiCallingSettingsActivity">
|
|
<extra android:name="show_drawer_menu" android:value="true" />
|
|
</intent>
|
|
|
|
</PreferenceScreen>
|
|
|
|
<SwitchPreference
|
|
android:key="video_calling_key"
|
|
android:title="@string/video_calling_settings_title"
|
|
android:persistent="true"/>
|
|
|
|
</PreferenceCategory>
|
|
|
|
<ListPreference
|
|
android:key="cdma_system_select_key"
|
|
android:title="@string/cdma_system_select_title"
|
|
android:summary="@string/cdma_system_select_summary"
|
|
android:entries="@array/cdma_system_select_choices"
|
|
android:entryValues="@array/cdma_system_select_values"
|
|
android:dialogTitle="@string/cdma_system_select_dialogtitle"
|
|
settings:controller="com.android.settings.network.telephony.cdma.CdmaSystemSelectPreferenceController"/>
|
|
|
|
</PreferenceScreen>
|