diff options
| author | 2010-03-03 17:11:15 -0800 | |
|---|---|---|
| committer | 2010-03-12 17:27:41 -0800 | |
| commit | 50f1c4b7093dd0e319ed16917446ed9f39f2d809 (patch) | |
| tree | 039697a1f28a9d58b22e2d0bb44e1ae0fb2cc293 | |
| parent | 9dc1036d962fcca42c2b5bf1ef6aa04999b00a43 (diff) | |
Resync with Telephony after losing Phone service.
Bug shows we lost contact with the phone service. We used to leave the notion of enabled alone
in this case, but that can lead to being out of sync (the mobile data connection may be
alive or come alive but if we think it is dead we ignore it). Changing our
notion of its enabled-ness to 'enabled' means we'll pay attention to its messages going forward,
and since after a reboot it starts enabled we'll actually be in sync.
bug:2323057
Change-Id: Ie080b50d764e6879e712507aceb68f585f12f94e
| -rw-r--r-- | core/java/android/net/MobileDataStateTracker.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/java/android/net/MobileDataStateTracker.java b/core/java/android/net/MobileDataStateTracker.java index 17b0330ed8c3..22e432563cf3 100644 --- a/core/java/android/net/MobileDataStateTracker.java +++ b/core/java/android/net/MobileDataStateTracker.java @@ -359,7 +359,12 @@ public class MobileDataStateTracker extends NetworkStateTracker { case Phone.APN_REQUEST_FAILED: if (mPhoneService == null && mApnType == Phone.APN_TYPE_DEFAULT) { // on startup we may try to talk to the phone before it's ready - // just leave mEnabled as it is for the default apn. + // since the phone will come up enabled, go with that. + // TODO - this also comes up on telephony crash: if we think mobile data is + // off and the telephony stuff crashes and has to restart it will come up + // enabled (making a data connection). We will then be out of sync. + // A possible solution is a broadcast when telephony restarts. + mEnabled = true; return false; } // else fall through |