Cleanup RadioInfo Test Menu
-Convert multi-mode buttons to toggle switches to reduce confusion. -Remove long-deprecated PhoneStateIntentReceiver references and convert all functions to use PhoneStateListener -Remove vestigial menu items that no longer reference working system properties or code -Add new ARFCN/UARFCN/EARFCN fields to CellInfo Display -Convert CellInfoListRate to a Dropdown menu -Fixed bugs with screen rotation that caused network preferences to change (and could crash the radio) -Fixed bugs related to onResume not updating values correctly -Re-ordered menu items to group like-items together -Minor string edits for clarity, correctness, and consistency Change-Id: Ied5ed7a250682ee3327e51884d80ee4f3a7eb913
This commit is contained in:
@@ -41,6 +41,67 @@
|
|||||||
<TextView android:id="@+id/operator" style="@style/info_value" />
|
<TextView android:id="@+id/operator" style="@style/info_value" />
|
||||||
</LinearLayout>
|
</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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- 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="#000000" />
|
||||||
|
|
||||||
<!-- Ping stats -->
|
<!-- Ping stats -->
|
||||||
<Button android:id="@+id/ping_test"
|
<Button android:id="@+id/ping_test"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
@@ -65,41 +126,11 @@
|
|||||||
<TextView android:id="@+id/httpClientTest" style="@style/info_value" />
|
<TextView android:id="@+id/httpClientTest" style="@style/info_value" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- Signal Strength -->
|
<!-- Horizontal Rule -->
|
||||||
<LinearLayout style="@style/entry_layout">
|
<View
|
||||||
<TextView android:text="@string/radio_info_signal_strength_label" style="@style/info_label" />
|
android:layout_width="fill_parent"
|
||||||
<TextView android:id="@+id/dbm" style="@style/info_value" />
|
android:layout_height="1dip"
|
||||||
</LinearLayout>
|
android:background="#000000" />
|
||||||
|
|
||||||
<!-- CellInfoListRate -->
|
|
||||||
<Button android:id="@+id/cell_info_list_rate"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginTop="8dip"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 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>
|
|
||||||
|
|
||||||
<!-- Neighboring Cids -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_neighboring_location_label"
|
|
||||||
style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/neighboring" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- 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" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- DcRtInfo - DataConnectionRealTimeInfo -->
|
<!-- DcRtInfo - DataConnectionRealTimeInfo -->
|
||||||
<LinearLayout style="@style/entry_layout">
|
<LinearLayout style="@style/entry_layout">
|
||||||
@@ -108,30 +139,6 @@
|
|||||||
<TextView android:id="@+id/dcrtinfo" style="@style/info_value" />
|
<TextView android:id="@+id/dcrtinfo" style="@style/info_value" />
|
||||||
</LinearLayout>
|
</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>
|
|
||||||
|
|
||||||
<!-- GSM Service -->
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<!-- GPRS Service -->
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<!-- Network Type -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_network_type_label" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/network" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Message Waiting Indicator -->
|
<!-- Message Waiting Indicator -->
|
||||||
<LinearLayout style="@style/entry_layout">
|
<LinearLayout style="@style/entry_layout">
|
||||||
<TextView android:text="@string/radio_info_message_waiting_label" style="@style/info_label" />
|
<TextView android:text="@string/radio_info_message_waiting_label" style="@style/info_label" />
|
||||||
@@ -144,39 +151,6 @@
|
|||||||
<TextView android:id="@+id/cfi" style="@style/info_value" />
|
<TextView android:id="@+id/cfi" style="@style/info_value" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- 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>
|
|
||||||
|
|
||||||
<!-- Radio Resets -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_radio_resets_label" style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/resets" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Attempted Data Connections -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_data_attempts_label"
|
|
||||||
style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/attempts" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Successful Data Connections -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_data_successes_label"
|
|
||||||
style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/successes" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- GSM Disconnects -->
|
|
||||||
<LinearLayout style="@style/entry_layout">
|
|
||||||
<TextView android:text="@string/radio_info_gsm_disconnects_label"
|
|
||||||
style="@style/info_label" />
|
|
||||||
<TextView android:id="@+id/disconnects" style="@style/info_value" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- PPP Sent -->
|
<!-- PPP Sent -->
|
||||||
<LinearLayout style="@style/entry_layout">
|
<LinearLayout style="@style/entry_layout">
|
||||||
<TextView android:text="@string/radio_info_ppp_sent_label"
|
<TextView android:text="@string/radio_info_ppp_sent_label"
|
||||||
@@ -198,58 +172,21 @@
|
|||||||
<TextView android:id="@+id/sentSinceReceived" style="@style/info_value" />
|
<TextView android:id="@+id/sentSinceReceived" style="@style/info_value" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- 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"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- Radio Power -->
|
<!-- Radio Power -->
|
||||||
<Button android:id="@+id/radio_power"
|
<Switch android:id="@+id/radio_power"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:layout_marginTop="8dip"
|
android:layout_marginTop="8dip"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
/>
|
android:text="@string/radio_info_radio_power"/>
|
||||||
|
|
||||||
<!-- IMS registration required -->
|
|
||||||
<Button android:id="@+id/ims_reg_required"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginTop="8dip"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- VoLTE provisioned -->
|
<!-- VoLTE provisioned -->
|
||||||
<Button android:id="@+id/volte_provisioned_flag"
|
<Switch android:id="@+id/volte_provisioned_switch"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:layout_marginTop="8dip"
|
android:layout_marginTop="8dip"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
/>
|
android:text="@string/volte_provisioned_switch_string"/>
|
||||||
|
|
||||||
<!-- SMS over IMS -->
|
|
||||||
<Button android:id="@+id/sms_over_ims"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginTop="8dip"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- LTE ram dump -->
|
|
||||||
<Button android:id="@+id/lte_ram_dump"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginTop="8dip"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- SMSC -->
|
<!-- SMSC -->
|
||||||
<RelativeLayout android:layout_width="match_parent"
|
<RelativeLayout android:layout_width="match_parent"
|
||||||
@@ -303,5 +240,49 @@
|
|||||||
android:text="@string/oem_radio_info_label"
|
android:text="@string/oem_radio_info_label"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- Horizontal Rule -->
|
||||||
|
<View
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="1dip"
|
||||||
|
android:background="#000000" />
|
||||||
|
|
||||||
|
<!-- CellInfoListRate Selection -->
|
||||||
|
<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"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- Neighboring Cids -->
|
||||||
|
<LinearLayout style="@style/entry_layout">
|
||||||
|
<TextView android:text="@string/radio_info_neighboring_location_label"
|
||||||
|
style="@style/info_label" />
|
||||||
|
<TextView android:id="@+id/neighboring" style="@style/info_value" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
@@ -57,61 +57,46 @@
|
|||||||
<!-- 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>
|
||||||
|
|
||||||
<!-- Phone info -->
|
<!-- Data Connection Enable. Only shown in diagnostic screen, so precise translation is not needed. -->
|
||||||
<!-- Phone Info screen. Button label to turn on the radio . Only shown in diagnostic screen, so precise translation is not needed. -->
|
<string name="radio_info_data_connection_enable">Enable Data Connection</string>
|
||||||
<string name="turn_on_radio">Turn on radio</string>
|
<!-- Data Connection Disable. Only shown in diagnostic screen, so precise translation is not needed. -->
|
||||||
<!-- Phone Info screen. Button label to turn off the radio . Only shown in diagnostic screen, so precise translation is not needed. -->
|
<string name="radio_info_data_connection_disable">Disable Data Connection</string>
|
||||||
<string name="turn_off_radio">Turn off radio</string>
|
|
||||||
|
|
||||||
<!-- Phone SMS over IMS on. Only shown in diagnostic screen, so precise translation is not needed. -->
|
|
||||||
<string name="sms_over_ims_on">Turn on SMS over IMS</string>
|
|
||||||
<!-- Phone SMS over IMS off. Only shown in diagnostic screen, so precise translation is not needed. -->
|
|
||||||
<string name="sms_over_ims_off">Turn off SMS over IMS</string>
|
|
||||||
|
|
||||||
<!-- Phone SMS over IMS IMS registration required on. Only shown in diagnostic screen, so precise translation is not needed. -->
|
|
||||||
<string name="ims_reg_required_on">Turn on IMS registration required</string>
|
|
||||||
<!-- Phone IMS registration required off. Only shown in diagnostic screen, so precise translation is not needed. -->
|
|
||||||
<string name="ims_reg_required_off">Turn off IMS registration required</string>
|
|
||||||
|
|
||||||
<!-- VoLTE provisioning flag on. Only shown in diagnostic screen, so precise translation is not needed. -->
|
<!-- VoLTE provisioning flag on. Only shown in diagnostic screen, so precise translation is not needed. -->
|
||||||
<string name="volte_provisioned_flag_on">Turn on VoLTE provisioned flag</string>
|
<string name="volte_provisioned_switch_string">VoLTE Provisioned</string>
|
||||||
<!-- VoLTE provisioning flag off. Only shown in diagnostic screen, so precise translation is not needed. -->
|
|
||||||
<string name="volte_provisioned_flag_off">Turn off VoLTE provisioned flag</string>
|
|
||||||
|
|
||||||
<!-- Phone ram dump on. Only shown in diagnostic screen, so precise translation is not needed. -->
|
<!-- Cell Radio Power. Only shown in diagnostic screen, so precise translation is not needed. -->
|
||||||
<string name="lte_ram_dump_on">Turn on lte ram dump</string>
|
<string name="radio_info_radio_power">Cellular Radio Power</string>
|
||||||
<!-- Phone ram dump off. Only shown in diagnostic screen, so precise translation is not needed. -->
|
|
||||||
<string name="lte_ram_dump_off">Turn off lte ram dump</string>
|
|
||||||
|
|
||||||
<!-- Phone Info screen. Menu item label. Used for diagnostic info screens, precise translation isn't needed -->
|
<!-- 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>
|
<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 -->
|
<!-- 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>
|
<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 -->
|
<!-- 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>
|
<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 -->
|
<!-- Phone Info screen. Menu item label. Used for diagnostic info screens, precise translation isn't needed -->
|
||||||
<string name="radioInfo_menu_getPDP">Get PDP list</string>
|
<string name="radioInfo_menu_getPDP">Get PDP List</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 -->
|
||||||
<string name="radioInfo_service_out">Out of service</string>
|
<string name="radioInfo_service_out">Out of 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 -->
|
||||||
<string name="radioInfo_service_emergency">Emergency calls only</string>
|
<string name="radioInfo_service_emergency">Emergency Calls Only</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_off">Radio off</string>
|
<string name="radioInfo_service_off">Radio Off</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_roaming_in">Roaming</string>
|
<string name="radioInfo_roaming_in">Roaming</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_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 -->
|
<!-- Phone Info screen. Status label. Used for diagnostic info screens, precise translation isn't needed -->
|
||||||
<string name="radioInfo_phone_idle">Idle</string>
|
<string name="radioInfo_phone_idle">Idle</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_phone_ringing">Ringing</string>
|
<string name="radioInfo_phone_ringing">Ringing</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_phone_offhook">Call in progress</string>
|
<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>
|
||||||
@@ -123,7 +108,7 @@
|
|||||||
<string name="radioInfo_data_suspended">Suspended</string>
|
<string name="radioInfo_data_suspended">Suspended</string>
|
||||||
|
|
||||||
<!-- 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 -->
|
<!-- 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>
|
<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 -->
|
<!-- Phone Info screen. Units shown after a value. Used for diagnostic info screens, precise translation isn't needed -->
|
||||||
@@ -402,62 +387,57 @@
|
|||||||
<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 -->
|
<!-- 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">Location:</string>
|
<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 -->
|
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
||||||
<string name="radio_info_neighboring_location_label">Neighboring CID:</string>
|
<string name="radio_info_neighboring_location_label">Neighbor Cell Info (deprecated):</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_cellinfo_label">CellInfo:</string>
|
<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 -->
|
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
||||||
<string name="radio_info_dcrtinfo_label">DcRtInfo:</string>
|
<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 -->
|
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
||||||
<string name="radio_info_data_attempts_label">Data attempts:</string>
|
<string name="radio_info_dcrtinfo_label">Data Connection Real-Time Info:</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_gprs_service_label">Data Service:</string>
|
||||||
<string name="radio_info_gprs_service_label">Data Technology:</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_roaming_label">Roaming:</string>
|
<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 -->
|
<!-- 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>
|
<string name="radio_info_imei_label">IMEI:</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_call_redirect_label">Call redirect:</string>
|
<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 -->
|
<!-- 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>
|
<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 -->
|
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
||||||
<string name="radio_info_gsm_disconnects_label">GSM disconnects:</string>
|
<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 -->
|
<!-- 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>
|
<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 -->
|
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
||||||
<string name="radio_info_data_successes_label">Data successes:</string>
|
<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 -->
|
<!-- 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">PPP received:</string>
|
<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 -->
|
<!-- 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 Technology:</string>
|
<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 -->
|
<!-- 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>
|
<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 -->
|
<!-- 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">Call status:</string>
|
<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 -->
|
<!-- 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">PPP sent:</string>
|
<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 -->
|
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
||||||
<string name="radio_info_radio_resets_label">Radio resets:</string>
|
<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 -->
|
<!-- 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>
|
<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 -->
|
<!-- 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>
|
<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 -->
|
<!-- 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>
|
<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 -->
|
|
||||||
<string name="radio_info_network_type_label">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_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 -->
|
||||||
<string name="radio_info_ping_hostname_v6">Ping Hostname(www.google.com) IPv6:</string>
|
<string name="radio_info_ping_hostname_v6">Ping Hostname(www.google.com) IPv6:</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_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 -->
|
<!-- 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>
|
<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 -->
|
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
||||||
@@ -465,15 +445,15 @@
|
|||||||
<!-- 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_smsc_refresh_label">Refresh</string>
|
<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 -->
|
<!-- 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>
|
<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 -->
|
<!-- 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>
|
<string name="oem_radio_info_label">OEM-specific Info/Settings</string>
|
||||||
|
|
||||||
<!-- Band Mode Selection -->
|
<!-- Band Mode Selection -->
|
||||||
<!-- Band mode screen. Title of activity. -->
|
<!-- Band mode screen. Title of activity. -->
|
||||||
<string name="band_mode_title">Set GSM/UMTS band</string>
|
<string name="band_mode_title">Set Radio Band Mode</string>
|
||||||
<!-- Band mode screen. Loading message. -->
|
<!-- Band mode screen. Loading message. -->
|
||||||
<string name="band_mode_loading">Loading band list\u2026</string>
|
<string name="band_mode_loading">Loading Band List\u2026</string>
|
||||||
<!-- Band mode screen. Button caption to set the bandmode. -->
|
<!-- Band mode screen. Button caption to set the bandmode. -->
|
||||||
<string name="band_mode_set">Set</string>
|
<string name="band_mode_set">Set</string>
|
||||||
<!-- Band mode screen. Status message when unsuccessful. -->
|
<!-- Band mode screen. Status message when unsuccessful. -->
|
||||||
|
@@ -46,8 +46,10 @@ import android.telephony.CellSignalStrengthLte;
|
|||||||
import android.telephony.CellSignalStrengthWcdma;
|
import android.telephony.CellSignalStrengthWcdma;
|
||||||
import android.telephony.DataConnectionRealTimeInfo;
|
import android.telephony.DataConnectionRealTimeInfo;
|
||||||
import android.telephony.NeighboringCellInfo;
|
import android.telephony.NeighboringCellInfo;
|
||||||
|
import android.telephony.PreciseCallState;
|
||||||
import android.telephony.PhoneStateListener;
|
import android.telephony.PhoneStateListener;
|
||||||
import android.telephony.ServiceState;
|
import android.telephony.ServiceState;
|
||||||
|
import android.telephony.SignalStrength;
|
||||||
import android.telephony.SubscriptionManager;
|
import android.telephony.SubscriptionManager;
|
||||||
import android.telephony.TelephonyManager;
|
import android.telephony.TelephonyManager;
|
||||||
import android.telephony.cdma.CdmaCellLocation;
|
import android.telephony.cdma.CdmaCellLocation;
|
||||||
@@ -60,8 +62,11 @@ import android.view.View.OnClickListener;
|
|||||||
import android.widget.AdapterView;
|
import android.widget.AdapterView;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
import android.widget.CompoundButton;
|
||||||
|
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.Spinner;
|
import android.widget.Spinner;
|
||||||
|
import android.widget.Switch;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.android.ims.ImsConfig;
|
import com.android.ims.ImsConfig;
|
||||||
@@ -70,7 +75,6 @@ import com.android.ims.ImsManager;
|
|||||||
import com.android.internal.telephony.Phone;
|
import com.android.internal.telephony.Phone;
|
||||||
import com.android.internal.telephony.PhoneConstants;
|
import com.android.internal.telephony.PhoneConstants;
|
||||||
import com.android.internal.telephony.PhoneFactory;
|
import com.android.internal.telephony.PhoneFactory;
|
||||||
import com.android.internal.telephony.PhoneStateIntentReceiver;
|
|
||||||
import com.android.internal.telephony.RILConstants;
|
import com.android.internal.telephony.RILConstants;
|
||||||
import com.android.internal.telephony.TelephonyProperties;
|
import com.android.internal.telephony.TelephonyProperties;
|
||||||
|
|
||||||
@@ -82,11 +86,60 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class RadioInfo extends Activity {
|
public class RadioInfo extends Activity {
|
||||||
private final String TAG = "phone";
|
private static final String TAG = "RadioInfo";
|
||||||
|
|
||||||
|
private static final String[] mPreferredNetworkLabels = {
|
||||||
|
"WCDMA preferred",
|
||||||
|
"GSM only",
|
||||||
|
"WCDMA only",
|
||||||
|
"GSM auto (PRL)",
|
||||||
|
"CDMA auto (PRL)",
|
||||||
|
"CDMA only",
|
||||||
|
"EvDo only",
|
||||||
|
"Global auto (PRL)",
|
||||||
|
"LTE/CDMA auto (PRL)",
|
||||||
|
"LTE/UMTS auto (PRL)",
|
||||||
|
"LTE/CDMA/UMTS auto (PRL)",
|
||||||
|
"LTE only",
|
||||||
|
"LTE/WCDMA",
|
||||||
|
"TD-SCDMA only",
|
||||||
|
"TD-SCDMA/WCDMA",
|
||||||
|
"LTE/TD-SCDMA",
|
||||||
|
"TD-SCDMA/GSM",
|
||||||
|
"TD-SCDMA/UMTS",
|
||||||
|
"LTE/TD-SCDMA/WCDMA",
|
||||||
|
"LTE/TD-SCDMA/UMTS",
|
||||||
|
"TD-SCDMA/CDMA/UMTS",
|
||||||
|
"Global/TD-SCDMA",
|
||||||
|
"Unknown"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
private static final int CELL_INFO_LIST_RATE_DISABLED = Integer.MAX_VALUE;
|
||||||
|
private static final int CELL_INFO_LIST_RATE_MAX = 0;
|
||||||
|
|
||||||
|
//Values in must match mCellInfoRefreshRates
|
||||||
|
private static final String[] mCellInfoRefreshRateLabels = {
|
||||||
|
"Disabled",
|
||||||
|
"Immediate",
|
||||||
|
"Min 5s",
|
||||||
|
"Min 10s",
|
||||||
|
"Min 60s"
|
||||||
|
};
|
||||||
|
|
||||||
|
//Values in seconds, must match mCellInfoRefreshRateLabels
|
||||||
|
private static final int mCellInfoRefreshRates[] = {
|
||||||
|
CELL_INFO_LIST_RATE_DISABLED,
|
||||||
|
CELL_INFO_LIST_RATE_MAX,
|
||||||
|
5000,
|
||||||
|
10000,
|
||||||
|
60000
|
||||||
|
};
|
||||||
|
|
||||||
|
private void log(String s) {
|
||||||
|
Log.d(TAG, s);
|
||||||
|
}
|
||||||
|
|
||||||
private static final int EVENT_PHONE_STATE_CHANGED = 100;
|
|
||||||
private static final int EVENT_SIGNAL_STRENGTH_CHANGED = 200;
|
|
||||||
private static final int EVENT_SERVICE_STATE_CHANGED = 300;
|
|
||||||
private static final int EVENT_CFI_CHANGED = 302;
|
private static final int EVENT_CFI_CHANGED = 302;
|
||||||
|
|
||||||
private static final int EVENT_QUERY_PREFERRED_TYPE_DONE = 1000;
|
private static final int EVENT_QUERY_PREFERRED_TYPE_DONE = 1000;
|
||||||
@@ -101,9 +154,6 @@ public class RadioInfo extends Activity {
|
|||||||
private static final int MENU_ITEM_GET_PDP_LIST = 4;
|
private static final int MENU_ITEM_GET_PDP_LIST = 4;
|
||||||
private static final int MENU_ITEM_TOGGLE_DATA = 5;
|
private static final int MENU_ITEM_TOGGLE_DATA = 5;
|
||||||
|
|
||||||
static final String ENABLE_DATA_STR = "Enable data connection";
|
|
||||||
static final String DISABLE_DATA_STR = "Disable data connection";
|
|
||||||
|
|
||||||
private TextView mDeviceId; //DeviceId is the IMEI in GSM and the MEID in CDMA
|
private TextView mDeviceId; //DeviceId is the IMEI in GSM and the MEID in CDMA
|
||||||
private TextView number;
|
private TextView number;
|
||||||
private TextView callState;
|
private TextView callState;
|
||||||
@@ -111,7 +161,8 @@ public class RadioInfo extends Activity {
|
|||||||
private TextView roamingState;
|
private TextView roamingState;
|
||||||
private TextView gsmState;
|
private TextView gsmState;
|
||||||
private TextView gprsState;
|
private TextView gprsState;
|
||||||
private TextView network;
|
private TextView voiceNetwork;
|
||||||
|
private TextView dataNetwork;
|
||||||
private TextView dBm;
|
private TextView dBm;
|
||||||
private TextView mMwi;
|
private TextView mMwi;
|
||||||
private TextView mCfi;
|
private TextView mCfi;
|
||||||
@@ -119,11 +170,6 @@ public class RadioInfo extends Activity {
|
|||||||
private TextView mNeighboringCids;
|
private TextView mNeighboringCids;
|
||||||
private TextView mCellInfo;
|
private TextView mCellInfo;
|
||||||
private TextView mDcRtInfoTv;
|
private TextView mDcRtInfoTv;
|
||||||
private TextView resets;
|
|
||||||
private TextView attempts;
|
|
||||||
private TextView successes;
|
|
||||||
private TextView disconnects;
|
|
||||||
private TextView sentSinceReceived;
|
|
||||||
private TextView sent;
|
private TextView sent;
|
||||||
private TextView received;
|
private TextView received;
|
||||||
private TextView mPingHostnameV4;
|
private TextView mPingHostnameV4;
|
||||||
@@ -131,19 +177,20 @@ public class RadioInfo extends Activity {
|
|||||||
private TextView mHttpClientTest;
|
private TextView mHttpClientTest;
|
||||||
private TextView dnsCheckState;
|
private TextView dnsCheckState;
|
||||||
private EditText smsc;
|
private EditText smsc;
|
||||||
private Button radioPowerButton;
|
private Switch radioPowerOnSwitch;
|
||||||
private Button cellInfoListRateButton;
|
private Button cellInfoRefreshRateButton;
|
||||||
private Button dnsCheckToggleButton;
|
private Button dnsCheckToggleButton;
|
||||||
private Button pingTestButton;
|
private Button pingTestButton;
|
||||||
private Button updateSmscButton;
|
private Button updateSmscButton;
|
||||||
private Button refreshSmscButton;
|
private Button refreshSmscButton;
|
||||||
private Button oemInfoButton;
|
private Button oemInfoButton;
|
||||||
|
private Switch imsVoLteProvisionedSwitch;
|
||||||
private Spinner preferredNetworkType;
|
private Spinner preferredNetworkType;
|
||||||
|
private Spinner cellInfoRefreshRateSpinner;
|
||||||
|
|
||||||
private TelephonyManager mTelephonyManager;
|
private TelephonyManager mTelephonyManager;
|
||||||
private ImsManager mImsManager = null;
|
private ImsManager mImsManager = null;
|
||||||
private Phone phone = null;
|
private Phone phone = null;
|
||||||
private PhoneStateIntentReceiver mPhoneStateReceiver;
|
|
||||||
|
|
||||||
private String mPingHostnameResultV4;
|
private String mPingHostnameResultV4;
|
||||||
private String mPingHostnameResultV6;
|
private String mPingHostnameResultV6;
|
||||||
@@ -156,13 +203,12 @@ public class RadioInfo extends Activity {
|
|||||||
private List<NeighboringCellInfo> mNeighboringCellResult = null;
|
private List<NeighboringCellInfo> mNeighboringCellResult = null;
|
||||||
|
|
||||||
private int mPreferredNetworkTypeResult;
|
private int mPreferredNetworkTypeResult;
|
||||||
|
private int mCellInfoRefreshRateIndex;
|
||||||
|
|
||||||
private PhoneStateListener mPhoneStateListener = new PhoneStateListener() {
|
private final PhoneStateListener mPhoneStateListener = new PhoneStateListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onDataConnectionStateChanged(int state) {
|
public void onDataConnectionStateChanged(int state) {
|
||||||
updateDataState();
|
updateDataState();
|
||||||
updateDataStats();
|
|
||||||
updatePdpList();
|
|
||||||
updateNetworkType();
|
updateNetworkType();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -171,6 +217,17 @@ public class RadioInfo extends Activity {
|
|||||||
updateDataStats2();
|
updateDataStats2();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCallStateChanged(int state, String incomingNumber) {
|
||||||
|
updateNetworkType();
|
||||||
|
updatePhoneState(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPreciseCallStateChanged(PreciseCallState preciseState) {
|
||||||
|
updateNetworkType();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCellLocationChanged(CellLocation location) {
|
public void onCellLocationChanged(CellLocation location) {
|
||||||
updateLocation(location);
|
updateLocation(location);
|
||||||
@@ -200,6 +257,21 @@ public class RadioInfo extends Activity {
|
|||||||
log("onDataConnectionRealTimeInfoChanged: dcRtInfo=" + dcRtInfo);
|
log("onDataConnectionRealTimeInfoChanged: dcRtInfo=" + dcRtInfo);
|
||||||
updateDcRtInfoTv(dcRtInfo);
|
updateDcRtInfoTv(dcRtInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSignalStrengthsChanged(SignalStrength signalStrength) {
|
||||||
|
log("onSignalStrengthChanged: SignalStrength=" +signalStrength);
|
||||||
|
updateSignalStrength(signalStrength);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onServiceStateChanged(ServiceState serviceState) {
|
||||||
|
log("onServiceStateChanged: ServiceState=" + serviceState);
|
||||||
|
updateServiceState(serviceState);
|
||||||
|
updateRadioPowerState();
|
||||||
|
updateNetworkType();
|
||||||
|
updateImsVoLteProvisionedState();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private void updatePreferredNetworkType(int type) {
|
private void updatePreferredNetworkType(int type) {
|
||||||
@@ -218,20 +290,6 @@ public class RadioInfo extends Activity {
|
|||||||
public void handleMessage(Message msg) {
|
public void handleMessage(Message msg) {
|
||||||
AsyncResult ar;
|
AsyncResult ar;
|
||||||
switch (msg.what) {
|
switch (msg.what) {
|
||||||
case EVENT_PHONE_STATE_CHANGED:
|
|
||||||
updatePhoneState();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case EVENT_SIGNAL_STRENGTH_CHANGED:
|
|
||||||
updateSignalStrength();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case EVENT_SERVICE_STATE_CHANGED:
|
|
||||||
updateServiceState();
|
|
||||||
updatePowerState();
|
|
||||||
updateImsVoLteProvisionedState();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case EVENT_QUERY_PREFERRED_TYPE_DONE:
|
case EVENT_QUERY_PREFERRED_TYPE_DONE:
|
||||||
ar= (AsyncResult) msg.obj;
|
ar= (AsyncResult) msg.obj;
|
||||||
if (ar.exception == null && ar.result != null) {
|
if (ar.exception == null && ar.result != null) {
|
||||||
@@ -293,7 +351,8 @@ public class RadioInfo extends Activity {
|
|||||||
roamingState = (TextView) findViewById(R.id.roaming);
|
roamingState = (TextView) findViewById(R.id.roaming);
|
||||||
gsmState = (TextView) findViewById(R.id.gsm);
|
gsmState = (TextView) findViewById(R.id.gsm);
|
||||||
gprsState = (TextView) findViewById(R.id.gprs);
|
gprsState = (TextView) findViewById(R.id.gprs);
|
||||||
network = (TextView) findViewById(R.id.network);
|
voiceNetwork = (TextView) findViewById(R.id.voice_network);
|
||||||
|
dataNetwork = (TextView) findViewById(R.id.data_network);
|
||||||
dBm = (TextView) findViewById(R.id.dbm);
|
dBm = (TextView) findViewById(R.id.dbm);
|
||||||
mMwi = (TextView) findViewById(R.id.mwi);
|
mMwi = (TextView) findViewById(R.id.mwi);
|
||||||
mCfi = (TextView) findViewById(R.id.cfi);
|
mCfi = (TextView) findViewById(R.id.cfi);
|
||||||
@@ -303,11 +362,6 @@ public class RadioInfo extends Activity {
|
|||||||
mCellInfo.setTypeface(Typeface.MONOSPACE);
|
mCellInfo.setTypeface(Typeface.MONOSPACE);
|
||||||
mDcRtInfoTv = (TextView) findViewById(R.id.dcrtinfo);
|
mDcRtInfoTv = (TextView) findViewById(R.id.dcrtinfo);
|
||||||
|
|
||||||
resets = (TextView) findViewById(R.id.resets);
|
|
||||||
attempts = (TextView) findViewById(R.id.attempts);
|
|
||||||
successes = (TextView) findViewById(R.id.successes);
|
|
||||||
disconnects = (TextView) findViewById(R.id.disconnects);
|
|
||||||
sentSinceReceived = (TextView) findViewById(R.id.sentSinceReceived);
|
|
||||||
sent = (TextView) findViewById(R.id.sent);
|
sent = (TextView) findViewById(R.id.sent);
|
||||||
received = (TextView) findViewById(R.id.received);
|
received = (TextView) findViewById(R.id.received);
|
||||||
smsc = (EditText) findViewById(R.id.smsc);
|
smsc = (EditText) findViewById(R.id.smsc);
|
||||||
@@ -321,25 +375,16 @@ public class RadioInfo extends Activity {
|
|||||||
android.R.layout.simple_spinner_item, mPreferredNetworkLabels);
|
android.R.layout.simple_spinner_item, mPreferredNetworkLabels);
|
||||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||||
preferredNetworkType.setAdapter(adapter);
|
preferredNetworkType.setAdapter(adapter);
|
||||||
preferredNetworkType.setOnItemSelectedListener(mPreferredNetworkHandler);
|
|
||||||
|
|
||||||
radioPowerButton = (Button) findViewById(R.id.radio_power);
|
cellInfoRefreshRateSpinner = (Spinner) findViewById(R.id.cell_info_rate_select);
|
||||||
radioPowerButton.setOnClickListener(mPowerButtonHandler);
|
ArrayAdapter<String> cellInfoAdapter = new ArrayAdapter<String>(this,
|
||||||
|
android.R.layout.simple_spinner_item, mCellInfoRefreshRateLabels);
|
||||||
|
cellInfoAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||||
|
cellInfoRefreshRateSpinner.setAdapter(cellInfoAdapter);
|
||||||
|
|
||||||
cellInfoListRateButton = (Button) findViewById(R.id.cell_info_list_rate);
|
imsVoLteProvisionedSwitch = (Switch) findViewById(R.id.volte_provisioned_switch);
|
||||||
cellInfoListRateButton.setOnClickListener(mCellInfoListRateHandler);
|
|
||||||
|
|
||||||
imsRegRequiredButton = (Button) findViewById(R.id.ims_reg_required);
|
radioPowerOnSwitch = (Switch) findViewById(R.id.radio_power);
|
||||||
imsRegRequiredButton.setOnClickListener(mImsRegRequiredHandler);
|
|
||||||
|
|
||||||
imsVoLteProvisionedButton = (Button) findViewById(R.id.volte_provisioned_flag);
|
|
||||||
imsVoLteProvisionedButton.setOnClickListener(mImsVoLteProvisionedHandler);
|
|
||||||
|
|
||||||
smsOverImsButton = (Button) findViewById(R.id.sms_over_ims);
|
|
||||||
smsOverImsButton.setOnClickListener(mSmsOverImsHandler);
|
|
||||||
|
|
||||||
lteRamDumpButton = (Button) findViewById(R.id.lte_ram_dump);
|
|
||||||
lteRamDumpButton.setOnClickListener(mLteRamDumpHandler);
|
|
||||||
|
|
||||||
pingTestButton = (Button) findViewById(R.id.ping_test);
|
pingTestButton = (Button) findViewById(R.id.ping_test);
|
||||||
pingTestButton.setOnClickListener(mPingButtonHandler);
|
pingTestButton.setOnClickListener(mPingButtonHandler);
|
||||||
@@ -359,11 +404,7 @@ public class RadioInfo extends Activity {
|
|||||||
oemInfoButton.setEnabled(false);
|
oemInfoButton.setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
mPhoneStateReceiver = new PhoneStateIntentReceiver(this, mHandler);
|
mCellInfoRefreshRateIndex = CELL_INFO_LIST_RATE_DISABLED;
|
||||||
mPhoneStateReceiver.notifySignalStrength(EVENT_SIGNAL_STRENGTH_CHANGED);
|
|
||||||
mPhoneStateReceiver.notifyServiceState(EVENT_SERVICE_STATE_CHANGED);
|
|
||||||
mPhoneStateReceiver.notifyPhoneCallState(EVENT_PHONE_STATE_CHANGED);
|
|
||||||
|
|
||||||
mPreferredNetworkTypeResult = mPreferredNetworkLabels.length - 1; //Unknown
|
mPreferredNetworkTypeResult = mPreferredNetworkLabels.length - 1; //Unknown
|
||||||
|
|
||||||
//FIXME: Replace with TelephonyManager call
|
//FIXME: Replace with TelephonyManager call
|
||||||
@@ -379,22 +420,15 @@ public class RadioInfo extends Activity {
|
|||||||
|
|
||||||
log("Started onResume");
|
log("Started onResume");
|
||||||
|
|
||||||
updatePhoneState();
|
|
||||||
updateSignalStrength();
|
|
||||||
updateMessageWaiting();
|
updateMessageWaiting();
|
||||||
updateCallRedirect();
|
updateCallRedirect();
|
||||||
updateServiceState();
|
|
||||||
updateDataState();
|
updateDataState();
|
||||||
updateDataStats();
|
|
||||||
updateDataStats2();
|
updateDataStats2();
|
||||||
updatePowerState();
|
updateRadioPowerState();
|
||||||
updateCellInfoListRate();
|
|
||||||
updateImsRegRequiredState();
|
|
||||||
updateImsVoLteProvisionedState();
|
updateImsVoLteProvisionedState();
|
||||||
updateSmsOverImsState();
|
|
||||||
updateLteRamDumpState();
|
|
||||||
updateProperties();
|
updateProperties();
|
||||||
updateDnsCheckState();
|
updateDnsCheckState();
|
||||||
|
updateNetworkType();
|
||||||
|
|
||||||
updateNeighboringCids(mNeighboringCellResult);
|
updateNeighboringCids(mNeighboringCellResult);
|
||||||
updateLocation(mCellLocationResult);
|
updateLocation(mCellLocationResult);
|
||||||
@@ -404,14 +438,24 @@ public class RadioInfo extends Activity {
|
|||||||
mPingHostnameV6.setText(mPingHostnameResultV6);
|
mPingHostnameV6.setText(mPingHostnameResultV6);
|
||||||
mHttpClientTest.setText(mHttpClientTestResult);
|
mHttpClientTest.setText(mHttpClientTestResult);
|
||||||
|
|
||||||
mPhoneStateReceiver.registerIntent();
|
//move these here so that the initial updates in create don't cause values to reset
|
||||||
|
cellInfoRefreshRateSpinner.setOnItemSelectedListener(mCellInfoRefreshRateHandler);
|
||||||
|
preferredNetworkType.setOnItemSelectedListener(mPreferredNetworkHandler);
|
||||||
|
radioPowerOnSwitch.setOnCheckedChangeListener(mRadioPowerOnChangeListener);
|
||||||
|
imsVoLteProvisionedSwitch.setOnCheckedChangeListener(mImsVoLteCheckedChangeListener);
|
||||||
|
|
||||||
mTelephonyManager.listen(mPhoneStateListener,
|
mTelephonyManager.listen(mPhoneStateListener,
|
||||||
PhoneStateListener.LISTEN_DATA_CONNECTION_STATE
|
PhoneStateListener.LISTEN_CALL_STATE
|
||||||
|
//b/27803938 - RadioInfo currently cannot read PRECISE_CALL_STATE
|
||||||
|
// | PhoneStateListener.LISTEN_PRECISE_CALL_STATE
|
||||||
|
| PhoneStateListener.LISTEN_DATA_CONNECTION_STATE
|
||||||
| PhoneStateListener.LISTEN_DATA_ACTIVITY
|
| PhoneStateListener.LISTEN_DATA_ACTIVITY
|
||||||
| PhoneStateListener.LISTEN_CELL_LOCATION
|
| PhoneStateListener.LISTEN_CELL_LOCATION
|
||||||
| PhoneStateListener.LISTEN_MESSAGE_WAITING_INDICATOR
|
| PhoneStateListener.LISTEN_MESSAGE_WAITING_INDICATOR
|
||||||
| PhoneStateListener.LISTEN_CALL_FORWARDING_INDICATOR
|
| PhoneStateListener.LISTEN_CALL_FORWARDING_INDICATOR
|
||||||
| PhoneStateListener.LISTEN_CELL_INFO
|
| PhoneStateListener.LISTEN_CELL_INFO
|
||||||
|
| PhoneStateListener.LISTEN_SERVICE_STATE
|
||||||
|
| PhoneStateListener.LISTEN_SIGNAL_STRENGTHS
|
||||||
| PhoneStateListener.LISTEN_DATA_CONNECTION_REAL_TIME_INFO);
|
| PhoneStateListener.LISTEN_DATA_CONNECTION_REAL_TIME_INFO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -421,7 +465,6 @@ public class RadioInfo extends Activity {
|
|||||||
|
|
||||||
log("onPause: unregister phone & data intents");
|
log("onPause: unregister phone & data intents");
|
||||||
|
|
||||||
mPhoneStateReceiver.unregisterIntent();
|
|
||||||
mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE);
|
mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -438,7 +481,12 @@ public class RadioInfo extends Activity {
|
|||||||
mPingHostnameV6.setText(mPingHostnameResultV6);
|
mPingHostnameV6.setText(mPingHostnameResultV6);
|
||||||
mHttpClientTest.setText(mHttpClientTestResult);
|
mHttpClientTest.setText(mHttpClientTestResult);
|
||||||
|
|
||||||
mPreferredNetworkTypeResult = b.getInt("mPreferredNetworkTypeResult", 0);
|
mPreferredNetworkTypeResult = b.getInt("mPreferredNetworkTypeResult",
|
||||||
|
mPreferredNetworkLabels.length - 1);
|
||||||
|
|
||||||
|
mCellInfoRefreshRateIndex = b.getInt("mCellInfoRefreshRateIndex", 0);
|
||||||
|
|
||||||
|
cellInfoRefreshRateSpinner.setSelection(mCellInfoRefreshRateIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -446,7 +494,11 @@ public class RadioInfo extends Activity {
|
|||||||
outState.putString("mPingHostnameResultV4", mPingHostnameResultV4);
|
outState.putString("mPingHostnameResultV4", mPingHostnameResultV4);
|
||||||
outState.putString("mPingHostnameResultV6", mPingHostnameResultV6);
|
outState.putString("mPingHostnameResultV6", mPingHostnameResultV6);
|
||||||
outState.putString("mHttpClientTestResult", mHttpClientTestResult);
|
outState.putString("mHttpClientTestResult", mHttpClientTestResult);
|
||||||
|
|
||||||
outState.putInt("mPreferredNetworkTypeResult", mPreferredNetworkTypeResult);
|
outState.putInt("mPreferredNetworkTypeResult", mPreferredNetworkTypeResult);
|
||||||
|
|
||||||
|
outState.putInt("mCellInfoRefreshRateIndex", mCellInfoRefreshRateIndex);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -463,7 +515,7 @@ public class RadioInfo extends Activity {
|
|||||||
menu.add(1, MENU_ITEM_GET_PDP_LIST,
|
menu.add(1, MENU_ITEM_GET_PDP_LIST,
|
||||||
0, R.string.radioInfo_menu_getPDP).setOnMenuItemClickListener(mGetPdpList);
|
0, R.string.radioInfo_menu_getPDP).setOnMenuItemClickListener(mGetPdpList);
|
||||||
menu.add(1, MENU_ITEM_TOGGLE_DATA,
|
menu.add(1, MENU_ITEM_TOGGLE_DATA,
|
||||||
0, DISABLE_DATA_STR).setOnMenuItemClickListener(mToggleData);
|
0, R.string.radio_info_data_connection_disable).setOnMenuItemClickListener(mToggleData);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -477,10 +529,10 @@ public class RadioInfo extends Activity {
|
|||||||
switch (state) {
|
switch (state) {
|
||||||
case TelephonyManager.DATA_CONNECTED:
|
case TelephonyManager.DATA_CONNECTED:
|
||||||
case TelephonyManager.DATA_SUSPENDED:
|
case TelephonyManager.DATA_SUSPENDED:
|
||||||
item.setTitle(DISABLE_DATA_STR);
|
item.setTitle(R.string.radio_info_data_connection_disable);
|
||||||
break;
|
break;
|
||||||
case TelephonyManager.DATA_DISCONNECTED:
|
case TelephonyManager.DATA_DISCONNECTED:
|
||||||
item.setTitle(ENABLE_DATA_STR);
|
item.setTitle(R.string.radio_info_data_connection_enable);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
visible = false;
|
visible = false;
|
||||||
@@ -490,35 +542,6 @@ public class RadioInfo extends Activity {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isRadioOn() {
|
|
||||||
//FIXME: Replace with a TelephonyManager call
|
|
||||||
return phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updatePowerState() {
|
|
||||||
String buttonText = isRadioOn() ?
|
|
||||||
getString(R.string.turn_off_radio) :
|
|
||||||
getString(R.string.turn_on_radio);
|
|
||||||
radioPowerButton.setText(buttonText);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateCellInfoListRate() {
|
|
||||||
int rate = mCellInfoListRateHandler.getRate();
|
|
||||||
String rateStr;
|
|
||||||
switch(rate) {
|
|
||||||
case Integer.MAX_VALUE:
|
|
||||||
rateStr = "Off";
|
|
||||||
break;
|
|
||||||
case 0:
|
|
||||||
rateStr = "Immediate";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
rateStr = (new Integer(rate)).toString() + "ms";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
cellInfoListRateButton.setText("CellInfoListRate "+ rateStr);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateDnsCheckState() {
|
private void updateDnsCheckState() {
|
||||||
//FIXME: Replace with a TelephonyManager call
|
//FIXME: Replace with a TelephonyManager call
|
||||||
dnsCheckState.setText(phone.isDnsCheckDisabled() ?
|
dnsCheckState.setText(phone.isDnsCheckDisabled() ?
|
||||||
@@ -526,22 +549,12 @@ public class RadioInfo extends Activity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private final void
|
private final void
|
||||||
updateSignalStrength() {
|
updateSignalStrength(SignalStrength signalStrength) {
|
||||||
// TODO PhoneStateIntentReceiver is deprecated and PhoneStateListener
|
|
||||||
// should probably used instead.
|
|
||||||
int state = mPhoneStateReceiver.getServiceState().getState();
|
|
||||||
Resources r = getResources();
|
Resources r = getResources();
|
||||||
|
|
||||||
if ((ServiceState.STATE_OUT_OF_SERVICE == state) ||
|
int signalDbm = signalStrength.getDbm();
|
||||||
(ServiceState.STATE_POWER_OFF == state)) {
|
|
||||||
dBm.setText("0");
|
|
||||||
}
|
|
||||||
|
|
||||||
int signalDbm = mPhoneStateReceiver.getSignalStrengthDbm();
|
int signalAsu = signalStrength.getAsuLevel();
|
||||||
|
|
||||||
if (-1 == signalDbm) signalDbm = 0;
|
|
||||||
|
|
||||||
int signalAsu = mPhoneStateReceiver.getSignalStrengthLevelAsu();
|
|
||||||
|
|
||||||
if (-1 == signalAsu) signalAsu = 0;
|
if (-1 == signalAsu) signalAsu = 0;
|
||||||
|
|
||||||
@@ -635,15 +648,14 @@ public class RadioInfo extends Activity {
|
|||||||
CellIdentityGsm cidGsm = ci.getCellIdentity();
|
CellIdentityGsm cidGsm = ci.getCellIdentity();
|
||||||
CellSignalStrengthGsm ssGsm = ci.getCellSignalStrength();
|
CellSignalStrengthGsm ssGsm = ci.getCellSignalStrength();
|
||||||
|
|
||||||
return String.format("%-3.3s %-3.3s %-3.3s %-5.5s %-5.5s %-4.4s %-4.4s\n",
|
return String.format("%-3.3s %-3.3s %-3.3s %-5.5s %-5.5s %-6.6s %-4.4s %-4.4s\n",
|
||||||
ci.isRegistered() ? "S " : " ",
|
ci.isRegistered() ? "S " : " ",
|
||||||
getCellInfoDisplayString(cidGsm.getMcc()),
|
getCellInfoDisplayString(cidGsm.getMcc()),
|
||||||
getCellInfoDisplayString(cidGsm.getMnc()),
|
getCellInfoDisplayString(cidGsm.getMnc()),
|
||||||
getCellInfoDisplayString(cidGsm.getLac()),
|
getCellInfoDisplayString(cidGsm.getLac()),
|
||||||
getCellInfoDisplayString(cidGsm.getCid()),
|
getCellInfoDisplayString(cidGsm.getCid()),
|
||||||
// TODO: Add BSIC support once integrated
|
getCellInfoDisplayString(cidGsm.getArfcn()),
|
||||||
// getCellInfoDisplayString(cidGsm.getBsic()),
|
getCellInfoDisplayString(cidGsm.getBsic()),
|
||||||
" ",
|
|
||||||
getCellInfoDisplayString(ssGsm.getDbm()));
|
getCellInfoDisplayString(ssGsm.getDbm()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -652,13 +664,14 @@ public class RadioInfo extends Activity {
|
|||||||
CellSignalStrengthLte ssLte = ci.getCellSignalStrength();
|
CellSignalStrengthLte ssLte = ci.getCellSignalStrength();
|
||||||
|
|
||||||
return String.format(
|
return String.format(
|
||||||
"%-3.3s %-3.3s %-3.3s %-5.5s %-5.5s %-3.3s %-4.4s %-4.4s %-2.2s\n",
|
"%-3.3s %-3.3s %-3.3s %-5.5s %-5.5s %-3.3s %-6.6s %-4.4s %-4.4s %-2.2s\n",
|
||||||
ci.isRegistered() ? "S " : " ",
|
ci.isRegistered() ? "S " : " ",
|
||||||
getCellInfoDisplayString(cidLte.getMcc()),
|
getCellInfoDisplayString(cidLte.getMcc()),
|
||||||
getCellInfoDisplayString(cidLte.getMnc()),
|
getCellInfoDisplayString(cidLte.getMnc()),
|
||||||
getCellInfoDisplayString(cidLte.getTac()),
|
getCellInfoDisplayString(cidLte.getTac()),
|
||||||
getCellInfoDisplayString(cidLte.getCi()),
|
getCellInfoDisplayString(cidLte.getCi()),
|
||||||
getCellInfoDisplayString(cidLte.getPci()),
|
getCellInfoDisplayString(cidLte.getPci()),
|
||||||
|
getCellInfoDisplayString(cidLte.getEarfcn()),
|
||||||
getCellInfoDisplayString(ssLte.getDbm()),
|
getCellInfoDisplayString(ssLte.getDbm()),
|
||||||
getCellInfoDisplayString(ssLte.getRsrq()),
|
getCellInfoDisplayString(ssLte.getRsrq()),
|
||||||
getCellInfoDisplayString(ssLte.getTimingAdvance()));
|
getCellInfoDisplayString(ssLte.getTimingAdvance()));
|
||||||
@@ -668,12 +681,13 @@ public class RadioInfo extends Activity {
|
|||||||
CellIdentityWcdma cidWcdma = ci.getCellIdentity();
|
CellIdentityWcdma cidWcdma = ci.getCellIdentity();
|
||||||
CellSignalStrengthWcdma ssWcdma = ci.getCellSignalStrength();
|
CellSignalStrengthWcdma ssWcdma = ci.getCellSignalStrength();
|
||||||
|
|
||||||
return String.format("%-3.3s %-3.3s %-3.3s %-5.5s %-5.5s %-5.5s %-4.4s\n",
|
return String.format("%-3.3s %-3.3s %-3.3s %-5.5s %-5.5s %-6.6s %-3.3s %-4.4s\n",
|
||||||
ci.isRegistered() ? "S " : " ",
|
ci.isRegistered() ? "S " : " ",
|
||||||
getCellInfoDisplayString(cidWcdma.getMcc()),
|
getCellInfoDisplayString(cidWcdma.getMcc()),
|
||||||
getCellInfoDisplayString(cidWcdma.getMnc()),
|
getCellInfoDisplayString(cidWcdma.getMnc()),
|
||||||
getCellInfoDisplayString(cidWcdma.getLac()),
|
getCellInfoDisplayString(cidWcdma.getLac()),
|
||||||
getCellInfoDisplayString(cidWcdma.getCid()),
|
getCellInfoDisplayString(cidWcdma.getCid()),
|
||||||
|
getCellInfoDisplayString(cidWcdma.getUarfcn()),
|
||||||
getCellInfoDisplayString(cidWcdma.getPsc()),
|
getCellInfoDisplayString(cidWcdma.getPsc()),
|
||||||
getCellInfoDisplayString(ssWcdma.getDbm()));
|
getCellInfoDisplayString(ssWcdma.getDbm()));
|
||||||
}
|
}
|
||||||
@@ -700,18 +714,18 @@ public class RadioInfo extends Activity {
|
|||||||
}
|
}
|
||||||
if (lteCells.length() != 0) {
|
if (lteCells.length() != 0) {
|
||||||
value += String.format(
|
value += String.format(
|
||||||
"LTE\n%-3.3s %-3.3s %-3.3s %-5.5s %-5.5s %-3.3s %-4.4s %-4.4s %-2.2s\n",
|
"LTE\n%-3.3s %-3.3s %-3.3s %-5.5s %-5.5s %-3.3s %-6.6s %-4.4s %-4.4s %-2.2s\n",
|
||||||
"SRV", "MCC", "MNC", "TAC", "CID", "PCI", "RSRP", "RSRQ", "TA");
|
"SRV", "MCC", "MNC", "TAC", "CID", "PCI", "EARFCN", "RSRP", "RSRQ", "TA");
|
||||||
value += lteCells.toString();
|
value += lteCells.toString();
|
||||||
}
|
}
|
||||||
if (wcdmaCells.length() != 0) {
|
if (wcdmaCells.length() != 0) {
|
||||||
value += String.format("WCDMA\n%-3.3s %-3.3s %-3.3s %-5.5s %-5.5s %-5.5s %-4.4s\n",
|
value += String.format("WCDMA\n%-3.3s %-3.3s %-3.3s %-5.5s %-5.5s %-6.6s %-3.3s %-4.4s\n",
|
||||||
"SRV", "MCC", "MNC", "LAC", "CID", "PSC", "RSCP");
|
"SRV", "MCC", "MNC", "LAC", "CID", "UARFCN", "PSC", "RSCP");
|
||||||
value += wcdmaCells.toString();
|
value += wcdmaCells.toString();
|
||||||
}
|
}
|
||||||
if (gsmCells.length() != 0) {
|
if (gsmCells.length() != 0) {
|
||||||
value += String.format("GSM\n%-3.3s %-3.3s %-3.3s %-5.5s %-5.5s %-4.4s %-4.4s\n",
|
value += String.format("GSM\n%-3.3s %-3.3s %-3.3s %-5.5s %-5.5s %-6.6s %-4.4s %-4.4s\n",
|
||||||
"SRV", "MCC", "MNC", "LAC", "CID", "BSIC", "RSSI");
|
"SRV", "MCC", "MNC", "LAC", "CID", "ARFCN", "BSIC", "RSSI");
|
||||||
value += gsmCells.toString();
|
value += gsmCells.toString();
|
||||||
}
|
}
|
||||||
if (cdmaCells.length() != 0) {
|
if (cdmaCells.length() != 0) {
|
||||||
@@ -747,8 +761,7 @@ public class RadioInfo extends Activity {
|
|||||||
|
|
||||||
|
|
||||||
private final void
|
private final void
|
||||||
updateServiceState() {
|
updateServiceState(ServiceState serviceState) {
|
||||||
ServiceState serviceState = mPhoneStateReceiver.getServiceState();
|
|
||||||
int state = serviceState.getState();
|
int state = serviceState.getState();
|
||||||
Resources r = getResources();
|
Resources r = getResources();
|
||||||
String display = r.getString(R.string.radioInfo_unknown);
|
String display = r.getString(R.string.radioInfo_unknown);
|
||||||
@@ -778,19 +791,18 @@ public class RadioInfo extends Activity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private final void
|
private final void
|
||||||
updatePhoneState() {
|
updatePhoneState(int state) {
|
||||||
PhoneConstants.State state = mPhoneStateReceiver.getPhoneState();
|
|
||||||
Resources r = getResources();
|
Resources r = getResources();
|
||||||
String display = r.getString(R.string.radioInfo_unknown);
|
String display = r.getString(R.string.radioInfo_unknown);
|
||||||
|
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case IDLE:
|
case TelephonyManager.CALL_STATE_IDLE:
|
||||||
display = r.getString(R.string.radioInfo_phone_idle);
|
display = r.getString(R.string.radioInfo_phone_idle);
|
||||||
break;
|
break;
|
||||||
case RINGING:
|
case TelephonyManager.CALL_STATE_RINGING:
|
||||||
display = r.getString(R.string.radioInfo_phone_ringing);
|
display = r.getString(R.string.radioInfo_phone_ringing);
|
||||||
break;
|
break;
|
||||||
case OFFHOOK:
|
case TelephonyManager.CALL_STATE_OFFHOOK:
|
||||||
display = r.getString(R.string.radioInfo_phone_offhook);
|
display = r.getString(R.string.radioInfo_phone_offhook);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -823,11 +835,13 @@ public class RadioInfo extends Activity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private final void updateNetworkType() {
|
private final void updateNetworkType() {
|
||||||
Resources r = getResources();
|
if( phone != null ) {
|
||||||
String display = SystemProperties.get(TelephonyProperties.PROPERTY_DATA_NETWORK_TYPE,
|
ServiceState ss = phone.getServiceState();
|
||||||
r.getString(R.string.radioInfo_unknown));
|
dataNetwork.setText(ServiceState.rilRadioTechnologyToString(
|
||||||
|
phone.getServiceState().getRilDataRadioTechnology()));
|
||||||
network.setText(display);
|
voiceNetwork.setText(ServiceState.rilRadioTechnologyToString(
|
||||||
|
phone.getServiceState().getRilVoiceRadioTechnology()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private final void
|
private final void
|
||||||
@@ -845,25 +859,6 @@ public class RadioInfo extends Activity {
|
|||||||
number.setText(s);
|
number.setText(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final void updateDataStats() {
|
|
||||||
String s;
|
|
||||||
|
|
||||||
s = SystemProperties.get("net.gsm.radio-reset", "0");
|
|
||||||
resets.setText(s);
|
|
||||||
|
|
||||||
s = SystemProperties.get("net.gsm.attempt-gprs", "0");
|
|
||||||
attempts.setText(s);
|
|
||||||
|
|
||||||
s = SystemProperties.get("net.gsm.succeed-gprs", "0");
|
|
||||||
successes.setText(s);
|
|
||||||
|
|
||||||
//s = SystemProperties.get("net.gsm.disconnect", "0");
|
|
||||||
//disconnects.setText(s);
|
|
||||||
|
|
||||||
s = SystemProperties.get("net.ppp.reset-by-timeout", "0");
|
|
||||||
sentSinceReceived.setText(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
private final void updateDataStats2() {
|
private final void updateDataStats2() {
|
||||||
Resources r = getResources();
|
Resources r = getResources();
|
||||||
|
|
||||||
@@ -1003,48 +998,6 @@ public class RadioInfo extends Activity {
|
|||||||
httpClient.start();
|
httpClient.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private final void updatePdpList() {
|
|
||||||
StringBuilder sb = new StringBuilder("========DATA=======\n");
|
|
||||||
|
|
||||||
// List<DataConnection> dcs = phone.getCurrentDataConnectionList();
|
|
||||||
//
|
|
||||||
// for (DataConnection dc : dcs) {
|
|
||||||
// sb.append(" State=").append(dc.getStateAsString()).append("\n");
|
|
||||||
// if (dc.isActive()) {
|
|
||||||
// long timeElapsed =
|
|
||||||
// (System.currentTimeMillis() - dc.getConnectionTime())/1000;
|
|
||||||
// sb.append(" connected at ")
|
|
||||||
// .append(DateUtils.timeString(dc.getConnectionTime()))
|
|
||||||
// .append(" and elapsed ")
|
|
||||||
// .append(DateUtils.formatElapsedTime(timeElapsed));
|
|
||||||
//
|
|
||||||
// if (dc instanceof GsmDataConnection) {
|
|
||||||
// GsmDataConnection pdp = (GsmDataConnection)dc;
|
|
||||||
// sb.append("\n to ")
|
|
||||||
// .append(pdp.getApn().toString());
|
|
||||||
// }
|
|
||||||
// sb.append("\nLinkProperties: ");
|
|
||||||
// sb.append(phone.getLinkProperties(phone.getActiveApnTypes()[0]).toString());
|
|
||||||
// } else if (dc.isInactive()) {
|
|
||||||
// sb.append(" disconnected with last try at ")
|
|
||||||
// .append(DateUtils.timeString(dc.getLastFailTime()))
|
|
||||||
// .append("\n fail because ")
|
|
||||||
// .append(dc.getLastFailCause().toString());
|
|
||||||
// } else {
|
|
||||||
// if (dc instanceof GsmDataConnection) {
|
|
||||||
// GsmDataConnection pdp = (GsmDataConnection)dc;
|
|
||||||
// sb.append(" is connecting to ")
|
|
||||||
// .append(pdp.getApn().toString());
|
|
||||||
// } else {
|
|
||||||
// sb.append(" is connecting");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// sb.append("\n===================");
|
|
||||||
// }
|
|
||||||
|
|
||||||
disconnects.setText(sb.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
private MenuItem.OnMenuItemClickListener mViewADNCallback = new MenuItem.OnMenuItemClickListener() {
|
private MenuItem.OnMenuItemClickListener mViewADNCallback = new MenuItem.OnMenuItemClickListener() {
|
||||||
public boolean onMenuItemClick(MenuItem item) {
|
public boolean onMenuItemClick(MenuItem item) {
|
||||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||||
@@ -1128,95 +1081,37 @@ public class RadioInfo extends Activity {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
OnClickListener mPowerButtonHandler = new OnClickListener() {
|
private boolean isRadioOn() {
|
||||||
public void onClick(View v) {
|
|
||||||
//log("toggle radio power: currently " + (isRadioOn()?"on":"off"));
|
|
||||||
//FIXME: Replace with a TelephonyManager call
|
//FIXME: Replace with a TelephonyManager call
|
||||||
phone.setRadioPower(!isRadioOn());
|
return phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateRadioPowerState() {
|
||||||
|
//delightful hack to prevent on-checked-changed calls from
|
||||||
|
//actually forcing the radio preference to its transient/current value.
|
||||||
|
radioPowerOnSwitch.setOnCheckedChangeListener(null);
|
||||||
|
radioPowerOnSwitch.setChecked(isRadioOn());
|
||||||
|
radioPowerOnSwitch.setOnCheckedChangeListener(mRadioPowerOnChangeListener);
|
||||||
|
}
|
||||||
|
|
||||||
|
OnCheckedChangeListener mRadioPowerOnChangeListener = new OnCheckedChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
|
log("toggle radio power: currently " + (isRadioOn()?"on":"off"));
|
||||||
|
phone.setRadioPower(isChecked);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class CellInfoListRateHandler implements OnClickListener {
|
void setImsVoLteProvisionedState( boolean state ) {
|
||||||
int rates[] = {Integer.MAX_VALUE, 0, 5000};
|
log(String.format("toggle VoLTE provisioned: %s", ((state) ? "on":"off")));
|
||||||
int index = 0;
|
|
||||||
|
|
||||||
public int getRate() {
|
if (phone != null && mImsManager != null) {
|
||||||
return rates[index];
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
index += 1;
|
|
||||||
index %= rates.length;
|
|
||||||
|
|
||||||
// FIXME: Replace with a TelephonyManager call
|
|
||||||
phone.setCellInfoListRate(rates[index]);
|
|
||||||
updateCellInfoListRate();
|
|
||||||
|
|
||||||
updateAllCellInfo();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CellInfoListRateHandler mCellInfoListRateHandler = new CellInfoListRateHandler();
|
|
||||||
|
|
||||||
private Button imsRegRequiredButton;
|
|
||||||
static final String PROPERTY_IMS_REG_REQUIRED = "persist.radio.imsregrequired";
|
|
||||||
OnClickListener mImsRegRequiredHandler = new OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
log(String.format("toggle %s: currently %s",
|
|
||||||
PROPERTY_IMS_REG_REQUIRED, (isImsRegRequired() ? "on":"off")));
|
|
||||||
boolean newValue = !isImsRegRequired();
|
|
||||||
SystemProperties.set(PROPERTY_IMS_REG_REQUIRED,
|
|
||||||
newValue ? "1":"0");
|
|
||||||
updateImsRegRequiredState();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
private boolean isImsRegRequired() {
|
|
||||||
return SystemProperties.getBoolean(PROPERTY_IMS_REG_REQUIRED, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateImsRegRequiredState() {
|
|
||||||
log("updateImsRegRequiredState isImsRegRequired()=" + isImsRegRequired());
|
|
||||||
String buttonText = isImsRegRequired() ?
|
|
||||||
getString(R.string.ims_reg_required_off) :
|
|
||||||
getString(R.string.ims_reg_required_on);
|
|
||||||
imsRegRequiredButton.setText(buttonText);
|
|
||||||
}
|
|
||||||
|
|
||||||
private Button smsOverImsButton;
|
|
||||||
static final String PROPERTY_SMS_OVER_IMS = "persist.radio.imsallowmtsms";
|
|
||||||
OnClickListener mSmsOverImsHandler = new OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
log(String.format("toggle %s: currently %s",
|
|
||||||
PROPERTY_SMS_OVER_IMS, (isSmsOverImsEnabled() ? "on":"off")));
|
|
||||||
boolean newValue = !isSmsOverImsEnabled();
|
|
||||||
SystemProperties.set(PROPERTY_SMS_OVER_IMS, newValue ? "1":"0");
|
|
||||||
updateSmsOverImsState();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
private boolean isSmsOverImsEnabled() {
|
|
||||||
return SystemProperties.getBoolean(PROPERTY_SMS_OVER_IMS, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
private Button imsVoLteProvisionedButton;
|
|
||||||
OnClickListener mImsVoLteProvisionedHandler = new OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
log(String.format("toggle VoLTE provisioned: currently %s",
|
|
||||||
(isImsVoLteProvisioned() ? "on":"off")));
|
|
||||||
final boolean newValue = !isImsVoLteProvisioned();
|
|
||||||
if (phone != null) {
|
|
||||||
//TODO: Why does this have to be called within the phone's context?
|
|
||||||
if (mImsManager != null) {
|
|
||||||
QueuedWork.singleThreadExecutor().submit(new Runnable() {
|
QueuedWork.singleThreadExecutor().submit(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
mImsManager.getConfigInterface().setProvisionedValue(
|
mImsManager.getConfigInterface().setProvisionedValue(
|
||||||
ImsConfig.ConfigConstants.VLT_SETTING_ENABLED,
|
ImsConfig.ConfigConstants.VLT_SETTING_ENABLED,
|
||||||
newValue? 1 : 0);
|
state? 1 : 0);
|
||||||
} catch (ImsException e) {
|
} catch (ImsException e) {
|
||||||
Log.e(TAG, "setImsVoLteProvisioned() exception:", e);
|
Log.e(TAG, "setImsVoLteProvisioned() exception:", e);
|
||||||
}
|
}
|
||||||
@@ -1224,59 +1119,29 @@ public class RadioInfo extends Activity {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateImsVoLteProvisionedState();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
private boolean isImsVoLteProvisioned() {
|
private boolean isImsVoLteProvisioned() {
|
||||||
if (phone != null) {
|
if (phone != null && mImsManager != null) {
|
||||||
//TODO: Why does this have to be called within the phone's context?
|
return mImsManager.isVolteEnabledByPlatform(phone.getContext())
|
||||||
if(mImsManager != null ) {
|
&& mImsManager.isVolteProvisionedOnDevice(phone.getContext());
|
||||||
return mImsManager.isVolteProvisionedOnDevice(phone.getContext());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateImsVoLteProvisionedState() {
|
OnCheckedChangeListener mImsVoLteCheckedChangeListener = new OnCheckedChangeListener() {
|
||||||
log("updateImsVoLteProvisionedState isImsVoLteProvisioned()=" + isImsVoLteProvisioned());
|
|
||||||
String buttonText = isImsVoLteProvisioned() ?
|
|
||||||
getString(R.string.volte_provisioned_flag_off) :
|
|
||||||
getString(R.string.volte_provisioned_flag_on);
|
|
||||||
imsVoLteProvisionedButton.setText(buttonText);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateSmsOverImsState() {
|
|
||||||
log("updateSmsOverImsState isSmsOverImsEnabled()=" + isSmsOverImsEnabled());
|
|
||||||
String buttonText = isSmsOverImsEnabled() ?
|
|
||||||
getString(R.string.sms_over_ims_off) :
|
|
||||||
getString(R.string.sms_over_ims_on);
|
|
||||||
smsOverImsButton.setText(buttonText);
|
|
||||||
}
|
|
||||||
|
|
||||||
private Button lteRamDumpButton;
|
|
||||||
static final String PROPERTY_LTE_RAM_DUMP = "persist.radio.ramdump";
|
|
||||||
OnClickListener mLteRamDumpHandler = new OnClickListener() {
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
log(String.format("toggle %s: currently %s",
|
setImsVoLteProvisionedState(isChecked);
|
||||||
PROPERTY_LTE_RAM_DUMP, (isSmsOverImsEnabled() ? "on":"off")));
|
|
||||||
boolean newValue = !isLteRamDumpEnabled();
|
|
||||||
SystemProperties.set(PROPERTY_LTE_RAM_DUMP, newValue ? "1":"0");
|
|
||||||
updateLteRamDumpState();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private boolean isLteRamDumpEnabled() {
|
private void updateImsVoLteProvisionedState() {
|
||||||
return SystemProperties.getBoolean(PROPERTY_LTE_RAM_DUMP, false);
|
log("updateImsVoLteProvisionedState isImsVoLteProvisioned()=" + isImsVoLteProvisioned());
|
||||||
}
|
//delightful hack to prevent on-checked-changed calls from
|
||||||
|
//actually forcing the ims provisioning to its transient/current value.
|
||||||
private void updateLteRamDumpState() {
|
imsVoLteProvisionedSwitch.setOnCheckedChangeListener(null);
|
||||||
log("updateLteRamDumpState isLteRamDumpEnabled()=" + isLteRamDumpEnabled());
|
imsVoLteProvisionedSwitch.setChecked(isImsVoLteProvisioned());
|
||||||
String buttonText = isLteRamDumpEnabled() ?
|
imsVoLteProvisionedSwitch.setOnCheckedChangeListener(mImsVoLteCheckedChangeListener);
|
||||||
getString(R.string.lte_ram_dump_off) :
|
|
||||||
getString(R.string.lte_ram_dump_on);
|
|
||||||
lteRamDumpButton.setText(buttonText);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OnClickListener mDnsCheckButtonHandler = new OnClickListener() {
|
OnClickListener mDnsCheckButtonHandler = new OnClickListener() {
|
||||||
@@ -1336,32 +1201,17 @@ public class RadioInfo extends Activity {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private String[] mPreferredNetworkLabels = {
|
AdapterView.OnItemSelectedListener mCellInfoRefreshRateHandler =
|
||||||
"WCDMA preferred",
|
new AdapterView.OnItemSelectedListener() {
|
||||||
"GSM only",
|
|
||||||
"WCDMA only",
|
|
||||||
"GSM auto (PRL)",
|
|
||||||
"CDMA auto (PRL)",
|
|
||||||
"CDMA only",
|
|
||||||
"EvDo only",
|
|
||||||
"Global auto (PRL)",
|
|
||||||
"LTE/CDMA auto (PRL)",
|
|
||||||
"LTE/UMTS auto (PRL)",
|
|
||||||
"LTE/CDMA/UMTS auto (PRL)",
|
|
||||||
"LTE only",
|
|
||||||
"LTE/WCDMA",
|
|
||||||
"TD-SCDMA only",
|
|
||||||
"TD-SCDMA/WCDMA",
|
|
||||||
"LTE/TD-SCDMA",
|
|
||||||
"TD-SCDMA/GSM",
|
|
||||||
"TD-SCDMA/UMTS",
|
|
||||||
"LTE/TD-SCDMA/WCDMA",
|
|
||||||
"LTE/TD-SCDMA/UMTS",
|
|
||||||
"TD-SCDMA/CDMA/UMTS",
|
|
||||||
"Global/TD-SCDMA",
|
|
||||||
"Unknown"};
|
|
||||||
|
|
||||||
private void log(String s) {
|
public void onItemSelected(AdapterView parent, View v, int pos, long id) {
|
||||||
Log.d(TAG, "[RadioInfo] " + s);
|
mCellInfoRefreshRateIndex = pos;
|
||||||
|
phone.setCellInfoListRate(mCellInfoRefreshRates[pos]);
|
||||||
|
updateAllCellInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onNothingSelected(AdapterView parent) {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user