Merge "[RadioInfo] Remove from Settings (into Telephony)"
This commit is contained in:
@@ -2107,26 +2107,6 @@
|
|||||||
android:value="com.android.settings.wfd.WifiDisplaySettings" />
|
android:value="com.android.settings.wfd.WifiDisplaySettings" />
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<activity
|
|
||||||
android:name="RadioInfo"
|
|
||||||
android:label="@string/phone_info_label"
|
|
||||||
android:process="com.android.phone">
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN" />
|
|
||||||
<category android:name="android.intent.category.DEVELOPMENT_PREFERENCE" />
|
|
||||||
</intent-filter>
|
|
||||||
</activity>
|
|
||||||
|
|
||||||
<activity android:name="BandMode"
|
|
||||||
android:label="@string/band_mode_title"
|
|
||||||
android:process="com.android.phone">
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN" />
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
|
||||||
<category android:name="android.intent.category.VOICE_LAUNCH" />
|
|
||||||
</intent-filter>
|
|
||||||
</activity>
|
|
||||||
|
|
||||||
<activity android:name="Settings$TestingSettingsActivity" android:label="@string/testing">
|
<activity android:name="Settings$TestingSettingsActivity" android:label="@string/testing">
|
||||||
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
|
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
|
||||||
android:value="com.android.settings.TestingSettings" />
|
android:value="com.android.settings.TestingSettings" />
|
||||||
|
@@ -1,30 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Copyright (C) 2007 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.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="4dip"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<ListView android:id="@+id/band"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:textSize="7sp">
|
|
||||||
</ListView>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
@@ -1,414 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
/* //device/apps/Settings/assets/res/any/layout/radio_info.xml
|
|
||||||
**
|
|
||||||
** Copyright 2006, 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.
|
|
||||||
*/
|
|
||||||
-->
|
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<LinearLayout style="@style/info_layout"
|
|
||||||
android:descendantFocusability="beforeDescendants"
|
|
||||||
android:focusableInTouchMode="true">
|
|
||||||
|
|
||||||
<!-- Phone index -->
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/phone_index_label"
|
|
||||||
style="@style/info_label"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Spinner android:id="@+id/phoneIndex"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- IMEI -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_imei_label" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/imei" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Phone Number -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_phone_number_label" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/number" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Subscription ID -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_subid" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/subid" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Default data subscription -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_dds" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/dds" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- IMSI -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_imsi_label" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/imsi" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Network Identifier -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_current_network_label" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/operator" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Roaming -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_roaming_label" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/roaming" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Data Service Status -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_gprs_service_label" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/gprs" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Data Network Type -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_data_network_type_label" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/data_network" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Voice Service Status -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_gsm_service_label" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/gsm" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Voice Network Type -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_voice_network_type_label" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/voice_network" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Signal Strength -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_signal_strength_label" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/dbm" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Link Bandwidth -->
|
|
||||||
<LinearLayout style="@style/entry_layout" android:orientation="horizontal">
|
|
||||||
<TextView android:text="@string/radio_info_dl_kbps" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/dl_kbps" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Link Bandwidth -->
|
|
||||||
<LinearLayout style="@style/entry_layout" android:orientation="horizontal">
|
|
||||||
<TextView android:text="@string/radio_info_ul_kbps" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/ul_kbps" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Physical Channel Config -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_phy_chan_config" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/phy_chan_config" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Horizontal Rule -->
|
|
||||||
<View
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="1dip"
|
|
||||||
android:background="?android:attr/listDivider" />
|
|
||||||
|
|
||||||
<!-- Preferred Network Type -->
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/radio_info_set_perferred_label"
|
|
||||||
style="@style/info_label"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Spinner android:id="@+id/preferredNetworkType"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- Horizontal Rule -->
|
|
||||||
<View
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="1dip"
|
|
||||||
android:background="?android:attr/listDivider" />
|
|
||||||
|
|
||||||
<!-- Radio Power -->
|
|
||||||
<Switch android:id="@+id/radio_power"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginTop="8dip"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/radio_info_radio_power"/>
|
|
||||||
|
|
||||||
<!-- VoLTE provisioned -->
|
|
||||||
<Switch android:id="@+id/volte_provisioned_switch"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginTop="8dip"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/volte_provisioned_switch_string"/>
|
|
||||||
|
|
||||||
<!-- VT provisioned -->
|
|
||||||
<Switch android:id="@+id/vt_provisioned_switch"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginTop="8dip"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/vt_provisioned_switch_string"/>
|
|
||||||
|
|
||||||
<!-- Wifi Calling provisioned -->
|
|
||||||
<Switch android:id="@+id/wfc_provisioned_switch"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginTop="8dip"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/wfc_provisioned_switch_string"/>
|
|
||||||
|
|
||||||
<!-- EAB/Presence provisioned -->
|
|
||||||
<Switch android:id="@+id/eab_provisioned_switch"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginTop="8dip"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/eab_provisioned_switch_string"/>
|
|
||||||
|
|
||||||
<!-- Horizontal Rule -->
|
|
||||||
<View
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="1dip"
|
|
||||||
android:background="?android:attr/listDivider" />
|
|
||||||
|
|
||||||
<!-- Enable/Disable CBRS data -->
|
|
||||||
<Switch android:id="@+id/cbrs_data_switch"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginTop="8dip"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/cbrs_data_switch_string" />
|
|
||||||
|
|
||||||
<!-- Switch between SSSS(single sim single standby) and DSDS(dual sim dual standby). -->
|
|
||||||
<Switch android:id="@+id/dsds_switch"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginTop="8dip"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/dsds_switch_string" />
|
|
||||||
|
|
||||||
<!-- Horizontal Rule -->
|
|
||||||
<View
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="1dip"
|
|
||||||
android:background="?android:attr/listDivider" />
|
|
||||||
|
|
||||||
<!-- Ping stats -->
|
|
||||||
<Button android:id="@+id/ping_test"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginTop="8dip"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/ping_test_label"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_ping_hostname_v4" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/pingHostnameV4" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_ping_hostname_v6" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/pingHostnameV6" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_http_client_test" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/httpClientTest" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Horizontal Rule -->
|
|
||||||
<View
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="1dip"
|
|
||||||
android:background="?android:attr/listDivider" />
|
|
||||||
|
|
||||||
<!-- PPP Sent -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_ppp_sent_label"
|
|
||||||
style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/sent" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- PPP Received -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_ppp_received_label"
|
|
||||||
style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/received" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- PPP Sent since last received -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_ppp_resets_label"
|
|
||||||
style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/sentSinceReceived" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Horizontal Rule -->
|
|
||||||
<View
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="1dip"
|
|
||||||
android:background="?android:attr/listDivider" />
|
|
||||||
|
|
||||||
<!-- Call Status -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_call_status_label" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/call" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Message Waiting Indicator -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_message_waiting_label" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/mwi" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Call Forwarding Indicator -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_call_redirect_label" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/cfi" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Horizontal Rule -->
|
|
||||||
<View
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="1dip"
|
|
||||||
android:background="?android:attr/listDivider" />
|
|
||||||
|
|
||||||
<!-- CellInfoListRate Selection -->
|
|
||||||
<!-- Location -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_signal_location_label" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/location" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/radio_info_cell_info_refresh_rate"
|
|
||||||
style="@style/info_label"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Spinner android:id="@+id/cell_info_rate_select"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- CellInfo -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_cellinfo_label"
|
|
||||||
style="@style/info_label" />
|
|
||||||
</LinearLayout>
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:id="@+id/cellinfo"
|
|
||||||
style="@style/info_value"
|
|
||||||
android:minHeight="300dip"
|
|
||||||
android:textSize="12sp" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Horizontal Rule -->
|
|
||||||
<View
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="1dip"
|
|
||||||
android:background="?android:attr/listDivider" />
|
|
||||||
|
|
||||||
<!-- Launch OEM-specific Info/Settings Activity (if any) -->
|
|
||||||
<!-- Carrier Provisioning -->
|
|
||||||
<LinearLayout style="@style/entry_layout"
|
|
||||||
android:orientation="horizontal" >
|
|
||||||
<Button android:id="@+id/carrier_provisioning"
|
|
||||||
android:layout_marginTop="8dip"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/carrier_provisioning"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
<Button android:id="@+id/trigger_carrier_provisioning"
|
|
||||||
android:layout_marginTop="8dip"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/trigger_carrier_provisioning"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
<Button android:id="@+id/oem_info"
|
|
||||||
android:layout_marginTop="8dip"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/oem_radio_info_label"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- SMSC -->
|
|
||||||
<RelativeLayout android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
<TextView android:id="@+id/smsc_label"
|
|
||||||
android:text="@string/radio_info_smsc_label"
|
|
||||||
android:layout_alignBaseline="@+id/update_smsc"
|
|
||||||
style="@style/info_label" />
|
|
||||||
<Button android:id="@+id/refresh_smsc"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginTop="8dip"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/radio_info_smsc_refresh_label"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
/>
|
|
||||||
<Button android:id="@+id/update_smsc"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginTop="8dip"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/radio_info_smsc_update_label"
|
|
||||||
android:layout_toStartOf="@+id/refresh_smsc"
|
|
||||||
android:layout_alignBaseline="@+id/refresh_smsc"
|
|
||||||
/>
|
|
||||||
<EditText android:id="@+id/smsc"
|
|
||||||
style="@style/form_value"
|
|
||||||
android:layout_alignBaseline="@+id/refresh_smsc"
|
|
||||||
android:layout_toStartOf="@id/update_smsc"
|
|
||||||
android:layout_toEndOf="@id/smsc_label" />
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<!-- Test setting to ignore bad DNS, useful in lab environments -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<Button android:id="@+id/dns_check_toggle"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginTop="8dip"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/radio_info_toggle_dns_check_label"
|
|
||||||
/>
|
|
||||||
<TextView android:id="@+id/dnsCheckState" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</ScrollView>
|
|
@@ -46,69 +46,6 @@
|
|||||||
<!-- Settings main menu category heading. System (Updates, data, accessibility, about phone). [CHAR LIMIT=40] -->
|
<!-- Settings main menu category heading. System (Updates, data, accessibility, about phone). [CHAR LIMIT=40] -->
|
||||||
<string name="header_category_system">System</string>
|
<string name="header_category_system">System</string>
|
||||||
|
|
||||||
<!-- Data Connection Enable. Only shown in diagnostic screen, so precise translation is not needed. -->
|
|
||||||
<string name="radio_info_data_connection_enable">Enable Data Connection</string>
|
|
||||||
<!-- Data Connection Disable. Only shown in diagnostic screen, so precise translation is not needed. -->
|
|
||||||
<string name="radio_info_data_connection_disable">Disable Data Connection</string>
|
|
||||||
|
|
||||||
<!-- VoLTE provisioning flag on. Only shown in diagnostic screen, so precise translation is not needed. -->
|
|
||||||
<string name="volte_provisioned_switch_string">VoLTE Provisioned</string>
|
|
||||||
|
|
||||||
<!-- Video calling provisioning flag on. Only shown in diagnostic screen, so precise translation is not needed. -->
|
|
||||||
<string name="vt_provisioned_switch_string">Video Calling Provisioned</string>
|
|
||||||
|
|
||||||
<!-- Wifi Calling provisioning flag on. Only shown in diagnostic screen, so precise translation is not needed. -->
|
|
||||||
<string name="wfc_provisioned_switch_string">Wifi Calling Provisioned</string>
|
|
||||||
|
|
||||||
<!-- EAB provisioning flag on. Only shown in diagnostic screen, so precise translation is not needed. -->
|
|
||||||
<string name="eab_provisioned_switch_string">EAB/Presence Provisioned</string>
|
|
||||||
|
|
||||||
<!-- Cbrs enable disable flag. Only shown in diagnostic screen, so precise translation is not needed -->
|
|
||||||
<string name="cbrs_data_switch_string">Cbrs Data</string>
|
|
||||||
|
|
||||||
<!-- Dsds enable/disable flag. Only shown in diagnostic screen, so precise translation is not needed, [CHAR LIMIT=none] -->
|
|
||||||
<string name="dsds_switch_string">Enable DSDS</string>
|
|
||||||
|
|
||||||
<!-- UI debug setting: Enable/Disable DSDS [CHAR LIMIT=none] -->
|
|
||||||
<string name="dsds_dialog_title">Restart Device?</string>
|
|
||||||
|
|
||||||
<!-- UI debug setting: Enable/Disable DSDS [CHAR LIMIT=none] -->
|
|
||||||
<string name="dsds_dialog_message">You need to restart your device to change this setting.</string>
|
|
||||||
|
|
||||||
<!-- UI debug setting: Enable/Disable DSDS [CHAR LIMIT=none] -->
|
|
||||||
<string name="dsds_dialog_confirm">Restart</string>
|
|
||||||
|
|
||||||
<!-- UI debug setting: Enable/Disable DSDS [CHAR LIMIT=none] -->
|
|
||||||
<string name="dsds_dialog_cancel">Cancel</string>
|
|
||||||
|
|
||||||
<!-- Title for controlling on/off for Mobile phone's radio power. Only shown in diagnostic screen, so precise translation is not needed. -->
|
|
||||||
<string name="radio_info_radio_power">Mobile Radio Power</string>
|
|
||||||
|
|
||||||
<!-- Phone Info screen. Menu item label. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radioInfo_menu_viewADN">View SIM Address Book</string>
|
|
||||||
<!-- Phone Info screen. Menu item label. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radioInfo_menu_viewFDN">View Fixed Dialing Numbers</string>
|
|
||||||
<!-- Phone Info screen. Menu item label. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radioInfo_menu_viewSDN">View Service Dialing Numbers</string>
|
|
||||||
<!-- Phone Info screen. Menu item label. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radioInfo_menu_getIMS">IMS Service Status</string>
|
|
||||||
|
|
||||||
<!-- Phone Info screen. IMS Registration Title. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_ims_reg_status_title">IMS Status</string>
|
|
||||||
|
|
||||||
<!-- Phone Info screen. IMS Status - Registered. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_ims_reg_status_registered">Registered</string>
|
|
||||||
<!-- Phone Info screen. Ims Status - Unregistered. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_ims_reg_status_not_registered">Not Registered</string>
|
|
||||||
|
|
||||||
<!-- Phone Info screen. Ims Feature Status label. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_ims_feature_status_available">Available</string>
|
|
||||||
<!-- Phone Info screen. Ims Feature status label. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_ims_feature_status_unavailable">Unavailable</string>
|
|
||||||
|
|
||||||
<!-- Phone Info screen. IMS Registration. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_ims_reg_status">IMS Registration: <xliff:g id="status" example="registered">%1$s</xliff:g>\u000AVoice over LTE: <xliff:g id="availability" example="available">%2$s</xliff:g>\u000AVoice over WiFi: <xliff:g id="availability" example="available">%3$s</xliff:g>\u000AVideo Calling: <xliff:g id="availability" example="available">%4$s</xliff:g>\u000AUT Interface: <xliff:g id="availability" example="available">%5$s</xliff:g></string>
|
|
||||||
|
|
||||||
<!-- Phone Info screen. Status label. Used for diagnostic info screens, precise translation isn't needed -->
|
<!-- Phone Info screen. Status label. Used for diagnostic info screens, precise translation isn't needed -->
|
||||||
<string name="radioInfo_service_in">In Service</string>
|
<string name="radioInfo_service_in">In Service</string>
|
||||||
<!-- Phone Info screen. Status label. Used for diagnostic info screens, precise translation isn't needed -->
|
<!-- Phone Info screen. Status label. Used for diagnostic info screens, precise translation isn't needed -->
|
||||||
@@ -123,13 +60,6 @@
|
|||||||
<!-- Phone Info screen. Status label. Used for diagnostic info screens, precise translation isn't needed -->
|
<!-- Phone Info screen. Status label. Used for diagnostic info screens, precise translation isn't needed -->
|
||||||
<string name="radioInfo_roaming_not">Not Roaming</string>
|
<string name="radioInfo_roaming_not">Not Roaming</string>
|
||||||
|
|
||||||
<!-- Phone Info screen. Status label. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radioInfo_phone_idle">Idle</string>
|
|
||||||
<!-- Phone Info screen. Status label. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radioInfo_phone_ringing">Ringing</string>
|
|
||||||
<!-- Phone Info screen. Status label. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radioInfo_phone_offhook">Call in Progress</string>
|
|
||||||
|
|
||||||
<!-- Phone Info screen. Status label. Used for diagnostic info screens, precise translation isn't needed -->
|
<!-- Phone Info screen. Status label. Used for diagnostic info screens, precise translation isn't needed -->
|
||||||
<string name="radioInfo_data_disconnected">Disconnected</string>
|
<string name="radioInfo_data_disconnected">Disconnected</string>
|
||||||
<!-- Phone Info screen. Status label. Used for diagnostic info screens, precise translation isn't needed -->
|
<!-- Phone Info screen. Status label. Used for diagnostic info screens, precise translation isn't needed -->
|
||||||
@@ -141,18 +71,6 @@
|
|||||||
|
|
||||||
<!-- Used for diagnostic info screens, precise translation isn't needed -->
|
<!-- Used for diagnostic info screens, precise translation isn't needed -->
|
||||||
<string name="radioInfo_unknown">Unknown</string>
|
<string name="radioInfo_unknown">Unknown</string>
|
||||||
<!-- Phone Info screen. Units shown after a value. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radioInfo_display_packets">pkts</string>
|
|
||||||
<!-- Phone Info screen. Units shown after a value. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radioInfo_display_bytes">bytes</string>
|
|
||||||
<!-- Phone Info screen. Units shown after a value. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radioInfo_display_dbm">dBm</string>
|
|
||||||
<!-- Phone Info screen. Units shown after a value. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radioInfo_display_asu">asu</string>
|
|
||||||
<!-- Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radioInfo_lac">LAC</string>
|
|
||||||
<!-- Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radioInfo_cid">CID</string>
|
|
||||||
|
|
||||||
<!-- Used for diagnostic info screens, precise translation isn't needed. Unmounts the SD card from the phone, meaning it will become available for an attached computer [CHAR LIMIT=25] -->
|
<!-- Used for diagnostic info screens, precise translation isn't needed. Unmounts the SD card from the phone, meaning it will become available for an attached computer [CHAR LIMIT=25] -->
|
||||||
<string name="sdcard_unmount" product="nosdcard">Unmount USB storage</string>
|
<string name="sdcard_unmount" product="nosdcard">Unmount USB storage</string>
|
||||||
@@ -484,60 +402,6 @@
|
|||||||
<!-- HTTP proxy settings. Title for Proxy-Auto Config URL. [CHAR LIMIT=25] -->
|
<!-- HTTP proxy settings. Title for Proxy-Auto Config URL. [CHAR LIMIT=25] -->
|
||||||
<string name="proxy_url_title">"PAC URL: "</string>
|
<string name="proxy_url_title">"PAC URL: "</string>
|
||||||
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_subid">Current subId:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_dds">SubId of default data SIM:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_dl_kbps">DL Bandwidth (kbps):</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_ul_kbps">UL Bandwidth (kbps):</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_signal_location_label">Cell Location Info (deprecated):</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_phy_chan_config">LTE Physical Channel Configuration:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_cell_info_refresh_rate">Cell Info Refresh Rate:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_cellinfo_label">All Cell Measurement Info:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_gprs_service_label">Data Service:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_roaming_label">Roaming:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_imei_label">IMEI:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, DO NOT TRANSLATE. -->
|
|
||||||
<string name="radio_info_imsi_label">IMSI:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_call_redirect_label">Call Redirect:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_ppp_resets_label">Number of PPP Reset Since Boot:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_current_network_label">Current Network:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_ppp_received_label">Data Received:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_gsm_service_label">Voice Service:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_signal_strength_label">Signal Strength:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_call_status_label">Voice Call Status:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_ppp_sent_label">Data Sent:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_message_waiting_label">Message Waiting:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_phone_number_label">Phone Number:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_band_mode_label">Select Radio Band</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_voice_network_type_label">Voice Network Type:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_data_network_type_label">Data Network Type:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="phone_index_label">Select phone index</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_set_perferred_label">Set Preferred Network Type:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
||||||
<string name="radio_info_ping_hostname_v4">Ping Hostname(www.google.com) IPv4:</string>
|
<string name="radio_info_ping_hostname_v4">Ping Hostname(www.google.com) IPv4:</string>
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
||||||
@@ -546,28 +410,6 @@
|
|||||||
<string name="radio_info_http_client_test">HTTP Client Test:</string>
|
<string name="radio_info_http_client_test">HTTP Client Test:</string>
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
||||||
<string name="ping_test_label">Run Ping Test</string>
|
<string name="ping_test_label">Run Ping Test</string>
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_smsc_label">SMSC:</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_smsc_update_label">Update</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_smsc_refresh_label">Refresh</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="radio_info_toggle_dns_check_label">Toggle DNS Check</string>
|
|
||||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
|
||||||
<string name="oem_radio_info_label">OEM-specific Info/Settings</string>
|
|
||||||
|
|
||||||
<!-- Band Mode Selection -->
|
|
||||||
<!-- Band mode screen. Title of activity. -->
|
|
||||||
<string name="band_mode_title">Set Radio Band Mode</string>
|
|
||||||
<!-- Band mode screen. Loading message. -->
|
|
||||||
<string name="band_mode_loading">Loading Band List\u2026</string>
|
|
||||||
<!-- Band mode screen. Button caption to set the bandmode. -->
|
|
||||||
<string name="band_mode_set">Set</string>
|
|
||||||
<!-- Band mode screen. Status message when unsuccessful. -->
|
|
||||||
<string name="band_mode_failed">Unsuccessful</string>
|
|
||||||
<!-- Band mode screen. Statusm essage when successful. -->
|
|
||||||
<string name="band_mode_succeeded">Successful</string>
|
|
||||||
|
|
||||||
<!-- Instructions after the user changes the mass storage settings -->
|
<!-- Instructions after the user changes the mass storage settings -->
|
||||||
<string name="sdcard_changes_instructions">Changes take effect when USB cable is reconnected.</string>
|
<string name="sdcard_changes_instructions">Changes take effect when USB cable is reconnected.</string>
|
||||||
@@ -654,10 +496,6 @@
|
|||||||
<string name="device_info_label">Device info</string>
|
<string name="device_info_label">Device info</string>
|
||||||
<!-- The title of the activity to adjust display settings -->
|
<!-- The title of the activity to adjust display settings -->
|
||||||
<string name="display_label">Screen</string>
|
<string name="display_label">Screen</string>
|
||||||
<!-- The title of the activity to see phone info -->
|
|
||||||
<string name="phone_info_label" product="tablet">Tablet info</string>
|
|
||||||
<!-- The title of the activity to see phone info -->
|
|
||||||
<string name="phone_info_label" product="default">Phone info</string>
|
|
||||||
<!-- The title of the activity to adjust SD card settings [CHAR LIMIT=25] -->
|
<!-- The title of the activity to adjust SD card settings [CHAR LIMIT=25] -->
|
||||||
<string name="sd_card_settings_label" product="nosdcard">USB storage</string>
|
<string name="sd_card_settings_label" product="nosdcard">USB storage</string>
|
||||||
<!-- The title of the activity to adjust SD card settings-->
|
<!-- The title of the activity to adjust SD card settings-->
|
||||||
|
@@ -21,8 +21,8 @@
|
|||||||
android:title="@string/testing_phone_info"
|
android:title="@string/testing_phone_info"
|
||||||
android:key="radio_info_settings">
|
android:key="radio_info_settings">
|
||||||
<intent android:action="android.intent.action.MAIN"
|
<intent android:action="android.intent.action.MAIN"
|
||||||
android:targetPackage="com.android.settings"
|
android:targetPackage="com.android.phone"
|
||||||
android:targetClass="com.android.settings.RadioInfo" />
|
android:targetClass="com.android.phone.settings.RadioInfo" />
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
@@ -50,4 +50,3 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|
||||||
|
@@ -1,238 +0,0 @@
|
|||||||
package com.android.settings;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.os.AsyncResult;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.os.Handler;
|
|
||||||
import android.os.Message;
|
|
||||||
import android.util.Log;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.Window;
|
|
||||||
import android.widget.AdapterView;
|
|
||||||
import android.widget.ArrayAdapter;
|
|
||||||
import android.widget.ListView;
|
|
||||||
|
|
||||||
import androidx.appcompat.app.AlertDialog;
|
|
||||||
|
|
||||||
import com.android.internal.telephony.Phone;
|
|
||||||
import com.android.internal.telephony.PhoneFactory;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Radio Band Mode Selection Class
|
|
||||||
*
|
|
||||||
* It will query baseband about all available band modes and display them
|
|
||||||
* in screen. It will display all six band modes if the query failed.
|
|
||||||
*
|
|
||||||
* After user select one band, it will send the selection to baseband.
|
|
||||||
*
|
|
||||||
* It will alter user the result of select operation and exit, no matter success
|
|
||||||
* or not.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class BandMode extends Activity {
|
|
||||||
private static final String LOG_TAG = "phone";
|
|
||||||
private static final boolean DBG = false;
|
|
||||||
|
|
||||||
private static final int EVENT_BAND_SCAN_COMPLETED = 100;
|
|
||||||
private static final int EVENT_BAND_SELECTION_DONE = 200;
|
|
||||||
|
|
||||||
//Directly maps to RIL_RadioBandMode from ril.h
|
|
||||||
private static final String[] BAND_NAMES = new String[] {
|
|
||||||
"Automatic",
|
|
||||||
"Europe",
|
|
||||||
"United States",
|
|
||||||
"Japan",
|
|
||||||
"Australia",
|
|
||||||
"Australia 2",
|
|
||||||
"Cellular 800",
|
|
||||||
"PCS",
|
|
||||||
"Class 3 (JTACS)",
|
|
||||||
"Class 4 (Korea-PCS)",
|
|
||||||
"Class 5",
|
|
||||||
"Class 6 (IMT2000)",
|
|
||||||
"Class 7 (700Mhz-Upper)",
|
|
||||||
"Class 8 (1800Mhz-Upper)",
|
|
||||||
"Class 9 (900Mhz)",
|
|
||||||
"Class 10 (800Mhz-Secondary)",
|
|
||||||
"Class 11 (Europe PAMR 400Mhz)",
|
|
||||||
"Class 15 (US-AWS)",
|
|
||||||
"Class 16 (US-2500Mhz)"
|
|
||||||
};
|
|
||||||
|
|
||||||
private ListView mBandList;
|
|
||||||
private ArrayAdapter mBandListAdapter;
|
|
||||||
private BandListItem mTargetBand = null;
|
|
||||||
private DialogInterface mProgressPanel;
|
|
||||||
|
|
||||||
private Phone mPhone = null;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle icicle) {
|
|
||||||
super.onCreate(icicle);
|
|
||||||
|
|
||||||
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
|
|
||||||
setContentView(R.layout.band_mode);
|
|
||||||
|
|
||||||
mPhone = PhoneFactory.getDefaultPhone();
|
|
||||||
|
|
||||||
mBandList = (ListView) findViewById(R.id.band);
|
|
||||||
mBandListAdapter = new ArrayAdapter<BandListItem>(this,
|
|
||||||
android.R.layout.simple_list_item_1);
|
|
||||||
mBandList.setAdapter(mBandListAdapter);
|
|
||||||
mBandList.setOnItemClickListener(mBandSelectionHandler);
|
|
||||||
|
|
||||||
loadBandList();
|
|
||||||
}
|
|
||||||
|
|
||||||
private AdapterView.OnItemClickListener mBandSelectionHandler =
|
|
||||||
new AdapterView.OnItemClickListener () {
|
|
||||||
public void onItemClick(AdapterView parent, View v,
|
|
||||||
int position, long id) {
|
|
||||||
|
|
||||||
getWindow().setFeatureInt(
|
|
||||||
Window.FEATURE_INDETERMINATE_PROGRESS,
|
|
||||||
Window.PROGRESS_VISIBILITY_ON);
|
|
||||||
|
|
||||||
mTargetBand = (BandListItem) parent.getAdapter().getItem(position);
|
|
||||||
|
|
||||||
if (DBG) log("Select band : " + mTargetBand.toString());
|
|
||||||
|
|
||||||
Message msg =
|
|
||||||
mHandler.obtainMessage(EVENT_BAND_SELECTION_DONE);
|
|
||||||
mPhone.setBandMode(mTargetBand.getBand(), msg);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
static private class BandListItem {
|
|
||||||
private int mBandMode = Phone.BM_UNSPECIFIED;
|
|
||||||
|
|
||||||
public BandListItem(int bm) {
|
|
||||||
mBandMode = bm;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getBand() {
|
|
||||||
return mBandMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString() {
|
|
||||||
if (mBandMode >= BAND_NAMES.length) return "Band mode " + mBandMode;
|
|
||||||
return BAND_NAMES[mBandMode];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadBandList() {
|
|
||||||
String str = getString(R.string.band_mode_loading);
|
|
||||||
|
|
||||||
if (DBG) log(str);
|
|
||||||
|
|
||||||
|
|
||||||
//ProgressDialog.show(this, null, str, true, true, null);
|
|
||||||
mProgressPanel = new AlertDialog.Builder(this)
|
|
||||||
.setMessage(str)
|
|
||||||
.show();
|
|
||||||
|
|
||||||
Message msg = mHandler.obtainMessage(EVENT_BAND_SCAN_COMPLETED);
|
|
||||||
mPhone.queryAvailableBandMode(msg);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void bandListLoaded(AsyncResult result) {
|
|
||||||
if (DBG) log("network list loaded");
|
|
||||||
|
|
||||||
if (mProgressPanel != null) mProgressPanel.dismiss();
|
|
||||||
|
|
||||||
clearList();
|
|
||||||
|
|
||||||
boolean addBandSuccess = false;
|
|
||||||
BandListItem item;
|
|
||||||
|
|
||||||
if (result.result != null) {
|
|
||||||
int bands[] = (int[])result.result;
|
|
||||||
|
|
||||||
if(bands.length == 0) {
|
|
||||||
Log.wtf(LOG_TAG, "No Supported Band Modes");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int size = bands[0];
|
|
||||||
|
|
||||||
if (size > 0) {
|
|
||||||
mBandListAdapter.add(
|
|
||||||
new BandListItem(Phone.BM_UNSPECIFIED)); //Always include AUTOMATIC
|
|
||||||
for (int i=1; i<=size; i++) {
|
|
||||||
if (bands[i] == Phone.BM_UNSPECIFIED) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
item = new BandListItem(bands[i]);
|
|
||||||
mBandListAdapter.add(item);
|
|
||||||
if (DBG) log("Add " + item.toString());
|
|
||||||
}
|
|
||||||
addBandSuccess = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (addBandSuccess == false) {
|
|
||||||
if (DBG) log("Error in query, add default list");
|
|
||||||
for (int i=0; i<Phone.BM_NUM_BAND_MODES; i++) {
|
|
||||||
item = new BandListItem(i);
|
|
||||||
mBandListAdapter.add(item);
|
|
||||||
if (DBG) log("Add default " + item.toString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mBandList.requestFocus();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void displayBandSelectionResult(Throwable ex) {
|
|
||||||
String status = getString(R.string.band_mode_set)
|
|
||||||
+" [" + mTargetBand.toString() + "] ";
|
|
||||||
|
|
||||||
if (ex != null) {
|
|
||||||
status = status + getString(R.string.band_mode_failed);
|
|
||||||
} else {
|
|
||||||
status = status + getString(R.string.band_mode_succeeded);
|
|
||||||
}
|
|
||||||
|
|
||||||
mProgressPanel = new AlertDialog.Builder(this)
|
|
||||||
.setMessage(status)
|
|
||||||
.setPositiveButton(android.R.string.ok, null).show();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void clearList() {
|
|
||||||
while(mBandListAdapter.getCount() > 0) {
|
|
||||||
mBandListAdapter.remove(
|
|
||||||
mBandListAdapter.getItem(0));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void log(String msg) {
|
|
||||||
Log.d(LOG_TAG, "[BandsList] " + msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
private Handler mHandler = new Handler() {
|
|
||||||
public void handleMessage(Message msg) {
|
|
||||||
AsyncResult ar;
|
|
||||||
switch (msg.what) {
|
|
||||||
case EVENT_BAND_SCAN_COMPLETED:
|
|
||||||
ar = (AsyncResult) msg.obj;
|
|
||||||
|
|
||||||
bandListLoaded(ar);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case EVENT_BAND_SELECTION_DONE:
|
|
||||||
ar = (AsyncResult) msg.obj;
|
|
||||||
|
|
||||||
getWindow().setFeatureInt(
|
|
||||||
Window.FEATURE_INDETERMINATE_PROGRESS,
|
|
||||||
Window.PROGRESS_VISIBILITY_OFF);
|
|
||||||
|
|
||||||
if (!isFinishing()) {
|
|
||||||
displayBandSelectionResult(ar.exception);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user