Merge "Network Operator" into "Mobile network" main activity.
Re-write "Network Operator" setting section. Now auto and manual
network select buttons are SwitchPreference and ListPreference
respectively. They are moret tightly coupled and merged into
"Mobile network" main fragment.
Network select button is now a customized ListPreference, which
start network query when clicked, and show query result as list
of networks to choose from.
Test: manual
Bug: 62200802
Change-Id: I8dd796462e14eb6272371bfcc580ad94d199bb67
Merged-In: I8dd796462e14eb6272371bfcc580ad94d199bb67
diff --git a/res/values/config.xml b/res/values/config.xml
index 0d0bd22..615d43f 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -153,10 +153,10 @@
<!-- Class name for the default main Dialer activity [DO NOT TRANSLATE] -->
<string name="dialer_default_class" translatable="false">com.android.dialer.DialtactsActivity</string>
- <!-- Package name for the network operator settings [DO NOT TRANSLATE] -->
- <string name="network_operator_settings_package" translatable="false">com.android.phone</string>
- <!-- Class name for the network operator settings activity [DO NOT TRANSLATE] -->
- <string name="network_operator_settings_class" translatable="false">com.android.phone.NetworkSetting</string>
+ <!-- Package name for the mobile network settings [DO NOT TRANSLATE] -->
+ <string name="mobile_network_settings_package" translatable="false">com.android.phone</string>
+ <!-- Class name for the mobile network settings activity [DO NOT TRANSLATE] -->
+ <string name="mobile_network_settings_class" translatable="false">com.android.phone.MobileNetworkSettings</string>
<!-- CDMA activation goes through HFA -->
<!-- DEPRECATED: Use CarrierConfigManager#KEY_USE_HFA_FOR_PROVISIONING_BOOL -->
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 14cd952..8366ae3 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -178,8 +178,6 @@
<!-- Voicemail notifications title. The user clicks on this preference navigate to the system settings screen for that channel
.[CHAR LIMIT=30] -->
<string name="voicemail_notifications_preference_title">Notifications</string>
- <!-- Mobile network settings screen, setting option name -->
- <string name="networks">Network operators</string>
<!-- Cell Broadcast settings title. [CHAR LIMIT=50] -->
<string name="cell_broadcast_settings">Emergency broadcasts</string>
<!-- Call settings screen title -->
@@ -371,8 +369,6 @@
<string name="load_networks_progress">Searching\u2026</string>
<!-- Available networks screen, text when no networks are found -->
<string name="empty_networks_list">No networks found.</string>
- <!-- Available networks screen, setting option name -->
- <string name="search_networks">Search networks</string>
<!-- Available networks screen, toast when an error is encountered when searching for networks -->
<string name="network_query_error">Error while searching for networks.</string>
<!-- Available networks screen, toast when registering on a specific network -->
@@ -383,10 +379,6 @@
<string name="connect_later">Can\'t connect to this network right now. Try again later.</string>
<!-- Available networks screen, toast when registered on a specific network -->
<string name="registration_done">Registered on network.</string>
- <!-- Mobile network settings screen setting option summary text -->
- <string name="sum_carrier_select">Choose a network operator</string>
- <!-- Available networks screen, setting summary text -->
- <string name="sum_search_networks">Search for all available networks</string>
<!-- Available networks screen, name of switch button for whether to select network automatically -->
<string name="select_automatically">Automatically select network</string>
<!-- Available networks screen, name of button when user wants to select network manually -->
diff --git a/res/xml/carrier_select.xml b/res/xml/carrier_select.xml
deleted file mode 100644
index 1e04285..0000000
--- a/res/xml/carrier_select.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?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"
- android:key="list_networks_key"
- android:title="@string/label_available">
- <Preference
- android:key="button_srch_netwrks_key"
- android:title="@string/search_networks"
- android:summary="@string/sum_search_networks"
- android:persistent="false"/>
- <Preference
- android:key="button_auto_select_key"
- android:title="@string/select_automatically"
- android:persistent="false"/>
-</PreferenceScreen>
diff --git a/res/xml/gsm_umts_options.xml b/res/xml/gsm_umts_options.xml
index 86fe41d..4c74d73 100644
--- a/res/xml/gsm_umts_options.xml
+++ b/res/xml/gsm_umts_options.xml
@@ -17,6 +17,22 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.phone">
+ <com.android.phone.NetworkOperators
+ android:key="network_operators_category_key"
+ android:title="@string/network_operator_category"
+ android:persistent="false">
+
+ <SwitchPreference
+ android:key="button_auto_select_key"
+ android:title="@string/select_automatically"
+ android:persistent="false"/>
+
+ <com.android.phone.NetworkSelectListPreference
+ android:key="button_network_select_key"
+ android:title="@string/network_select_title"
+ android:persistent="false"/>
+ </com.android.phone.NetworkOperators>
+
<PreferenceScreen
android:key="button_apn_key"
android:title="@string/apn_settings"
@@ -27,13 +43,6 @@
</PreferenceScreen>
<PreferenceScreen
- android:key="button_carrier_sel_key"
- android:title="@string/networks"
- android:summary="@string/sum_carrier_select"
- android:persistent="false">
- </PreferenceScreen>
-
- <PreferenceScreen
android:key="carrier_settings_key"
android:title="@string/carrier_settings_title">
<intent android:action="android.intent.action.MAIN"