Commit Graph

1006 Commits

Author SHA1 Message Date
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
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
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
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
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 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
Wink Saville
11f99735ee 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
830e29b51b 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
bd53d843fa 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
04078a6b3c am bcd5f33d: am 9b6363e5: am cbad1243: Merge "Check that hipri has started." into jb-mr2-dev
* commit 'bcd5f33d7eea7c09fe727d61613429c0d49c2086':
  Check that hipri has started.
2013-08-08 16:22:14 -07:00
Wink Saville
ead12e2f40 am 02eab434: am f42ca169: 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
b3aae5de90 am 55adb390: am 848b190c: 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
bcd5f33d7e 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
f42ca16989 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
848b190c4f Merge "Have CaptivePortalTracker use gservices updateable provisioning urls." into jb-mr2-dev 2013-08-08 22:06:21 +00:00
Vinit Deshapnde
e0fac27d4d 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
The Android Automerger
f39bcb7c62 merge in klp-release history after reset to klp-dev 2013-08-08 07:54:10 -07:00
Lorenzo Colitti
ac30f4205e Merge "Simplify LinkPropertiesTest." 2013-08-08 02:54:29 +00:00
Lorenzo Colitti
a2dc69a893 Simplify LinkPropertiesTest.
Instead of converting IP addresses to strings throughout the
test, do so once at the beginning.

Change-Id: I7f0dae5d2e9e2cdc6ec808e2cf71197ba6ade0a4
2013-08-08 11:03:46 +09:00
Jason Monk
a5bf2840cc Add PAC File support for proxy configuration
PAC (Proxy auto-config) files contain a single javascript function,
FindProxyForURL(url, host).  It gets called to determine what proxy should be
used for a specific request.

This adds PAC support to the system.  The ProxyProperties has been modified
to hold the PAC file when one is present.  The Proxy method
setHttpProxySystemProperty has been modified to insert a PacProxySelector
as the default ProxySelector when it is required.  This new ProxySelector
makes calls to the ConnectivityService to parse the PAC file.

The ConnectivityService and the WifiConfigStore have been modified to support
saving the extra PAC file data.

The ConnectivityService now has a class attached (PacProxyNative) that
interfaces to the native calls for PAC files.  The parsing of the PAC file
is handled by libpac (which is being added to external/) which utilizes
libv8 to parse the javascript.

As a fallback to applications that don't use the java ProxySelector,  the proxy
is setup to point to a local proxy server that will handle the pac parsing.

bug:10182711
Change-Id: I5eb8df893c632fd3e1b732385cb7720ad646f401
2013-08-07 21:01:39 -04:00
Wink Saville
674777e622 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-07 16:22:47 -07:00
Wink Saville
15f129209d 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-07 11:02:57 -07:00
The Android Automerger
9b1028b34e merge in klp-release history after reset to master 2013-08-07 06:00:48 -07:00
David Christie
4b61d6c0c4 Merge "Revert "Fix broken unit test"" 2013-08-06 17:28:49 +00:00
David Christie
d6085f847c Revert "Fix broken unit test"
This reverts commit 4bd5921245.

Change-Id: I67f5e7227a8a874158c4f0954e62a77a317f1edd
2013-08-06 17:28:03 +00:00
David Christie
23238e776d Merge "Fix broken unit test" 2013-08-06 16:56:16 +00:00