Add displaying DataConnectionRealTimeInfo.
Change-Id: Iadcbf9765af57c125bcdf74e3fc652ed6c8f7d42
diff --git a/src/com/android/settings/RadioInfo.java b/src/com/android/settings/RadioInfo.java
index df93626..4c86144 100644
--- a/src/com/android/settings/RadioInfo.java
+++ b/src/com/android/settings/RadioInfo.java
@@ -32,6 +32,7 @@
import android.os.SystemProperties;
import android.telephony.CellInfo;
import android.telephony.CellLocation;
+import android.telephony.DataConnectionRealTimeInfo;
import android.telephony.PhoneStateListener;
import android.telephony.ServiceState;
import android.telephony.TelephonyManager;
@@ -103,6 +104,7 @@
private TextView mLocation;
private TextView mNeighboringCids;
private TextView mCellInfo;
+ private TextView mDcRtInfoTv;
private TextView resets;
private TextView attempts;
private TextView successes;
@@ -171,6 +173,12 @@
log("onCellInfoChanged: arrayCi=" + arrayCi);
updateCellInfoTv(arrayCi);
}
+
+ @Override
+ public void onDataConnectionRealTimeInfoChanged(DataConnectionRealTimeInfo dcRtInfo) {
+ log("onDataConnectionRealTimeInfoChanged: dcRtInfo=" + dcRtInfo);
+ updateDcRtInfoTv(dcRtInfo);
+ }
};
private Handler mHandler = new Handler() {
@@ -264,6 +272,7 @@
mLocation = (TextView) findViewById(R.id.location);
mNeighboringCids = (TextView) findViewById(R.id.neighboring);
mCellInfo = (TextView) findViewById(R.id.cellinfo);
+ mDcRtInfoTv = (TextView) findViewById(R.id.dcrtinfo);
resets = (TextView) findViewById(R.id.resets);
attempts = (TextView) findViewById(R.id.attempts);
@@ -366,7 +375,8 @@
| PhoneStateListener.LISTEN_CELL_LOCATION
| PhoneStateListener.LISTEN_MESSAGE_WAITING_INDICATOR
| PhoneStateListener.LISTEN_CALL_FORWARDING_INDICATOR
- | PhoneStateListener.LISTEN_CELL_INFO);
+ | PhoneStateListener.LISTEN_CELL_INFO
+ | PhoneStateListener.LISTEN_DATA_CONNECTION_REAL_TIME_INFO);
}
@Override
@@ -541,6 +551,10 @@
mCellInfo.setText(value.toString());
}
+ private final void updateDcRtInfoTv(DataConnectionRealTimeInfo dcRtInfo) {
+ mDcRtInfoTv.setText(dcRtInfo.toString());
+ }
+
private final void
updateMessageWaiting() {
mMwi.setText(String.valueOf(mMwiValue));