Add displaying DataConnectionRealTimeInfo.
Change-Id: Iadcbf9765af57c125bcdf74e3fc652ed6c8f7d42
This commit is contained in:
@@ -91,6 +91,13 @@
|
||||
<TextView android:id="@+id/cellinfo" style="@style/info_value" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 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>
|
||||
|
||||
<!-- Roaming -->
|
||||
<LinearLayout style="@style/entry_layout">
|
||||
<TextView android:text="@string/radio_info_roaming_label" style="@style/info_label" />
|
||||
|
@@ -455,6 +455,8 @@
|
||||
<!-- 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>
|
||||
<!-- 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>
|
||||
<!-- 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>
|
||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
||||
|
||||
|
@@ -32,6 +32,7 @@ import android.os.Message;
|
||||
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 @@ public class RadioInfo extends Activity {
|
||||
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 @@ public class RadioInfo extends Activity {
|
||||
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 @@ public class RadioInfo extends Activity {
|
||||
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 @@ public class RadioInfo extends Activity {
|
||||
| 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 @@ public class RadioInfo extends Activity {
|
||||
mCellInfo.setText(value.toString());
|
||||
}
|
||||
|
||||
private final void updateDcRtInfoTv(DataConnectionRealTimeInfo dcRtInfo) {
|
||||
mDcRtInfoTv.setText(dcRtInfo.toString());
|
||||
}
|
||||
|
||||
private final void
|
||||
updateMessageWaiting() {
|
||||
mMwi.setText(String.valueOf(mMwiValue));
|
||||
|
Reference in New Issue
Block a user