From 4219d8022490a5dd7658394dca44b20809c694cd Mon Sep 17 00:00:00 2001 From: Nathan Harold Date: Tue, 17 Apr 2018 17:09:42 -0700 Subject: [PATCH 1/3] [Telephony Debug Menu] Remove NeighboringCellInfo This CL removes the long-obsolete NeighboringCellInfo. From a debug perspective, this info is a subset of the other info already present, so it just adds clutter without adding any value. Bug: 78791811 Test: manual Change-Id: Iaf275f81e276f63bdd9651ac60a5485bf5bdf160 --- res/layout/radio_info.xml | 7 ------- res/values/strings.xml | 2 -- src/com/android/settings/RadioInfo.java | 25 ------------------------- 3 files changed, 34 deletions(-) diff --git a/res/layout/radio_info.xml b/res/layout/radio_info.xml index 0ec1f108cb8..2d4a1d0e6c9 100644 --- a/res/layout/radio_info.xml +++ b/res/layout/radio_info.xml @@ -321,13 +321,6 @@ - - - - - - Cell Location Info (deprecated): - Neighbor Cell Info (deprecated): - LTE Physical Channel Configuration: Cell Info Refresh Rate: diff --git a/src/com/android/settings/RadioInfo.java b/src/com/android/settings/RadioInfo.java index 170db1695b4..3063ecc0d3d 100644 --- a/src/com/android/settings/RadioInfo.java +++ b/src/com/android/settings/RadioInfo.java @@ -55,7 +55,6 @@ 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,7 +192,6 @@ 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; @@ -235,7 +233,6 @@ public class RadioInfo extends Activity { private List mCellInfoResult = null; private CellLocation mCellLocationResult = null; - private List mNeighboringCellResult = null; private int mPreferredNetworkTypeResult; private int mCellInfoRefreshRateIndex; @@ -433,7 +430,6 @@ 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); @@ -520,7 +516,6 @@ public class RadioInfo extends Activity { updateDnsCheckState(); updateNetworkType(); - updateNeighboringCids(mNeighboringCellResult); updateLocation(mCellLocationResult); updateCellInfo(mCellInfoResult); @@ -714,23 +709,6 @@ public class RadioInfo extends Activity { } - private final void updateNeighboringCids(List 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) : ""; } @@ -1079,12 +1057,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 +1071,6 @@ public class RadioInfo extends Activity { public void run() { mCellInfoResult = mTelephonyManager.getAllCellInfo(); mCellLocationResult = mTelephonyManager.getCellLocation(); - mNeighboringCellResult = mTelephonyManager.getNeighboringCellInfo(); mHandler.post(updateAllCellInfoResults); } From 3d41affd2c97a753e18e474eaea26a83554829d4 Mon Sep 17 00:00:00 2001 From: Nathan Harold Date: Tue, 17 Apr 2018 17:13:30 -0700 Subject: [PATCH 2/3] [Telephony Debug Menu] Remove DcRtInfo Remove the obsolete and unsupported DcRtInfo field from the Debug menu. Since it doesn't do anything and hasn't for a few releases, we should make space for things that are supported and minimize clutter. Bug: 78791811 Test: manual Change-Id: Id4cc808bf5c7671408cd5297965d93140aeefe97 --- res/layout/radio_info.xml | 7 ------- res/values/strings.xml | 2 -- src/com/android/settings/RadioInfo.java | 13 ------------- 3 files changed, 22 deletions(-) diff --git a/res/layout/radio_info.xml b/res/layout/radio_info.xml index 2d4a1d0e6c9..177c73a8a94 100644 --- a/res/layout/radio_info.xml +++ b/res/layout/radio_info.xml @@ -164,13 +164,6 @@ android:layout_height="1dip" android:background="#000000" /> - - - - - - diff --git a/res/values/strings.xml b/res/values/strings.xml index 24fd13131e4..f7824fe682e 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -484,8 +484,6 @@ All Cell Measurement Info: - Data Connection Real-Time Info: - Data Service: Roaming: diff --git a/src/com/android/settings/RadioInfo.java b/src/com/android/settings/RadioInfo.java index 3063ecc0d3d..c04269c1696 100644 --- a/src/com/android/settings/RadioInfo.java +++ b/src/com/android/settings/RadioInfo.java @@ -54,7 +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.PreciseCallState; import android.telephony.PhoneStateListener; import android.telephony.PhysicalChannelConfig; @@ -193,7 +192,6 @@ public class RadioInfo extends Activity { private TextView mCfi; private TextView mLocation; private TextView mCellInfo; - private TextView mDcRtInfoTv; private TextView sent; private TextView received; private TextView mPingHostnameV4; @@ -297,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); @@ -432,7 +424,6 @@ public class RadioInfo extends Activity { mLocation = (TextView) findViewById(R.id.location); 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); @@ -861,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)); From 40ece56d9931af7532519eb985733e74b1947395 Mon Sep 17 00:00:00 2001 From: Nathan Harold Date: Tue, 24 Apr 2018 13:21:19 -0700 Subject: [PATCH 3/3] [Telephony Debug Menu] Redo Layout Changes to the layout to better group related fields, add more definite boundaries, fix some alignment issues, and put more-often-used fields closer to the top. Bug: 78791811 Test: manual Change-Id: I492abe16a25d1880e4385a78247925805fe5b590 --- res/layout/radio_info.xml | 313 ++++++++++++++++++++------------------ 1 file changed, 167 insertions(+), 146 deletions(-) diff --git a/res/layout/radio_info.xml b/res/layout/radio_info.xml index 177c73a8a94..c1d6ff63f99 100644 --- a/res/layout/radio_info.xml +++ b/res/layout/radio_info.xml @@ -49,16 +49,10 @@ - + - - - - - - - - + + @@ -67,28 +61,28 @@ - - - - - - - + - + - - + + - + - - + + + + + + + + @@ -134,69 +128,6 @@ android:layout_height="1dip" android:background="#000000" /> - -