Commit Graph

1276 Commits

Author SHA1 Message Date
Wink Saville
55c4f2aa7a am 50f86448: am 59a9884b: Merge "Do not change NetworkInfo.DetailedState." into jb-mr2-dev
* commit '50f864480d6e9cf9e4d83b4533e3764753b4d408':
  Do not change NetworkInfo.DetailedState.
2013-09-06 09:17:19 -07:00
Lorenzo Colitti
350ce21732 am a5642e48: Merge "Add a function to replace all the link addresses." into klp-dev
* commit 'a5642e48b04aa51ec0dd9288e9c41b7c1b9762a3':
  Add a function to replace all the link addresses.
2013-09-05 16:06:12 -07:00
Lorenzo Colitti
a5642e48b0 Merge "Add a function to replace all the link addresses." into klp-dev 2013-09-05 23:03:24 +00:00
Wink Saville
b1a3202e79 Do not change NetworkInfo.DetailedState.
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
2013-09-05 12:02:25 -07:00
Vinit Deshapnde
a2b439bc95 am 77dc9372: Merge "Rename LinkInfo to LinkQualityInfo" into klp-dev
* commit '77dc937242a713538b5457db05703f619ccfb09d':
  Rename LinkInfo to LinkQualityInfo
2013-09-05 10:53:16 -07:00
Vinit Deshapnde
77dc937242 Merge "Rename LinkInfo to LinkQualityInfo" into klp-dev 2013-09-05 17:50:19 +00:00
Lorenzo Colitti
174782b0fc Add a function to replace all the link addresses.
Bug: 10232006
Change-Id: I689ce4735999dac2ab5e1fae09d80b1f734292a1
2013-09-05 13:02:54 +09:00
Vinit Deshapnde
00d4b8a987 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
The Android Automerger
3184a7ab93 merge in klp-release history after reset to klp-dev 2013-09-02 06:01:11 -07:00
Wink Saville
5fda0c1e0d Merge commit 'a37f06d7' into manualmerge
* commit 'a37f06d7':
  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-30 11:24:03 -07:00
Wink Saville
ed78d6a47f am 35bd30b1: Merge "Merge commit \'a37f06d7\' into manualmerge" into klp-dev
* commit '35bd30b184b321754697b992aa5c581e204d530a':
  Add support for handling mobile provisioning networks.
2013-08-29 15:14:02 -07:00
Wink Saville
cb117d31cb Merge commit 'a37f06d7' into manualmerge
* commit 'a37f06d7':
  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
a37f06d7d5 am 8cb2f42e: am 9a1a7ef5: 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
9a1a7ef57c 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
The Android Automerger
52e4748102 merge in klp-release history after reset to klp-dev 2013-08-29 06:01:01 -07:00
Jason Monk
43cfb75509 am c711d7a5: Merge "Don\'t clear Global Proxy on boot." into klp-dev
* commit 'c711d7a5e936f760bcd8cdf6afcfbf12020e983e':
  Don't clear Global Proxy on boot.
2013-08-28 07:43:39 -07:00
Jason Monk
c711d7a5e9 Merge "Don't clear Global Proxy on boot." into klp-dev 2013-08-28 14:41:15 +00:00
Sreeram Ramachandran
1b5a3acb8b Minor fixes: Add a missing "break" and some cosmetic fixes.
Change-Id: Ie614a7b47185fd511fdc3f064620e46ab7d6d8f8
2013-08-27 11:41:19 -07:00
Jason Monk
01a790ad55 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
The Android Automerger
51f66db5f2 merge in klp-release history after reset to klp-dev 2013-08-27 06:01:45 -07:00
Lorenzo Colitti
b09653b87e am 79d505d0: Merge "Add a simple test for NetworkManagementService." into klp-dev
* commit '79d505d0757c9f4381f011cfc43532c4331c5f47':
  Add a simple test for NetworkManagementService.
2013-08-26 21:10:36 -07:00
Lorenzo Colitti
79d505d075 Merge "Add a simple test for NetworkManagementService." into klp-dev 2013-08-27 04:08:54 +00:00
Wink Saville
cc42a7852c am 381c91da: am daed2e2b: (-s ours) am 33283a97: am d23fa090: DO NOT MERGE: MDST is not ready until connected to DcTracker.
* commit '381c91dac54fdcfbf4aacdaa855d2b8ec7ebb59f':
  DO NOT MERGE: MDST is not ready until connected to DcTracker.
2013-08-26 15:04:28 -07:00
Wink Saville
9a9ef401ba am 23d32ca4: am 85811798: am b42beeaf: am 54c5e169: In isMobileOk don\'t execute finally if mobile data is not supported.
* commit '23d32ca4b9678377057634ac8915cb6a2180bcea':
  In isMobileOk don't execute finally if mobile data is not supported.
2013-08-26 15:04:25 -07:00
Wink Saville
381c91dac5 am daed2e2b: (-s ours) am 33283a97: am d23fa090: DO NOT MERGE: MDST is not ready until connected to DcTracker.
* commit 'daed2e2baaa6e29badd345dd79a02eaf903722d8':
  DO NOT MERGE: MDST is not ready until connected to DcTracker.
2013-08-26 11:53:14 -07:00
Wink Saville
daed2e2baa am 33283a97: am d23fa090: 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
23d32ca4b9 am 85811798: am b42beeaf: am 54c5e169: In isMobileOk don\'t execute finally if mobile data is not supported.
* commit '85811798bee8677fd5949d7ec21959c77bcbdf87':
  In isMobileOk don't execute finally if mobile data is not supported.
2013-08-26 11:46:29 -07:00
Wink Saville
85811798be am b42beeaf: am 54c5e169: 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
The Android Automerger
459877dfbd merge in klp-release history after reset to klp-dev 2013-08-26 06:01:09 -07:00
Lorenzo Colitti
2337946b4f 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
66ad50789e am 5b8b6751: Merge "Introduce network link quality statistics" into klp-dev
* commit '5b8b6751f34ff68c7f5f31eaced9737d86f67a59':
  Introduce network link quality statistics
2013-08-22 09:21:45 -07:00
Vinit Deshapnde
5b8b6751f3 Merge "Introduce network link quality statistics" into klp-dev 2013-08-22 16:16:45 +00:00
The Android Automerger
91595a3168 merge in klp-release history after reset to klp-dev 2013-08-22 06:01:18 -07:00
Vinit Deshapnde
30ad254a1e 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
e2052c37e8 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
70c3377da5 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
09de418b17 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
b48bb0801a 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
d23fa090e9 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
54c5e16978 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 Automerger
6997c8479b merge in klp-release history after reset to klp-dev 2013-08-15 06:01:03 -07:00
The Android Open Source Project
a3fca18c32 Reconcile with klp-release - do not merge
Change-Id: I11d427fe49ec6cb012b0176734dc245eabd5f50b
2013-08-14 15:10:18 -07:00
The Android Open Source Project
db5cb48920 am 754e0803: (-s ours) Reconcile with jb-mr2-release jb-mr2-zeroday-release jb-mr2-zeroday-deb-release - do not merge
* commit '754e08030d6c473485f0c331d4914bed0144b6e6':
  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
754e08030d 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
1f1f0ce89b merge in klp-release history after reset to klp-dev 2013-08-14 06:06:12 -07:00
Wink Saville
884a8d2849 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
69e2de0a4e 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
f2134deed0 merge in klp-release history after reset to klp-dev 2013-08-12 06:02:03 -07:00
Wink Saville
052f1b617b am ead12e2f: am 02eab434: am f42ca169: Merge "If in a mobile captive portal is detected enable fail fast." into jb-mr2-dev
* commit 'ead12e2f4004410c317c3c8c8d3829fbba5fd289':
  If in a mobile captive portal is detected enable fail fast.
2013-08-08 17:10:34 -07:00
Wink Saville
84c97feb16 am b3aae5de: am 55adb390: am 848b190c: Merge "Have CaptivePortalTracker use gservices updateable provisioning urls." into jb-mr2-dev
* commit 'b3aae5de90baa0c5ccc3c3407943326f2d3357d9':
  Have CaptivePortalTracker use gservices updateable provisioning urls.
2013-08-08 17:10:32 -07:00