410 Commits

Author SHA1 Message Date
Wink Saville
89d16f7597 am 9b7b4450: am 02eab434: am 4d87d91d: Merge "If in a mobile captive portal is detected enable fail fast." into jb-mr2-dev
* commit '9b7b4450185e723dc7021f7e8bae4a12d4dd5606':
  If in a mobile captive portal is detected enable fail fast.
2013-08-08 17:10:34 -07:00
Wink Saville
292a92e337 am 7c00be48: am 55adb390: am 35152f13: Merge "Have CaptivePortalTracker use gservices updateable provisioning urls." into jb-mr2-dev
* commit '7c00be48fcb1986db14915beef549e925b5670d2':
  Have CaptivePortalTracker use gservices updateable provisioning urls.
2013-08-08 17:10:32 -07:00
Wink Saville
280f6218a5 am 81b1fa6f: am 9b6363e5: am cbad1243: Merge "Check that hipri has started." into jb-mr2-dev
* commit '81b1fa6fc62190d64a6b76b4a5ee7cc2bf3172ac':
  Check that hipri has started.
2013-08-08 16:22:14 -07:00
Wink Saville
4d87d91dfe 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
35152f13b3 Merge "Have CaptivePortalTracker use gservices updateable provisioning urls." into jb-mr2-dev 2013-08-08 22:06:21 +00:00
Jason Monk
602b232a06 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
d747cbc898 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
7f6ee2ec90 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
Wink Saville
42d4f08db2 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
Lorenzo Colitti
e1cd293151 Merge "Add accessors for all addresses and clarify compare* methods" 2013-08-01 06:44:29 +00:00
Wink Saville
1aef7fc81a Fix excessive log spew.
Bug: 10115060
Change-Id: I61fd83071da1224f38757b8d90f58c8d6c41d36b
2013-07-31 15:49:04 -07:00
Lorenzo Colitti
d1e0fae2bc 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
Wink Saville
5e56bc5437 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
350d274746 Merge "Remove unused mDnsOverridden" 2013-07-26 17:48:54 +00:00
Chad Brubaker
b98703e9c0 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
46a7b0d1aa Merge "Fix default DNS not being set on network changes" 2013-07-24 00:32:34 +00:00
Chad Brubaker
20a7e881da Fix default DNS not being set on network changes
Change-Id: I3c45404cab34c77b20dadc1d8aee127aa08fd0bd
2013-07-23 17:13:36 -07:00
Geremy Condra
5830e07521 Merge "Fix supplimentary network connections with VPNs" 2013-07-23 17:58:33 +00:00
Geremy Condra
1b6868cc4b Merge "Support multiple Vpn ManageDialogs" 2013-07-23 17:55:45 +00:00
Chad Brubaker
f336d722c7 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
bfc7634b36 resolved conflicts for merge of f9774dc7 to master
Change-Id: Ia9509ab6897e27da8bf4fc61a4140f2f93acb80f
2013-07-19 14:30:49 -07:00
Robert Greenwalt
538cdb98ef resolved conflicts for merge of 85b5e4c4 to master
Change-Id: Idd0ad9b1504fddf68c4c4cc04731de1eddd204b3
2013-07-19 14:09:30 -07:00
Wink Saville
0871ac2afb am b96cca27: am df43ba82: am e3badc10: Merge "When a SIM is changed check mobile provisioning." into jb-mr2-dev
* commit 'b96cca27ba15121aab2c481786a292880c007bb6':
  When a SIM is changed check mobile provisioning.
2013-07-19 13:42:36 -07:00
Wink Saville
c2fee24f76 checkMobileProvisioning is not using sendNotification.
Change-Id: Ie5b98b462b29fe9339fcb8207d2d33e3028a155c
2013-07-19 09:27:56 -07:00
Robert Greenwalt
c13368bfd1 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
e874bd351f Merge "Add gservices updater for carrier provisioning url" into jb-mr2-dev 2013-07-17 23:46:25 +00:00
Robert Greenwalt
e182bfe398 Add gservices updater for carrier provisioning url
bug:9623159
Change-Id: I36697ed341353b7a3dbec5afe20241102e76f6f1
2013-07-17 14:05:33 -07:00
Chad Brubaker
bf6ff2c025 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
fde1ac9bec 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
d475c70424 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
Chad Brubaker
4ca19e8377 Add per user VPN support
VPNs are now per user instead of global. A VPN set by user A routes only
user A's traffic and no other user can access it.

Change-Id: Ia66463637b6bd088b05768076a1db897fe95c46c
2013-07-12 20:51:03 -07:00
Wink Saville
7ab34954c8 am 97b077bc: am 42a85412: am 925ec03f: Merge "VZW wants the phoneNumber to be 10 zero\'s if there isn\'t one." into jb-mr2-dev
* commit '97b077bc18752e7dafe041cb04c19e67ce69939c':
  VZW wants the phoneNumber to be 10 zero's if there isn't one.
2013-07-12 12:14:01 -07:00
Wink Saville
8cf3560469 VZW wants the phoneNumber to be 10 zero's if there isn't one.
Bug: 9784059
Change-Id: I41bba908855648d2560440655d8a75a7cb2e0859
2013-07-10 23:00:07 -07:00
Wink Saville
e969964c80 am c880ae16: am db011499: am 753d754c: Merge "Fix NPE if mobile is not supported in checkMobileProvisioning." into jb-mr2-dev
* commit 'c880ae16528aa90853952397b8e4d4a299d29c28':
  Fix  NPE if mobile is not supported in checkMobileProvisioning.
2013-07-02 12:41:31 -07:00
Wink Saville
68e6c6452c Fix NPE if mobile is not supported in checkMobileProvisioning.
Bug: 9664438
Change-Id: If0c4938956a80e8d6a21a968aa771d0d8f546b3c
2013-07-02 10:55:14 -07:00
Wink Saville
9f6a7f424f Merge commit '3b5d686e' into fix-merge-conflict
* commit '3b5d686e':
  Add checkMobileProvisioning to ConnectivityService.

Conflicts:
	services/java/com/android/server/ConnectivityService.java

Change-Id: Ieceb9c8f4aa4fa99258e56a720b4c74512369458
2013-07-01 16:12:31 -07:00
Wink Saville
ab9321d13d Add checkMobileProvisioning to ConnectivityService.
Bug: 9279964
Change-Id: I42c326a21e05aa301e9d974ed9ac1d59472780ec
2013-06-29 21:10:57 -07:00
John Spurlock
bf991a8f42 Move battery stats call from SystemUI to system server.
The UPDATE_DEVICE_STATS permission is no longer required in sysui.

Change-Id: Icc3120b7873563e3727e56bed9f3b4767da0606d
2013-06-25 10:21:11 -04:00
Andreas Huber
7b8e1ea139 Fix parsing of global:http_proxy value.
This caused a runtime restart for ':' and did not disable the proxy for ""
before.

Change-Id: Ib88b21e9eba5818a4968ae604abad8a3b3d1766f
2013-05-28 15:17:37 -07:00
Robert Greenwalt
80eb63b58b Use the old interface when resetting connections
The new one is often null when disconnected, so using the new fails.
In other situations, it's the connections on the old network we want
to reset anyway, so the old code when it would work would also do
the wrong thing (unless new iface == old iface).

bug:9112928
Change-Id: I1fcae89cc3aa9d712e516e7c97cece0b89869bd9
2013-05-23 18:33:06 -07:00
Wink Saville
e148a49d92 Merge "Support WiFi only device at runtime." into jb-mr2-dev 2013-04-24 15:44:08 +00:00
Wink Saville
51f456f553 Support WiFi only device at runtime.
To date WiFi only devices were defined by the list of networkAttributes
in config.xml overriden in on a per-device basis. This change is the
simplest change needed to determine this at runtime and therefore allowing
a single build to support the two different configurations.

Bug: 8562845
Change-Id: I34de5c6accc718b199c13815537de1debfe3dc91
2013-04-23 14:26:51 -07:00
Robert Greenwalt
1b0ca9dace Listen for network disconnect.
VPN used to just watch the interface, but that is insufficient.  There
is no promise that the interface will go down when we're done with it.
Now that wifi stays on in scan-only mode despite user turning it off
it seems that the interface is left up, even in AP mode.

Now listening for ConnectivityService broadcast that the network we were on
has disconnected and tearing down the VPN then or when the interface
goes away.

bug:8550083
Change-Id: Icf414497bc55bead69de04e91f39f90ac2e6578a
2013-04-22 14:13:51 -07:00
Robert Greenwalt
ca441ee2f0 Add new route.hasGateway() api
Fixes issues brought in by change to isHostRoute.  isHostRoute
was technically correct, but the callers really wanted hasNextHop
behavior.

bug:8597268
Change-Id: I360761ccfa98b2ba34642f717a78fa71ec1bae4f
2013-04-12 11:22:52 -07:00
Robert Greenwalt
b7e6a4433b Merge "Routing workaround." into jb-mr2-dev 2013-04-11 23:27:20 +00:00
Robert Greenwalt
a9bebc2211 Use CONNECTIVITY_INTERNAL for global proxy
The Global http proxy shouldn't be used by apps, but can be useful in certain
conditions.

bug:8264794
bug:8557674
Change-Id: Ia3cbe542e448d9e74d0492626a13e9fd34ad797a
2013-04-10 15:32:18 -07:00
Robert Greenwalt
979ee3cca3 Routing workaround.
Change our order of operations so that secondary route table
adds succeed.  Working to understand the why of this too.
bug:8361314

Change-Id: Ie25061eb38c62eaa5e60aa8a488496de49bdbd9d
2013-04-09 11:22:56 -07:00
Robert Greenwalt
00e8d4c1b6 Turn back on global proxy support.
This reverts 138626.

Bug:8557674
Change-Id: I7b117d313c424d75bdeeea507541a96342f256f0
2013-04-08 16:31:26 -07:00
Lorenzo Colitti
2fb669e68f Merge "Stop clat if it's no longer in use." into jb-mr2-dev 2013-03-29 01:17:45 +00:00
Lorenzo Colitti
d2ef1e50c4 Stop clat if it's no longer in use.
Normally, clatd is stopped when a connection disconnects.
However, if the connection's LinkProperties change, or if the
disconnect somehow gets lost (e.g., because of bug 8486114),
then we need to stop it (and possibly restart it).

Bug: 8276725
Change-Id: Ib8ad0d653ed8d0cd70b7414bcaa8fdaef8ba5fcc
2013-03-28 14:45:36 +09:00