Merge changes from topic "tel-debug-pi-dev-plus-aosp" into pi-dev-plus-aosp

* changes:
  [Telephony Debug Menu] Redo Layout
  [Telephony Debug Menu] Remove DcRtInfo
  [Telephony Debug Menu] Remove NeighboringCellInfo
This commit is contained in:
Nathan Harold
2018-05-18 22:09:20 +00:00
committed by Android (Google) Code Review
3 changed files with 167 additions and 202 deletions

View File

@@ -49,16 +49,10 @@
<TextView android:id="@+id/operator" style="@style/info_value" />
</LinearLayout>
<!-- Signal Strength -->
<!-- Roaming -->
<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" />
<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 -->
@@ -67,28 +61,28 @@
<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 -->
<!-- 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>
<!-- Call Status -->
<!-- Voice Service 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" />
<TextView android:text="@string/radio_info_gsm_service_label" style="@style/info_label" />
<TextView android:id="@+id/gsm" style="@style/info_value" />
</LinearLayout>
<!-- Roaming -->
<!-- Voice Network Type -->
<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" />
<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 -->
@@ -134,76 +128,6 @@
android:layout_height="1dip"
android:background="#000000" />
<!-- 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="#000000" />
<!-- DcRtInfo - DataConnectionRealTimeInfo -->
<LinearLayout style="@style/entry_layout">
<TextView android:text="@string/radio_info_dcrtinfo_label"
style="@style/info_label" />
<TextView android:id="@+id/dcrtinfo" 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>
<!-- 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>
<!-- Radio Power -->
<Switch android:id="@+id/radio_power"
android:textSize="14sp"
@@ -244,6 +168,157 @@
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="#000000" />
<!-- 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="#000000" />
<!-- 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="#000000" />
<!-- 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="#000000" />
<!-- 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="#000000" />
<!-- 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">
@@ -287,74 +362,6 @@
<TextView android:id="@+id/dnsCheckState" style="@style/info_value" />
</LinearLayout>
<!-- Launch OEM-specific Info/Settings Activity (if any) -->
<Button android:id="@+id/oem_info"
android:textSize="14sp"
android:layout_marginTop="8dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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>
<!-- Carrier Provisioning -->
<LinearLayout style="@style/entry_layout">
<Button android:id="@+id/carrier_provisioning"
android:layout_marginTop="8dip"
android:layout_width="wrap_content"
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_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/trigger_carrier_provisioning"
android:textSize="14sp"/>
</LinearLayout>
</LinearLayout>
</ScrollView>

View File

@@ -478,16 +478,12 @@
<!-- 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_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 -->
<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_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 -->
<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>

View File

@@ -54,8 +54,6 @@ import android.telephony.CellSignalStrengthCdma;
import android.telephony.CellSignalStrengthGsm;
import android.telephony.CellSignalStrengthLte;
import android.telephony.CellSignalStrengthWcdma;
import android.telephony.DataConnectionRealTimeInfo;
import android.telephony.NeighboringCellInfo;
import android.telephony.PreciseCallState;
import android.telephony.PhoneStateListener;
import android.telephony.PhysicalChannelConfig;
@@ -193,9 +191,7 @@ public class RadioInfo extends Activity {
private TextView mMwi;
private TextView mCfi;
private TextView mLocation;
private TextView mNeighboringCids;
private TextView mCellInfo;
private TextView mDcRtInfoTv;
private TextView sent;
private TextView received;
private TextView mPingHostnameV4;
@@ -235,7 +231,6 @@ public class RadioInfo extends Activity {
private List<CellInfo> mCellInfoResult = null;
private CellLocation mCellLocationResult = null;
private List<NeighboringCellInfo> mNeighboringCellResult = null;
private int mPreferredNetworkTypeResult;
private int mCellInfoRefreshRateIndex;
@@ -300,12 +295,6 @@ public class RadioInfo extends Activity {
updateCellInfo(mCellInfoResult);
}
@Override
public void onDataConnectionRealTimeInfoChanged(DataConnectionRealTimeInfo dcRtInfo) {
log("onDataConnectionRealTimeInfoChanged: dcRtInfo=" + dcRtInfo);
updateDcRtInfoTv(dcRtInfo);
}
@Override
public void onSignalStrengthsChanged(SignalStrength signalStrength) {
log("onSignalStrengthChanged: SignalStrength=" +signalStrength);
@@ -433,10 +422,8 @@ public class RadioInfo extends Activity {
mMwi = (TextView) findViewById(R.id.mwi);
mCfi = (TextView) findViewById(R.id.cfi);
mLocation = (TextView) findViewById(R.id.location);
mNeighboringCids = (TextView) findViewById(R.id.neighboring);
mCellInfo = (TextView) findViewById(R.id.cellinfo);
mCellInfo.setTypeface(Typeface.MONOSPACE);
mDcRtInfoTv = (TextView) findViewById(R.id.dcrtinfo);
sent = (TextView) findViewById(R.id.sent);
received = (TextView) findViewById(R.id.received);
@@ -520,7 +507,6 @@ public class RadioInfo extends Activity {
updateDnsCheckState();
updateNetworkType();
updateNeighboringCids(mNeighboringCellResult);
updateLocation(mCellLocationResult);
updateCellInfo(mCellInfoResult);
@@ -714,23 +700,6 @@ public class RadioInfo extends Activity {
}
private final void updateNeighboringCids(List<NeighboringCellInfo> cids) {
StringBuilder sb = new StringBuilder();
if (cids != null) {
if (cids.isEmpty()) {
sb.append("no neighboring cells");
} else {
for (NeighboringCellInfo cell : cids) {
sb.append(cell.toString()).append(" ");
}
}
} else {
sb.append("unknown");
}
mNeighboringCids.setText(sb.toString());
}
private final String getCellInfoDisplayString(int i) {
return (i != Integer.MAX_VALUE) ? Integer.toString(i) : "";
}
@@ -883,10 +852,6 @@ public class RadioInfo extends Activity {
mCellInfo.setText(buildCellInfoString(arrayCi));
}
private final void updateDcRtInfoTv(DataConnectionRealTimeInfo dcRtInfo) {
mDcRtInfoTv.setText(dcRtInfo.toString());
}
private final void
updateMessageWaiting() {
mMwi.setText(String.valueOf(mMwiValue));
@@ -1079,12 +1044,10 @@ public class RadioInfo extends Activity {
private final void updateAllCellInfo() {
mCellInfo.setText("");
mNeighboringCids.setText("");
mLocation.setText("");
final Runnable updateAllCellInfoResults = new Runnable() {
public void run() {
updateNeighboringCids(mNeighboringCellResult);
updateLocation(mCellLocationResult);
updateCellInfo(mCellInfoResult);
}
@@ -1095,7 +1058,6 @@ public class RadioInfo extends Activity {
public void run() {
mCellInfoResult = mTelephonyManager.getAllCellInfo();
mCellLocationResult = mTelephonyManager.getCellLocation();
mNeighboringCellResult = mTelephonyManager.getNeighboringCellInfo();
mHandler.post(updateAllCellInfoResults);
}