@@ -122,7 +122,6 @@ enum RecoveryAction {REREGISTER, RADIO_RESTART, RADIO_RESET};
122122 static final Uri PREFERAPN_URI = Uri .parse ("content://telephony/carriers/preferapn" );
123123 static final String APN_ID = "apn_id" ;
124124 private boolean canSetPreferApn = false ;
125- private boolean mRadioAvailable = false ;
126125
127126 @ Override
128127 protected void onActionIntentReconnectAlarm (Intent intent ) {
@@ -1571,7 +1570,7 @@ private void notifyNoData(GsmDataConnection.FailCause lastFailCauseCode,
15711570 private void onRecordsLoaded () {
15721571 if (DBG ) log ("onRecordsLoaded: createAllApnList" );
15731572 createAllApnList ();
1574- if (mRadioAvailable ) {
1573+ if (mPhone . mCM . getRadioState (). isOn () ) {
15751574 if (DBG ) log ("onRecordsLoaded: notifying data availability" );
15761575 notifyDataAvailability (Phone .REASON_SIM_LOADED );
15771576 }
@@ -1703,7 +1702,6 @@ protected void onRoamingOn() {
17031702 @ Override
17041703 protected void onRadioAvailable () {
17051704 if (DBG ) log ("onRadioAvailable" );
1706- mRadioAvailable = true ;
17071705 if (mPhone .getSimulatedRadioControl () != null ) {
17081706 // Assume data is connected on the simulator
17091707 // FIXME this can be improved
@@ -1731,7 +1729,6 @@ protected void onRadioOffOrNotAvailable() {
17311729 dc .resetRetryCount ();
17321730 }
17331731 mReregisterOnReconnectFailure = false ;
1734- mRadioAvailable = false ;
17351732
17361733 if (mPhone .getSimulatedRadioControl () != null ) {
17371734 // Assume data is connected on the simulator
0 commit comments