Commit Graph

1016 Commits

Author SHA1 Message Date
Lorenzo Colitti
8f776df19c am 07b72c3d: Merge "Add a function to replace all the link addresses." into klp-dev
* commit '07b72c3dc40781425cc58685629e0224d914413a':
  Add a function to replace all the link addresses.
2013-09-05 16:06:12 -07:00
Lorenzo Colitti
07b72c3dc4 Merge "Add a function to replace all the link addresses." into klp-dev 2013-09-05 23:03:24 +00:00
Vinit Deshapnde
b823d3d305 am 64a967ba: Merge "Rename LinkInfo to LinkQualityInfo" into klp-dev
* commit '64a967ba73caffe9ed74fc62142bf72616009dce':
  Rename LinkInfo to LinkQualityInfo
2013-09-05 10:53:16 -07:00
Vinit Deshapnde
64a967ba73 Merge "Rename LinkInfo to LinkQualityInfo" into klp-dev 2013-09-05 17:50:19 +00:00
Lorenzo Colitti
5f468e2fec Add a function to replace all the link addresses.
Bug: 10232006
Change-Id: I689ce4735999dac2ab5e1fae09d80b1f734292a1
2013-09-05 13:02:54 +09:00
Vinit Deshapnde
69386b3e18 Rename LinkInfo to LinkQualityInfo
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
2013-09-04 14:11:24 -07:00
Wink Saville
d2b36f0ae4 am 35bd30b1: Merge "Merge commit \'bc6ecbf7\' into manualmerge" into klp-dev
* commit '35bd30b184b321754697b992aa5c581e204d530a':
  Add support for handling mobile provisioning networks.
2013-08-29 15:14:02 -07:00
Wink Saville
3ade48710d Merge commit 'bc6ecbf7' into manualmerge
* commit 'bc6ecbf7':
  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
2013-08-29 14:57:08 -07:00
Wink Saville
bc6ecbf7c2 am 8cb2f42e: am 89c87b90: Add support for handling mobile provisioning networks.
* commit '8cb2f42eea2ef3b249528aa7913fc7a6dfc6b741':
  Add support for handling mobile provisioning networks.
2013-08-29 10:26:06 -07:00
Wink Saville
89c87b90a5 Add support for handling mobile provisioning networks.
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
2013-08-29 08:55:16 -07:00
Jason Monk
48bc6038c9 am 090e8f5a: Merge "Don\'t clear Global Proxy on boot." into klp-dev
* commit '090e8f5ae20727771150cd6aa5e04194d08ab226':
  Don't clear Global Proxy on boot.
2013-08-28 07:43:39 -07:00
Jason Monk
090e8f5ae2 Merge "Don't clear Global Proxy on boot." into klp-dev 2013-08-28 14:41:15 +00:00
Jason Monk
6307cd734d Don't clear Global Proxy on boot.
Doesn't clear the global proxy when a deprecated one is not found because
there still may be a non-deprecated global proxy present.

Bug: 10457179
Change-Id: I68e6d5aee7b4940f9315484060c7d82cb8ccfa70
2013-08-27 10:51:24 -04:00
Lorenzo Colitti
869f9566fb am a507ce10: Merge "Add a simple test for NetworkManagementService." into klp-dev
* commit 'a507ce10986998cbe00e084ef8c4451dce51df5c':
  Add a simple test for NetworkManagementService.
2013-08-26 21:10:36 -07:00
Lorenzo Colitti
a507ce1098 Merge "Add a simple test for NetworkManagementService." into klp-dev 2013-08-27 04:08:54 +00:00
Wink Saville
82f76744b0 am cfcabebd: am c27bc9f3: (-s ours) am 33283a97: am bc58840a: DO NOT MERGE: MDST is not ready until connected to DcTracker.
* commit 'cfcabebdd7a18aad50fcb206a70c41f46f575a5e':
  DO NOT MERGE: MDST is not ready until connected to DcTracker.
2013-08-26 15:04:28 -07:00
Wink Saville
adccd9143e am be374429: am 94c7865c: am b42beeaf: am fb03c6e5: In isMobileOk don\'t execute finally if mobile data is not supported.
* commit 'be3744290d41428d21d0bc979ef02d6a0ab93b18':
  In isMobileOk don't execute finally if mobile data is not supported.
2013-08-26 15:04:25 -07:00
Wink Saville
cfcabebdd7 am c27bc9f3: (-s ours) am 33283a97: am bc58840a: DO NOT MERGE: MDST is not ready until connected to DcTracker.
* commit 'c27bc9f3fa38bfdebc96c754f5d8bf92558be32c':
  DO NOT MERGE: MDST is not ready until connected to DcTracker.
2013-08-26 11:53:14 -07:00
Wink Saville
c27bc9f3fa am 33283a97: am bc58840a: DO NOT MERGE: MDST is not ready until connected to DcTracker.
* commit '33283a9726a29b5a79d7885fe194d52c0ebe7450':
  DO NOT MERGE: MDST is not ready until connected to DcTracker.
2013-08-26 11:50:10 -07:00
Wink Saville
be3744290d am 94c7865c: am b42beeaf: am fb03c6e5: In isMobileOk don\'t execute finally if mobile data is not supported.
* commit '94c7865c29fe3aa69f2b9871616548e4ac1ea9b2':
  In isMobileOk don't execute finally if mobile data is not supported.
2013-08-26 11:46:29 -07:00
Wink Saville
94c7865c29 am b42beeaf: am fb03c6e5: In isMobileOk don\'t execute finally if mobile data is not supported.
* commit 'b42beeafcf8117fb4ac41dd91fc9e6113c0d6aae':
  In isMobileOk don't execute finally if mobile data is not supported.
2013-08-26 11:43:25 -07:00
Lorenzo Colitti
2e73837a72 Add a simple test for NetworkManagementService.
For now, this only tests network observers. It works by starting
NetworkManagementService with a fake netd socket, feeding it
inputs, and seeing if the appropriate observer methods are
called.

Bug: 10232006
Change-Id: I827681575642a4ee13ae48b81272521544b676bd
2013-08-23 18:30:19 +09:00
Vinit Deshapnde
db6c0b95f5 am 48f4246a: Merge "Introduce network link quality statistics" into klp-dev
* commit '48f4246a7caea8448fc3bcc8b82e9d37e38ff597':
  Introduce network link quality statistics
2013-08-22 09:21:45 -07:00
Vinit Deshapnde
48f4246a7c Merge "Introduce network link quality statistics" into klp-dev 2013-08-22 16:16:45 +00:00
Vinit Deshapnde
db7abcb6e9 Introduce network link quality statistics
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
2013-08-21 13:09:01 -07:00
Lorenzo Colitti
93868bfe9b am 4d3d5f1f: Merge "Modify LinkProperties address update methods." into klp-dev
* commit '4d3d5f1f9e2ccf680660086338f7b9b02c2eb648':
  Modify LinkProperties address update methods.
2013-08-21 10:17:05 -07:00
Lorenzo Colitti
8f90fe3f0b am b8aa06c7: Merge "Add a string constructor to LinkAddress." into klp-dev
* commit 'b8aa06c783bd315d04df3fe375682040ba619543':
  Add a string constructor to LinkAddress.
2013-08-21 10:13:29 -07:00
Lorenzo Colitti
662b96cf55 Modify LinkProperties address update methods.
1. Make addLinkAddress a no-op if the address already exists.
2. Make addLinkAddress, addStackedLink and removeStackedLink
   return a boolean indicating whether something changed.
3. Add a removeLinkAddress method (currently there is no way of
   removing an address).
3. Move hasIPv6Address from ConnectivityService to
   LinkProperties, where it belongs.

Bug: 9625448
Bug: 10232006
Change-Id: If641d0198432a7a505e358c059171f25bc9f13d5
2013-08-20 21:16:37 +09:00
Lorenzo Colitti
6efd3893ae Add a string constructor to LinkAddress.
This will allow us to do new LinkAddress("2001:db8::1/64").

Bug: 10232006
Change-Id: If479bdbab16826afe9d82732215141841c282299
2013-08-20 14:19:20 +09:00
Wink Saville
bc58840afa DO NOT MERGE: MDST is not ready until connected to DcTracker.
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
2013-08-16 17:17:28 -07:00
Wink Saville
fb03c6e5dc In isMobileOk don't execute finally if mobile data is not supported.
Move the early return outside the try {} finally so we don't call
setEnableFailFastMobileData(DctContants.DISABLED). Otherwise
referencing counting is wrong and an exception is thrown in DcTrackerBase.

Bug: 10304904
Change-Id: I5ba5121e473bada9f3daa8d6f3d3577cec8212fc
2013-08-15 21:14:30 -07:00
The Android Open Source Project
fa2ff1e0f8 Reconcile with klp-release - do not merge
Change-Id: I11d427fe49ec6cb012b0176734dc245eabd5f50b
2013-08-14 15:10:18 -07:00
The Android Open Source Project
511eaf802a am f9a676ac: (-s ours) Reconcile with jb-mr2-release jb-mr2-zeroday-release jb-mr2-zeroday-deb-release - do not merge
* commit 'f9a676ac52a00a2df3211a2f51da24481ed13d01':
  Use hostname verifier directly instead of instance DO NOT MERGE
  If in a mobile captive portal is detected enable fail fast.
  Have CaptivePortalTracker use gservices updateable provisioning urls.
  In CaptiviePortalTracker a socket timeout is probably a captive portal.
  Check that hipri has started.
  Fix issue #10226007: Reset apps restores most of the changed settings...
  Fix issue #10226007: Reset apps restores most of the changed settings...
2013-08-14 12:16:21 -07:00
The Android Open Source Project
f9a676ac52 Reconcile with jb-mr2-release jb-mr2-zeroday-release jb-mr2-zeroday-deb-release - do not merge
Change-Id: I498651fc3fa9b021570780e8b8848a806c31962f
2013-08-14 12:09:27 -07:00
The Android Automerger
c337d8660a merge in klp-release history after reset to klp-dev 2013-08-14 06:06:12 -07:00
Wink Saville
800495504c In isMobileOk don't execute finally if mobile data is not supported.
Move the early return outside the try {} finally so we don't call
setEnableFailFastMobileData(DctContants.DISABLED). Otherwise
referencing counting is wrong and an exception is thrown in DcTrackerBase.

Bug: 10304904
Change-Id: I5ba5121e473bada9f3daa8d6f3d3577cec8212fc
2013-08-13 17:48:36 -07:00
Wink Saville
37e7312e12 In isMobileOk don't execute finally if mobile data is not supported.
Move the early return outside the try {} finally so we don't call
setEnableFailFastMobileData(DctContants.DISABLED). Otherwise
referencing counting is wrong and an exception is thrown in DcTrackerBase.

Bug: 10304904
Change-Id: I5ba5121e473bada9f3daa8d6f3d3577cec8212fc
2013-08-13 12:41:06 -07:00
The Android Automerger
e4f537b6dd merge in klp-release history after reset to klp-dev 2013-08-12 06:02:03 -07:00
Wink Saville
78f8907ae1 am 4157cb24: am 02eab434: am 3f58ba89: Merge "If in a mobile captive portal is detected enable fail fast." into jb-mr2-dev
* commit '4157cb2477457e99077d1a69f2de043b3186aa3f':
  If in a mobile captive portal is detected enable fail fast.
2013-08-08 17:10:34 -07:00
Wink Saville
0d406dffc0 am a0ffa2ed: am 55adb390: am 6db564f6: Merge "Have CaptivePortalTracker use gservices updateable provisioning urls." into jb-mr2-dev
* commit 'a0ffa2ed4c8ccd5c237e411800555aede0bea2f3':
  Have CaptivePortalTracker use gservices updateable provisioning urls.
2013-08-08 17:10:32 -07:00
Wink Saville
3b5b4882f5 If in a mobile captive portal is detected enable fail fast.
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
2013-08-08 16:59:18 -07:00
Wink Saville
cd0e1dc7de Have CaptivePortalTracker use gservices updateable provisioning urls.
After detecting there is a captive portal the url used in the
notification for mobile networks should be updateable via gservices.
These urls will be the same as used by CheckMp and is needed for
carriers that have specific provisioning urls such as AT&T and Verizon.

Bug: 9622647
Change-Id: Idcf4dabc72ece1dbbe1d5e5a21e550dd06fe16c7
2013-08-08 16:59:07 -07:00
Wink Saville
3e2735620e Check that hipri has started.
I needed to test the result of startUsingNetworkFeature, otherwise
on mobile networks that are slow to come up, we won't detect
warm SIMs after booting.

Bug: 9962943
Change-Id: Ib638a4e43867ecaa85d6abff65643b77a63526b6
2013-08-08 16:58:43 -07:00
Wink Saville
5ae370c753 am 80cc1ebd: am 9b6363e5: am cbad1243: Merge "Check that hipri has started." into jb-mr2-dev
* commit '80cc1ebde9fd61c859ae45cd3958fcf32de75ea1':
  Check that hipri has started.
2013-08-08 16:22:14 -07:00
Wink Saville
4157cb2477 am 02eab434: am 3f58ba89: Merge "If in a mobile captive portal is detected enable fail fast." into jb-mr2-dev
* commit '02eab434ad9faa25291e63023b7e66698ca457a8':
  If in a mobile captive portal is detected enable fail fast.
2013-08-08 15:46:55 -07:00
Wink Saville
a0ffa2ed4c am 55adb390: am 6db564f6: Merge "Have CaptivePortalTracker use gservices updateable provisioning urls." into jb-mr2-dev
* commit '55adb390bb96175db9abee3ead349a98b4dc4262':
  Have CaptivePortalTracker use gservices updateable provisioning urls.
2013-08-08 15:46:52 -07:00
Wink Saville
80cc1ebde9 am 9b6363e5: am cbad1243: Merge "Check that hipri has started." into jb-mr2-dev
* commit '9b6363e5e6d37e3e8d103751d81613eeca32bbbf':
  Check that hipri has started.
2013-08-08 15:46:46 -07:00
Wink Saville
3f58ba8957 Merge "If in a mobile captive portal is detected enable fail fast." into jb-mr2-dev 2013-08-08 22:07:27 +00:00
Wink Saville
6db564f6a3 Merge "Have CaptivePortalTracker use gservices updateable provisioning urls." into jb-mr2-dev 2013-08-08 22:06:21 +00:00
Vinit Deshapnde
00c193e308 Use a single socket to communicate with supplicant
This helps to prepare for future updates from external sources.

Bug: 9298955

Change-Id: I4c63ad5fc1ea3564aab38cfce955de19bad75c0c
(cherry picked from commit fb40801ed8c217ae01082fb1cbd0c30bbf5532ac)
2013-08-08 18:38:53 +00:00