OSDN Git Service

Delay radio reset to wait for data cleanup in CdmaDataConnectionTracker
authorYong Zhang <yzhang@motorola.com>
Mon, 17 Aug 2009 20:18:31 +0000 (15:18 -0500)
committerWink Saville <wink@google.com>
Fri, 21 Aug 2009 01:16:02 +0000 (18:16 -0700)
commit25254db31a7c4190cc453d38cd50d65a17885305
treefe158e2da33cc789daf3bad2b2f4065ecd24f975
parent41ceb907b5d13ee58759022ac8d830b04686baba
Delay radio reset to wait for data cleanup in CdmaDataConnectionTracker

Issue to be addressed:
In radioRestart() method in CdmaDataConnectionTracker, if the radio is
restarted right after cleaning up connection, it is possible that the
connection setup request triggered by radio-on may happen before the
connection cleanup has been completed so that the connection may not
be set up correctly after the radio is restarted. The end result could
be that the phone lost the data capability.

The patch includes the following changes:
1) Add EVENT_RESTART_RADIO in DataConnectionTracker.
2) In CdmaDataConnectionTracker, method restartRadio(), send a message
   delayed by 20s, the purpose of which is to wait for connection cleanup
   to be completed, then to restart radio.
3) In CdmaDataConnectionTracker, method trySetupData(), don't try to setup
   data if there is pending message to restart radio.

Addtional notes:
   A system property is not used to config the delayed timer because we
   think this fix is to address the unusual error case and waiting for
   long time should not impact user experience much. 12s is the longest
   time to complete the data cleanup as we have seen so far, so we are
   using a 20s timer.
telephony/java/com/android/internal/telephony/DataConnectionTracker.java
telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java