diff options
author | Mike Kasick <mike@kasick.org> | 2012-03-03 13:16:42 -0500 |
---|---|---|
committer | Mike Kasick <mike@kasick.org> | 2012-03-03 14:05:47 -0500 |
commit | e942dd55c772b20ac205b14fb20e6a841e8e502c (patch) | |
tree | 8ca61d112dc452b29f037cd3b8dc8dab7fcf4609 /telephony | |
parent | 81b18090d1eae41aa73b760a02008448809b959d (diff) | |
download | frameworks_base-e942dd55c772b20ac205b14fb20e6a841e8e502c.zip frameworks_base-e942dd55c772b20ac205b14fb20e6a841e8e502c.tar.gz frameworks_base-e942dd55c772b20ac205b14fb20e6a841e8e502c.tar.bz2 |
SamsungRIL: Fixes for CDMA data reconnection failures due to stale pppd
Occasionally the CDMA data connection fails to reconnect after various
radio events, which is fixed neither by toggling mobile data nor airplane
mode, but only by a reboot. One known cause of this problem is that the
pppd_cdma service is occasionally left running after the radio event, which
causes all subsequent "setup data call" operations to fail. These two
fixes address the stale pppd_cdma service issue:
- Move the pppd_cdma service shutdown (set ril.cdma.data_state=0) from the
"deactivate data call" response to its request. This avoids the issue
where the response never comes (radio crash?), and thus, the service is
never stopped.
- Force pppd_cdma service shutdown on a "setup data call" failure. This
allows subsequent setup attempts to succeed in the event that the
"deactivate" request was never made (unexpected radio poweroff).
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/com/android/internal/telephony/SamsungRIL.java | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/telephony/java/com/android/internal/telephony/SamsungRIL.java b/telephony/java/com/android/internal/telephony/SamsungRIL.java index ebe8909..38ae600 100644 --- a/telephony/java/com/android/internal/telephony/SamsungRIL.java +++ b/telephony/java/com/android/internal/telephony/SamsungRIL.java @@ -147,7 +147,7 @@ public class SamsungRIL extends RIL implements CommandsInterface { case RIL_REQUEST_GET_IMEI: ret = responseString(p); break; case RIL_REQUEST_GET_IMEISV: ret = responseString(p); break; case RIL_REQUEST_ANSWER: ret = responseVoid(p); break; - case RIL_REQUEST_DEACTIVATE_DATA_CALL: ret = responseDeactivateDataCall(p); break; + case RIL_REQUEST_DEACTIVATE_DATA_CALL: ret = responseVoid(p); break; case RIL_REQUEST_QUERY_FACILITY_LOCK: ret = responseInts(p); break; case RIL_REQUEST_SET_FACILITY_LOCK: ret = responseInts(p); break; case RIL_REQUEST_CHANGE_BARRING_PASSWORD: ret = responseVoid(p); break; @@ -897,6 +897,14 @@ public class SamsungRIL extends RIL implements CommandsInterface { } } } else { + if (mIsSamsungCdma) { + // On rare occasion the pppd_cdma service is left active from a stale + // session, causing the data call setup to fail. Make sure that pppd_cdma + // is stopped now, so that the next setup attempt may succeed. + Log.d(LOG_TAG, "Set ril.cdma.data_state=0 to make sure pppd_cdma is stopped."); + SystemProperties.set("ril.cdma.data_state", "0"); + } + dataCall.status = FailCause.ERROR_UNSPECIFIED.getErrorCode(); // Who knows? } @@ -938,15 +946,16 @@ public class SamsungRIL extends RIL implements CommandsInterface { return false; } - protected Object - responseDeactivateDataCall(Parcel p) { + @Override + public void + deactivateDataCall(int cid, int reason, Message result) { if (mIsSamsungCdma) { // Disconnect: Set ril.cdma.data_state=0 to stop pppd_cdma service. Log.d(LOG_TAG, "Set ril.cdma.data_state=0."); SystemProperties.set("ril.cdma.data_state", "0"); } - return null; + super.deactivateDataCall(cid, reason, result); } protected Object |