Commit Graph

1001 Commits

Author SHA1 Message Date
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
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
Wink Saville
8432cf4621 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-05 14:15:54 -07:00
Elliott Hughes
07b2d690fd am 3ae2bb01: am 60ae2617: Merge "If frameworks wants ASCII casing, it should explicity ask for it."
* commit '3ae2bb01de967de941cb7c7904346f441ec8d063':
  If frameworks wants ASCII casing, it should explicity ask for it.
2013-08-02 17:58:33 -07:00
Elliott Hughes
3ae2bb01de am 60ae2617: Merge "If frameworks wants ASCII casing, it should explicity ask for it."
* commit '60ae2617b4b304fc3e45a441f87d1765714477ba':
  If frameworks wants ASCII casing, it should explicity ask for it.
2013-08-02 17:41:57 -07:00
Elliott Hughes
4e3475964b If frameworks wants ASCII casing, it should explicity ask for it.
http://elliotth.blogspot.com/2012/01/beware-convenience-methods.html

Bug: https://code.google.com/p/android/issues/detail?id=58359
Change-Id: Iaab02e718a7be7bda22e626dca05d79bfd2a8fc4
2013-08-02 15:12:32 -07:00
Dmitry Shmidt
1a16846646 dhcp: Get mtu property from dhcp results
Change-Id: I1b032094e0945b27d98f7ac786247b7cc9d60131
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-08-02 14:07:50 -07:00
David Christie
4bd5921245 Fix broken unit test
Change-Id: I4aa0035233749f6d585c151329436439ae9b2921
2013-08-02 12:33:00 -07:00
David Christie
d201f880de Fix build breakage
Change-Id: Ia684fb55db301fdadaa3aae93f82b2cdcfc200af
2013-08-02 10:54:55 -07:00
David Christie
fa9d82b877 Add WorkSource capability to AlarmManager.
Change-Id: I663ea3078d405f0fa667a04bdaa376ae6652e994
2013-08-01 13:22:40 -07:00
Lorenzo Colitti
a721e2bb76 Merge "Add accessors for all addresses and clarify compare* methods" 2013-08-01 06:44:29 +00:00
Wink Saville
d28eef464a Fix excessive log spew.
Bug: 10115060
Change-Id: I61fd83071da1224f38757b8d90f58c8d6c41d36b
2013-07-31 15:49:04 -07:00
Lorenzo Colitti
e1b4742442 Add accessors for all addresses and clarify compare* methods
1. Add a method to return all addresses and all LinkAddresses on
   all links (both base links and stacked links). We already had
   one for routes, but did not yet have any for addresses.
2. Rename compareRoutes to compareAllRoutes, because unlike the
   other compare* methods, it looks at all interfaces. Update
   what appears to be its only caller.
3. Update the documentation of the compare* methods to match
   reality (they don't return lists) and clarify whether they
   look at all links or only the base link.

Change-Id: Ie22e6c7f163d5de8e407248b45171dc28382d2d3
2013-08-01 00:21:24 +09:00
Lorenzo Colitti
57dbb7d9e7 am 673eb677: am 15884007: Merge "464xlat: use a gatewayed route, not point-to-point"
* commit '673eb677a27b6d761bd358edfc46ed64eedbb167':
  464xlat: use a gatewayed route, not point-to-point
2013-07-30 10:28:32 -07:00
Lorenzo Colitti
673eb677a2 am 15884007: Merge "464xlat: use a gatewayed route, not point-to-point"
* commit '158840079a501784c76e9816b215b3a1839074ef':
  464xlat: use a gatewayed route, not point-to-point
2013-07-30 09:57:18 -07:00
Lorenzo Colitti
97049e5111 464xlat: use a gatewayed route, not point-to-point
Various applications such as Skype and our legacy VPN code
do not understand routes pointed directly at point-to-point
interfaces and require a default gateway IPv4 address in
order to function.

Grudgingly accept that routes without default gateways Are Hard
and use gatewayed routes instead. This causes routing to go from:

default dev clat4  scope link

to:

default via 192.0.0.4 dev clat4  scope link
192.0.0.4 dev clat4  scope link

and those apps now work.

Bug: 9597256
Bug: 9597516
Change-Id: I7b7890873802d3cb99affd6eb70b8ab75e7a2cf6
2013-07-31 01:09:53 +09:00
Wink Saville
512c2204b1 Add network type TYPE_MOBILE_IA.
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
2013-07-29 15:02:29 -07:00
Geremy Condra
1fea7c4bdd Merge "Remove unused mDnsOverridden" 2013-07-26 17:48:54 +00:00
Chad Brubaker
5fdc14656c Remove unused mDnsOverridden
mDnsOverridden is no longer used now that VPNs do not override the
default DNS settings.

Change-Id: I69495b9a6de7d60628813f357d3dbdf548695ada
2013-07-23 17:49:37 -07:00
Geremy Condra
63ac2f7d54 Merge "Fix default DNS not being set on network changes" 2013-07-24 00:32:34 +00:00
Chad Brubaker
73652d07b8 Fix default DNS not being set on network changes
Change-Id: I3c45404cab34c77b20dadc1d8aee127aa08fd0bd
2013-07-23 17:13:36 -07:00
Geremy Condra
3092b8e931 Merge "Fix supplimentary network connections with VPNs" 2013-07-23 17:58:33 +00:00
Geremy Condra
50e914ff34 Merge "Support multiple Vpn ManageDialogs" 2013-07-23 17:55:45 +00:00
Guang Zhu
a5e56e1223 fix build
Change-Id: Ie4bd7c3fe9320d22b7da2962e5e5a4abca510bd2
2013-07-21 02:01:34 -07:00
The Android Open Source Project
9c594437df am 10a4c0a6: (-s ours) Reconcile with jb-mr2-zeroday-release - do not merge
* commit '10a4c0a65a28155748956915b6f58fd201b7c901':
  Add gservices updater for carrier provisioning url
  Cleaner Tejat notification in Audio Package 11
  When a SIM is changed check mobile provisioning.
  Fix missing lock in power manager.
  Remove iterators (DO NOT MERGE)
2013-07-19 16:02:25 -07:00
Chad Brubaker
49db422100 Fix supplimentary network connections with VPNs
Enables the use of supplimentary mobile networks like MMS, and HIPRI
while VPNs are running.

Change-Id: I313f57a905b4e16bd4322c68687cbff1cfbe9d3e
2013-07-19 15:57:05 -07:00
Robert Greenwalt
f68291a419 resolved conflicts for merge of eb98d8f6 to master
Change-Id: Ia9509ab6897e27da8bf4fc61a4140f2f93acb80f
2013-07-19 14:30:49 -07:00
The Android Open Source Project
10a4c0a65a Reconcile with jb-mr2-zeroday-release - do not merge
Change-Id: I1d7f0e0f6a4cb8b9363c99a830dc1656424ad49d
2013-07-19 14:20:43 -07:00
Robert Greenwalt
8636128e2c resolved conflicts for merge of 22069565 to master
Change-Id: Idd0ad9b1504fddf68c4c4cc04731de1eddd204b3
2013-07-19 14:09:30 -07:00
Wink Saville
5ada2f6941 am 790ac470: am df43ba82: am e3badc10: Merge "When a SIM is changed check mobile provisioning." into jb-mr2-dev
* commit '790ac470fe3226d10b6eeae707054b102095c284':
  When a SIM is changed check mobile provisioning.
2013-07-19 13:42:36 -07:00
Robert Greenwalt
eb98d8f65f am ddf17b5b: am 8c87b297: Merge "Make CS.isTetheringSupported dynamic" into jb-mr2-dev
* commit 'ddf17b5b82f25965502377588483abbc328c4e6d':
  Make CS.isTetheringSupported dynamic
2013-07-19 13:37:58 -07:00
Robert Greenwalt
220695650f am b5bf655c: am 1497d485: Merge "Add gservices updater for carrier provisioning url" into jb-mr2-dev
* commit 'b5bf655cc6cc9128aec99958cce3b054348c9273':
  Add gservices updater for carrier provisioning url
2013-07-19 13:37:41 -07:00
Wink Saville
790ac470fe am df43ba82: am e3badc10: Merge "When a SIM is changed check mobile provisioning." into jb-mr2-dev
* commit 'df43ba82e6c232985a95c9827f7d71dd3194e0a8':
  When a SIM is changed check mobile provisioning.
2013-07-19 13:37:35 -07:00
Wink Saville
c2d87fb435 Merge "checkMobileProvisioning is not using sendNotification." 2013-07-19 17:14:41 +00:00
Wink Saville
99fedebaa1 checkMobileProvisioning is not using sendNotification.
Change-Id: Ie5b98b462b29fe9339fcb8207d2d33e3028a155c
2013-07-19 09:27:56 -07:00
Christopher Tate
98b10cec42 Fix build & preserve DHCP scheduling as-is
Change-Id: I4063b18532c476280f343658bf3641495e526ed4
2013-07-18 18:23:57 -07:00
Robert Greenwalt
368095f658 Make CS.isTetheringSupported dynamic
It used to be set at boot, but that was too quick to pick up carrier
specific resources.  With this change even if you switch sims subequent
checks get the new values.

bug:9865616
Change-Id: I8c270c6b02fc6bdd3c3d76ceea58172df25e058d
2013-07-18 14:24:42 -07:00
Robert Greenwalt
a01ffe6f38 Add gservices updater for carrier provisioning url
bug:9623159
Change-Id: I36697ed341353b7a3dbec5afe20241102e76f6f1
2013-07-18 11:24:56 -07:00
Robert Greenwalt
1497d4854d Merge "Add gservices updater for carrier provisioning url" into jb-mr2-dev 2013-07-17 23:46:25 +00:00
Wink Saville
5ba1b91400 When a SIM is changed check mobile provisioning.
A simple mechanism for doing this is to take advantage of the fact
that we require the device to reboot after a sim has been changed.
Thus when connectivity service is started we wait to get a connection
then call checkMobileProvisioning once. We also add a check that
the DEVICE_PROVISIONED is true, i.e. SetupWizard has been run.

Bug: 9784024
Change-Id: I5c1936744f6fc55a447ae44cd36eec3849d27e21
2013-07-17 14:59:20 -07:00
Robert Greenwalt
39d560174e Add gservices updater for carrier provisioning url
bug:9623159
Change-Id: I36697ed341353b7a3dbec5afe20241102e76f6f1
2013-07-17 14:05:33 -07:00
Chad Brubaker
94f3c8c66d Support multiple Vpn ManageDialogs
Move away from storing the configs in the Intent to prevent issues with
PendingIntents and multiple configs.

The Dialog now queries ConnectivityService for the configuration to
display in the management dialog.

Change-Id: I0e0ef52db840152914d117a24f776d8106e836ff
2013-07-16 18:59:12 -07:00
Wink Saville
f0e9c7fc7f When a SIM is changed check mobile provisioning.
A simple mechanism for doing this is to take advantage of the fact
that we require the device to reboot after a sim has been changed.
Thus when connectivity service is started we wait to get a connection
then call checkMobileProvisioning once. We also add a check that
the DEVICE_PROVISIONED is true, i.e. SetupWizard has been run.

Bug: 9784024
Change-Id: I5c1936744f6fc55a447ae44cd36eec3849d27e21
2013-07-16 17:16:37 -07:00
Chad Brubaker
dc7e3ee3ad Move markSocketAsUser to the top of IConnectivityManager.aidl
Move markSocketAsUser to the top of IConnectivityManager.aidl to make
calls from
framework/native/services/connectivitymanager less fragile

Change-Id: Iba92c21dfef175b570521f34e7ee2732e5a0a9c9
2013-07-16 11:29:11 -07:00
Geremy Condra
95a46facdc Merge "Support routing sockets as another user" 2013-07-15 21:57:18 +00:00
Geremy Condra
13d27ad029 Merge changes Ia6646363,I94389b64
* changes:
  Add per user VPN support
  Add NetworkUtil function for marking sockets
2013-07-15 21:56:30 +00:00