summaryrefslogtreecommitdiff
path: root/core/java/android/net/MobileDataStateTracker.java
Commit message (Collapse)AuthorAgeFilesLines
* Remove dead code, mostly DataStateTracker.Paul Jensen2015-03-111-909/+0
| | | | Change-Id: I1433937bffdb29bd42fb1adbfcf0a50ceffac7dd
* Change removeStackedLink to take an interface name.Lorenzo Colitti2014-10-281-10/+0
| | | | | | | | | | | This simplifies callers. Also remove all "implementations" of addStackedLink and removeStackedLink except the one in LinkProperties, because they are unused. Bug: 12111730 Change-Id: Ie294b855facba4b1436299dcb3211b72d9ba448e
* MS: Adding Support for Emergency APN in Telephony FrameworkRam2014-07-011-0/+2
| | | | | | | | | | (base/telephony) Replacement for https://partner-android-review.googlesource.com/#/c/171175/ Change-Id: I16fc37f5c00ed79f2370bc46554fc7a24c52c4cb Conflicts: core/java/android/net/ConnectivityManager.java
* Remove Obsolete enable/disableApn functions.Robert Greenwalt2014-06-171-9/+9
| | | | | | | ConnectivityService now uses NetworkAgents instead and apps should use ConnectivityManager. Change-Id: Ifc5c8f5be802183e70a5d92b224c819815de00e6
* Replace LinkCapabilities with NetworkCapabilitiesRobert Greenwalt2014-05-121-17/+8
| | | | | | | Also remove unused LinkSocket and LinkSocketNotifier. bug:13885501 Change-Id: Id426e31b201fa4f29109b5fea485d8efb34519d3
* Turn off this very verbose log.Joe Onorato2014-04-291-1/+1
| | | | | | | | adb shell dumpsys activity broadcasts has the last 100 broadcasts, so it can be used for debugging instead of spamming the main logs. Change-Id: I19c3ac72eb783999e615261da7f00b527d2bc06f
* resolved conflicts for merge of 0bff77d6 to masterRobert Greenwalt2014-03-191-0/+11
|\ | | | | | | Change-Id: Ia4c86126079740978658a05579b56d59d41a7b01
| * Handle provisioning APN by turning off/on data.Wink Saville2014-03-181-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a start and two tests succeed: Tested expired AT&T SIM and waiting 15min for alarm to fire. Tested a provisioned Verizon SIM and works normally. I've NOT tested AT&T where I've properly completed the provisioning. I've NOT tested T-Mobile SIM either provisioned or not-provisioned. I've NOT tested provisioning over WiFi. I've NOT tested that WiFi <-> Mobile works I've NOT tested voice calls, SMS, MMS ... The current bug is below, but it is poorly named either it should be renamed or a new bug created. Bug: 13190133 Change-Id: I0a09f642614cd27a8655e9dae764b8999ce485b8
* | Add new RIL commands to read/write NV items and reset NV config.Jake Hamby2014-02-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Add new RIL commands and generic code cleanups. The only changes required for OMA DM support are the addition of five new methods in ITelephony.aidl for reading/writing NV items and performing NV config and radio resets (requires MODIFY_PHONE_STATE), along with the new RIL request IDs in RILConstants.java. Bug: 12864208 Change-Id: I958d2571580d98a49936ef2e6822e5ac086acbe2
* | Remove captive portal code that has no effect.Narayan Kamath2013-10-161-5/+0
|/ | | | | | | | | | | | | | | | | | | Note that this CL does not change any behaviour. At the center of this change is CaptivePortalTracker#detectCaptivePortal(), which does nothing except call back into ConnectivityService. Removing it allows us to simplify code in ConnectivityService. It also allows us to remove ConnectivityService#captivePortalCheckComplete which was only ever called in response to this method. While this does not change any behaviour, it preserves existing bad behaviour, i.e, that the CAPTIVE_PORTAL_CHECK NetworkInfo state does not correspond to actual captive portal detection. We transition into that state and immediately (and unconditionally) out of it and into CONNECTED. Change-Id: Ib3797f956d2db5e3cacaaa53e899d81aa8e958af
* Merge commit '53221120' into fix-merge-conflictWink Saville2013-09-211-2/+7
|\ | | | | | | | | | | | | | | | | | | * commit '53221120': Do not always call setIsConnectedToProvisioningNetwork(false) Conflicts: core/java/android/net/MobileDataStateTracker.java Change-Id: I497b57cb96d0f3b3bce4f4e1cbc5febcc6421597
| * Do not always call setIsConnectedToProvisioningNetwork(false)Wink Saville2013-09-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously I was calling setIsConnectedToProvisioningNetwork(false) always, but all MDST's receive every broadcast. Thus we could over write an MDST's mNetworkInfo.mIsConnectedToProvisioningNetwork to false, unless the MDST that was set to true was last, i.e the code was order dependent. If the provisioning networks value was false instead of true when handleMobileProvisioningAction was called we wouldn't invoke mdst.enableMobileProvisioning because network info would be null. Thus the provisioning network would never transition to CONNECTED and a default route wouldn't get setup and the browser couldn't access the website. Now setIsConnectedToProvisioningNetwork is only set to false when the apnType matches and we won't indiscriminately change it and are not order dependent. Bug: 10853805 Change-Id: I68a4f9bdf5dc18d90f4cdef7a60811f57be67261
* | Setting MTU size for specific network.sy.yun2013-09-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Able to config network specific MTU size. Normally, the default size of MTU is 1500. US - ATT 1410, TMUS 1440, SPRINT 1422 KR - SKT 1440, KT 1450, LGU+ 1428 JP - KDDI 1420, SoftBank 1340 CA - RGS 1430, FIDO 1430, MTS 1430, BELL 1358, SaskTel 1358 AU - TEL 1400 Bug: 10195070 Change-Id: Ie18650b37a3d44af944f2dae4aa97c04fb12cd5e
* | am fc7a146b: am 50f86448: am 59a9884b: Merge "Do not change ↵Wink Saville2013-09-061-1/+7
|\| | | | | | | | | | | | | NetworkInfo.DetailedState." into jb-mr2-dev * commit 'fc7a146b82774514bad4bc307489ece7ac27ee50': Do not change NetworkInfo.DetailedState.
| * Do not change NetworkInfo.DetailedState.Wink Saville2013-09-051-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'd changed DetailedState to force ConnectivityService to treat provisioning apn's specially. In particular so that they wouldn't be identified they were fully connected until the provisioning actually started. The problem is that DetailedState is a public enum that has a CTS test and just changing the CTS to allow for the new state (CONNECTED_TO_PROVISIONING_NETWORK) was inappropriate. Instead I've added a new mIsConnectedToProvisioningNetwork variable and used the DetailedState.SUSPENDED as the intermediate state. Bug: 10620248 Change-Id: Id4a842398cad67455541ce629959351c27d83639
* | Merge "Rename LinkInfo to LinkQualityInfo" into klp-devVinit Deshapnde2013-09-051-46/+48
|\ \
| * | Rename LinkInfo to LinkQualityInfoVinit Deshapnde2013-09-041-46/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change renames the LinkInfo objects to LinkQuailtyInfo. The API is still hidden; but it can be accessed via reflection. Bug: 10342372 Change-Id: Ieccea87c467ceae5d7f76298b137573f67396cd6
* | | Merge commit '270226b0' into manualmergeWink Saville2013-08-291-14/+80
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | | | | | | | | | | | * commit '270226b0': Add support for handling mobile provisioning networks. Conflicts: core/java/android/net/CaptivePortalTracker.java core/java/android/net/ConnectivityManager.java core/java/android/net/IConnectivityManager.aidl core/java/android/net/MobileDataStateTracker.java core/res/AndroidManifest.xml services/java/com/android/server/ConnectivityService.java Change-Id: I3925004011bb1243793c4c1b963d923dc2b00cb5
| * Add support for handling mobile provisioning networks.Wink Saville2013-08-291-26/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a sim is new or it has expired it needs to be provisioned with the carrier. Basically provisioning is associating a sim with a user account. When a sim isn't provisioned then operators will restrict access to the network and only allow certain addresses or services to be used. This set of changes allows two types of provisioning networks to be recognized. The first is a network that causes all DNS lookups to be redirected to a different address than was intended. This is exemplified by how T-Mobile works. The second technique uses a special apn for provisioning. An example is AT&T where lwaactivate is the provisioning apn and broadband is the normal apn. We first try broadband and if we are unable to connect we try lwaactivate. When we see the activate we identify it as special and the ApnContext.isProvisioningApn will return true. In the future our plan is to create a new network type that can be added to the apn list, but for now it identified by name. Here is a list of significant changes: - CaptivePortalTracker now only test WiFi networks instead of all networks - checkMobileProvisioning checks for provisioning networks and doesn't try to ping. - IConnectivityManager.aidl changes: * getProvisioningOrActiveNetworkInfo was added to and used by Manage mobile plan in WirelessSettings so even when there is no active network it will still allow provisioning. Otherwise it would report no internet connection. * setSignInErrorNotificationVisible is used by both CaptiviePortalTracker and checkMobileProvisioning so they use the same code for the notifications. * checkMobileProvisioning was simplified to have only a timeout as returning the result is now harder as we abort simultaneous call otherwise we'd could get into loops because we now check every time we connect to mobile. - Enhanced MDST to handle the provisioning network. - Added CONNECTED_TO_PROVISIONING_NETWORK to NetworkInfo to make a new state so we don't announce to the world we're connected. - TelephonyIntents.ACTION_DATA_CONNECTION_CONNECTED_TO_PROVISIONING_APN is sent by the low level data connection code to notify Connectivity Service that a provisioning apn has connected. This allows CS to handle the connection differently than a normal connection. Bug: 10328264 Change-Id: I3925004011bb1243793c4c1b963d923dc2b00cb5
| * DO NOT MERGE: MDST is not ready until connected to DcTracker.Wink Saville2013-08-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | When the system becomes loaded the PhoneApp can be delayed significantly and a call to setEnableFailFastMobileData may not occur because the channel between the MobileDataStateTracker (MDST) and DcTracker (DCT) is not connected. Solution: Add a isReady to MDST and isMobileDataStateTrackerReady to ConnectivityService and call it from isMobileOk. Bug: 10351868 Change-Id: I92f9d58121b88186b636cd71c2fd2ef9a28f7cf6
* | Introduce network link quality statisticsVinit Deshapnde2013-08-211-7/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change starts tracking traffic quality data for WiFi and mobile networks. The quality is tracked based on incidental traffic, and not on specific measurements. Theoretical bandwidths are hard-coded, as well as sampling interval; although sampling interval can be changed by setting a system policy. Bugs filed to remove shortcomings of this change - 10342372 Change LinkInfo name to something better 10342318 Move hardcoded values of MobileLinkInfo to resources so they can be updated without changing code Bug: 10006249 Change-Id: I83d8c7594da20fe53abbd5e1f909b1f606b035bb
* | am 9b7b4450: am 02eab434: am 4d87d91d: Merge "If in a mobile captive portal ↵Wink Saville2013-08-081-0/+12
|\| | | | | | | | | | | | | is detected enable fail fast." into jb-mr2-dev * commit '9b7b4450185e723dc7021f7e8bae4a12d4dd5606': If in a mobile captive portal is detected enable fail fast.
| * If in a mobile captive portal is detected enable fail fast.Wink Saville2013-08-071-0/+12
| | | | | | | | | | | | | | | | | | | | | | When captive portal checking completes pass back the result. This is used to enable/disable failing fast for mobile. When failing fast is enabled we don't check for data stalls and thus won't be continually trying to do recovery operations, such as restarting the radio. Bug: 9462512 Change-Id: I0dea0eee519f8ee7f94e79d40e82c18f30d7fe2e
* | Fix excessive log spew.Wink Saville2013-07-311-1/+1
| | | | | | | | | | Bug: 10115060 Change-Id: I61fd83071da1224f38757b8d90f58c8d6c41d36b
* | Add network type TYPE_MOBILE_IA.Wink Saville2013-07-291-2/+4
|/ | | | | | | | | | Add a network type for establishing connections to the apn used for the initial connection. Enable some debug for now. Bug: 8733613 Change-Id: Ia627ac0cf5715660b6d02bb13a83d46ec1727b87
* Add checkMobileProvisioning to ConnectivityService.Wink Saville2013-06-291-0/+13
| | | | | Bug: 9279964 Change-Id: I42c326a21e05aa301e9d974ed9ac1d59472780ec
* Add BT - DataTracker connectionRobert Greenwalt2013-03-271-9/+6
| | | | | | | | Allows the external BT stack the means to communicate with ConnectivityService during reverse tethering. bug:8445208 Change-Id: Ice7dfb0b50c9481d359aed14a51372878185171c
* Add stacking to the NetworkStateTrackers.Lorenzo Colitti2013-03-151-0/+10
| | | | | Bug: 8276725 Change-Id: I55a107fea78f9cc84f15bd6c75292138fb35a1b6
* Captive portal handlingIrfan Sheriff2012-08-271-0/+5
| | | | | | | | | | We now notify the user of a captive portal before switching to the network as default. This allows background applications to continue to work until the user confirms he wants to sign in to the captive portal. Also, moved out captive portal handling out of wifi as a seperate component. Change-Id: I7c7507481967e33a1afad0b4961688bd192f0d31
* Update TCP buffer size when switching network typeRobert Greenwalt2012-08-201-2/+11
| | | | | | | | | | | | | Import of non-merging change 41612 from AOSP When PDP connects in GSM network, the TCP buffer window size is set to max 8760. If the phone swicthes to UMTS, the TCP buffer size is not updated to UMTS, i.e. GPRS buffer size is still used with limited data transfer spead as a result. This fix makes sure the TCP buffer size is updated when switching network type. Change-Id: Ic44a557677ffe629e83ce1f522a9f058bee6e7b2
* am a5637bac: Merge "Telephony: Add HSPAP to getTcpBufferSizesPropName"Robert Greenwalt2012-08-011-0/+3
|\ | | | | | | | | * commit 'a5637bac23611a985696c92b49f93964f435ecb5': Telephony: Add HSPAP to getTcpBufferSizesPropName
| * Telephony: Add HSPAP to getTcpBufferSizesPropNameNaveen Kalla2012-07-261-0/+3
| | | | | | | | | | | | | | | | When device is camped on HSPAP TCP Buffer sizes need to be configured properly to support higher data rates. Without this change, default TCP buffer sizes will be used and throughput will be low. Change-Id: Ica5884b35851a32e57c82c63b148df5be580ae83
| * Create telephony-common and mms-common - DO NOT MERGEWink Saville2012-07-171-49/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These have been created to reduce the size and complexity of frameworks/base. mms-common was created by moving all of frameworks/base/core/java/com/google/android/mms to: frameworks/opt/mms telephony-common was created by moving some of frameworks/base/telephony to: frameworks/opt/telephony Change-Id: If6cb3c6ff952767fc10210f923dc0e4b343cd4ad
* | am a45746ef: Fix several cases of broken droiddoc syntax external issue 35214Jeff Smith2012-07-251-1/+1
|\ \ | | | | | | | | | | | | * commit 'a45746efadd11bb7dfab026fb3c81a25fae74ca4': Fix several cases of broken droiddoc syntax external issue 35214
| * | Fix several cases of broken droiddoc syntaxJeff Smith2012-07-251-1/+1
| |/ | | | | | | | | | | | | | | external issue 35214 patch contributed by Jeff Smith <whydoubt@yahoo.com> Change-Id: I70dcee88a140699bf3e1ab369bed6dcd2fdd3d83
* / Create telephony-common and mms-commonWink Saville2012-07-111-49/+48
|/ | | | | | | | | | | | | | | | | These have been created to reduce the size and complexity of frameworks/base. mms-common was created by moving all of frameworks/base/core/java/com/google/android/mms to: frameworks/opt/mms telephony-common was created by moving some of frameworks/base/telephony to: frameworks/opt/telephony Change-Id: If6cb3c6ff952767fc10210f923dc0e4b343cd4ad
* Send availability info more reliablyRobert Greenwalt2011-10-181-1/+4
| | | | | | | | We don't have a monolithic availability state, so the mAvailable variable must go. bug:5453318 Change-Id: I82af90907cc7a0173b74d661912f9c28ddc7dcb0
* Reduce connectivity loggingWink Saville2011-09-211-1/+1
| | | | Change-Id: I5d45b8fbcd01e42df7f2b1cf02fb5b226128abb8
* am 61db35da: am 2f835a61: Merge "Make copies of NetworkInfo to give out." ↵Robert Greenwalt2011-09-131-1/+1
|\ | | | | | | | | | | | | into honeycomb-LTE * commit '61db35da2b4501dde5646f86f21cf5054c41ea26': Make copies of NetworkInfo to give out.
| * Make copies of NetworkInfo to give out.Robert Greenwalt2011-09-091-1/+1
| | | | | | | | | | | | | | Otherwise we'll change it out from under those we've given it too. bug:5233462 Change-Id: Iffc886849edfa6ced3da1133f9d363e11b2733f8
* | Pass roaming info to ConnectivityService.Robert Greenwalt2011-09-081-0/+2
| | | | | | | | | | bug:5215657 Change-Id: I77024141a7bbaa47eae021009e16b283699be53e
* | Always splice historical data stats, debug info.Jeff Sharkey2011-08-261-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | When reading network counters, always splice in xt_qtaguid values to avoid counting backwards. Test to verify. Remove verbose logging around global alerts, and add dumpsys debug info for NMS and MDST. Also fix subtle bug around stats persisting and dumping. Bug: 5212893, 5211028 Change-Id: I783e5286637a67ee2dd2b09878198711a926d0cb
* | Proactively disable data when over policy limit.Jeff Sharkey2011-08-231-22/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add policy controls to NetworkStateTracker which are combined with other user preference and internal flags to decide if data connection should be established. Better locking around enabled flags. When data network would be over limit, proactively disable data on that network. Enable when policy is snoozed or when cycle resets. Track and dismiss notifications from now-stale policies. Bug: 4587023, 5178147 Change-Id: Ibfcc9f73cda7c369209af701b46eddd3d1943f2d
* | Reduce ConnectivityService loggingRobert Greenwalt2011-08-021-18/+18
| | | | | | | | | | bug:5106520 Change-Id: I4a7a5cac51c09e9e2275b30b7b2c053f94b9088d
* | Stop creating threads for each MDST.Robert Greenwalt2011-08-021-3/+1
|/ | | | | | Response to email from the framework team. Change-Id: I8fec9cfbc3364c2c2a16156afc2414d06c675de7
* Reset connections AFTER we take down the network.Robert Greenwalt2011-06-161-41/+0
| | | | | | | | | If you do it before you have a race condition and some apps will manage to reconnect on the dieing network before it goes and then get no notification when it goes. bug: 3408025 Change-Id: I5386ff313c759b3f687bc38731454ab43dbe76b8
* Linkproperties update via unsol data call state change.Kazuhiro Ondo2011-05-171-0/+15
| | | | | | | | | | Handles the scenario of radio technology handover with IP continuity. Once RIL/Modem finished a handover operation, an unsol data call state change will be send up to FW notifying all link propertes changes. FW will then re-configure the device with new link properties including iptable used by Tethering. Change-Id: I05e29f66ac3db8ba4274d3662642607742ba1d12
* Add external dependency API.Robert Greenwalt2011-04-071-0/+20
| | | | | | | An APN will not be connected to if some external dependency is not met. bug:3486704 Change-Id: I7d94df343b260013efd11faa978deb13f07f1389
* Do not merge: Revert the revert of "LTE Changes for Telephony including ↵Wink Saville2011-03-141-1/+8
| | | | | | | | | | Multiple PDN support and IPV6 support" This reverts commit eca208fae6d1b6ae9c8c0e42eee092e86dbddbb7 and is the first of the LTE commits in master being back ported to the LTE branch. Change-Id: I17d4a1b779ed74bc7dfb409d2c1a30f60fdb27c7
* DO NOT MERGE: Revert "LTE Changes for Telephony including Multiple PDN ↵Wink Saville2011-03-031-8/+1
| | | | | | | | support and IPV6 support" This reverts commit 2b8bcfe5b74e1a34d136f4ff46e3c94397f38f82. Change-Id: Ifc4e9aaccb54e065a36380710694cd6e4d347636