Skip to content

Commit b1a3f0c

Browse files
Kazuhiro OndoJohn Huang
authored andcommitted
Fix no data issue after system server crash
FW was checking "Radio Available" instead of "Radio On" when broadcasting data availability. This was causing an issue in a certain recovery case (system server restart/phone process restart) where "Radio (modem) is available" but radio was turned off. This patch obsolete the use of mRadioAvailable attribute and use RadioState from RIL directly to check if Radio is ON. Bug:5077346 Change-Id: Ie7ac05e3d5e328e3d5303541ca41326754f309c1
1 parent 37f770f commit b1a3f0c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)