Commit Graph

948 Commits

Author SHA1 Message Date
Jason Monk
43324ee732 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
David Christie
27bd621bd4 Merge "Revert "Fix broken unit test"" 2013-08-06 17:28:49 +00:00
David Christie
87893f88f4 Revert "Fix broken unit test"
This reverts commit 9e6dd0ca49.

Change-Id: I67f5e7227a8a874158c4f0954e62a77a317f1edd
2013-08-06 17:28:03 +00:00
David Christie
2f3150e97d Merge "Fix broken unit test" 2013-08-06 16:56:16 +00:00
Elliott Hughes
7ada256efa am 6b67e07d: am 60ae2617: Merge "If frameworks wants ASCII casing, it should explicity ask for it."
* commit '6b67e07d2186cdbd3233a6d1f0e67cce9437a0b0':
  If frameworks wants ASCII casing, it should explicity ask for it.
2013-08-02 17:58:33 -07:00
Elliott Hughes
6b67e07d21 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
5547882084 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
feb443e59d 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
9e6dd0ca49 Fix broken unit test
Change-Id: I4aa0035233749f6d585c151329436439ae9b2921
2013-08-02 12:33:00 -07:00
David Christie
14298807a1 Fix build breakage
Change-Id: Ia684fb55db301fdadaa3aae93f82b2cdcfc200af
2013-08-02 10:54:55 -07:00
David Christie
a62588a133 Add WorkSource capability to AlarmManager.
Change-Id: I663ea3078d405f0fa667a04bdaa376ae6652e994
2013-08-01 13:22:40 -07:00
Lorenzo Colitti
a5094dc770 Merge "Add accessors for all addresses and clarify compare* methods" 2013-08-01 06:44:29 +00:00
Wink Saville
27f9273cf3 Fix excessive log spew.
Bug: 10115060
Change-Id: I61fd83071da1224f38757b8d90f58c8d6c41d36b
2013-07-31 15:49:04 -07:00
Lorenzo Colitti
43553b6fad 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
1f3e3bec7f am 178acfce: am 15884007: Merge "464xlat: use a gatewayed route, not point-to-point"
* commit '178acfced7c38c4e847e1d15f2c4b1a53d16deb7':
  464xlat: use a gatewayed route, not point-to-point
2013-07-30 10:28:32 -07:00
Lorenzo Colitti
178acfced7 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
00f6629ed9 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
70dbdcc418 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
45a5bf908e Merge "Remove unused mDnsOverridden" 2013-07-26 17:48:54 +00:00
Chad Brubaker
a8e8112dab 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
3b8e7328bd Merge "Fix default DNS not being set on network changes" 2013-07-24 00:32:34 +00:00
Chad Brubaker
45e721f586 Fix default DNS not being set on network changes
Change-Id: I3c45404cab34c77b20dadc1d8aee127aa08fd0bd
2013-07-23 17:13:36 -07:00
Geremy Condra
2b07accdee Merge "Fix supplimentary network connections with VPNs" 2013-07-23 17:58:33 +00:00
Geremy Condra
12e55c99af Merge "Support multiple Vpn ManageDialogs" 2013-07-23 17:55:45 +00:00
Guang Zhu
f466bf9e1d fix build
Change-Id: Ie4bd7c3fe9320d22b7da2962e5e5a4abca510bd2
2013-07-21 02:01:34 -07:00
The Android Open Source Project
b91b601f3e am 7d0a85e2: (-s ours) Reconcile with jb-mr2-zeroday-release - do not merge
* commit '7d0a85e2133fabd47f0f952f3f91dfcdd01f3881':
  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
78850f3081 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
00eb17fb05 resolved conflicts for merge of 64031ab2 to master
Change-Id: Ia9509ab6897e27da8bf4fc61a4140f2f93acb80f
2013-07-19 14:30:49 -07:00
The Android Open Source Project
7d0a85e213 Reconcile with jb-mr2-zeroday-release - do not merge
Change-Id: I1d7f0e0f6a4cb8b9363c99a830dc1656424ad49d
2013-07-19 14:20:43 -07:00
Robert Greenwalt
1bf31d7571 resolved conflicts for merge of 248d8d2c to master
Change-Id: Idd0ad9b1504fddf68c4c4cc04731de1eddd204b3
2013-07-19 14:09:30 -07:00
Wink Saville
48f0c5a396 am d7aeae15: am df43ba82: am e3badc10: Merge "When a SIM is changed check mobile provisioning." into jb-mr2-dev
* commit 'd7aeae15a1ae9e1fc23d14d107825a1ffef41e2c':
  When a SIM is changed check mobile provisioning.
2013-07-19 13:42:36 -07:00
Robert Greenwalt
64031ab2a3 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
248d8d2c69 am b5bf655c: am 1f905ded: 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
d7aeae15a1 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
feb4923c50 Merge "checkMobileProvisioning is not using sendNotification." 2013-07-19 17:14:41 +00:00
Wink Saville
b56c4fd054 checkMobileProvisioning is not using sendNotification.
Change-Id: Ie5b98b462b29fe9339fcb8207d2d33e3028a155c
2013-07-19 09:27:56 -07:00
Christopher Tate
53d68e16d8 Fix build & preserve DHCP scheduling as-is
Change-Id: I4063b18532c476280f343658bf3641495e526ed4
2013-07-18 18:23:57 -07:00
Robert Greenwalt
81b0274875 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
cbf3ebe8d6 Add gservices updater for carrier provisioning url
bug:9623159
Change-Id: I36697ed341353b7a3dbec5afe20241102e76f6f1
2013-07-18 11:24:56 -07:00
Robert Greenwalt
1f905dede5 Merge "Add gservices updater for carrier provisioning url" into jb-mr2-dev 2013-07-17 23:46:25 +00:00
Wink Saville
c6b52728f1 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
7ddc6c985d Add gservices updater for carrier provisioning url
bug:9623159
Change-Id: I36697ed341353b7a3dbec5afe20241102e76f6f1
2013-07-17 14:05:33 -07:00
Chad Brubaker
7dcfa2a06b 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
9564f2b34f 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
b24810e7f7 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
cd7b82033d Merge "Support routing sockets as another user" 2013-07-15 21:57:18 +00:00
Geremy Condra
c4f78f6100 Merge changes Ia6646363,I94389b64
* changes:
  Add per user VPN support
  Add NetworkUtil function for marking sockets
2013-07-15 21:56:30 +00:00
Chad Brubaker
31de0b69b0 Support routing sockets as another user
Add support for routing sockets as if they were another user's.
This is for services that handle delegated network tasks like MediaServer and DownloadManager.

Change-Id: Id20efc1f5c2cce6f8838d777762f6c0a703a9437
2013-07-15 12:14:10 -07:00
The Android Open Source Project
6fc25cfd15 am 9bd03ece: (-s ours) Reconcile with jb-mr2-zeroday-release - do not merge
* commit '9bd03ece3c5a5da0f101c7551666bd6752202611':
2013-07-15 09:37:54 -07:00
The Android Open Source Project
9bd03ece3c Reconcile with jb-mr2-zeroday-release - do not merge
Change-Id: Ib08f5c3c72f9d6eee571e7f9dff130abadffbbec
2013-07-15 09:32:49 -07:00