370 Commits

Author SHA1 Message Date
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
Robert Greenwalt
665e1aed5e Add BT - DataTracker connection
Allows the external BT stack the means to communicate with
ConnectivityService during reverse tethering.

bug:8445208
Change-Id: Ice7dfb0b50c9481d359aed14a51372878185171c
2013-03-27 15:45:12 -07:00
Lorenzo Colitti
4aa9bcf414 Reset connections on all stacked interfaces.
Bug: 8276725
Change-Id: I7fe99c6ea123037cef3e89e3c2c17ed43cc0b1ea
2013-03-20 19:22:58 +09:00
Lorenzo Colitti
952e4805f7 Merge "Framework changes for 464xlat." into jb-mr2-dev 2013-03-18 16:41:58 +00:00
Lorenzo Colitti
e78aa89647 Merge "Set routes from stacked links as well." into jb-mr2-dev 2013-03-15 17:14:43 +00:00
Lorenzo Colitti
13c9fdefde Framework changes for 464xlat.
1. Add a Nat464Xlat service that ConnectivityService can use
   to start and stop clat. When clat is started, the service
   waits for the clat interface to come up and then calls
   ConnectivityService to add the appropriate routes.
2. Make ConnectivityService start clat when an IPv6-only mobile
   interface is connected. We only support clat on mobile for
   now.
3. Make tethering use the interface that has the IPv4 default
   route insted of using the base interface of the
   LinkProperties. This allows us to tether to a stacked
   interface, which is needed for tethering with 464xlat.

Bug: 8276725
Change-Id: I24480af69ee280f504399062638af0836a56268e
2013-03-15 14:41:55 +09:00
Lorenzo Colitti
f83d90c667 Set routes from stacked links as well.
Currently, ConnectivityService adds and removes routes to/from
the routing table only based on the LinkProperties's routes.
Make it update routes based on the stacked links as well.

Bug: 8276725
Change-Id: I9a2adf537af5a04de0aaab3780afbcc3bb5c6acb
2013-03-15 14:35:38 +09:00
Wink Saville
7b5fd05d4e Revert "Fail fast if somebody is adding default routes"
This reverts commit 6f210bd0191e1936bbc1f036912c6efc4ea69475

Mako wouldn't boot for me, reverting for now.

Change-Id: Ie92d6bf77811e7257e86d65e1e15e1973c027cd7
2013-03-15 05:07:04 +00:00
Robert Greenwalt
6f210bd019 Fail fast if somebody is adding default routes
bug:2655011
Change-Id: I25da940e024825bc6e1d1ac5fe7b0d951609c1c1
2013-03-14 13:16:04 -07:00
Lorenzo Colitti
2adea7ff3b Remove redundant parameter to modifyRoute
modifyRoute takes both an interface name and a LinkProperties.
This is redundant because all callers get the interface name
from the LinkProperties. Make modifyRoute get the interface
name from the LinkProperties instead.

Change-Id: I41ba8e0a10241c2f1107204fcaca2be74556042b
2013-03-12 07:39:59 +09:00
Lorenzo Colitti
e167135976 Always specify an interface for host routes.
Change-Id: I05b4d87e7d7e8237c6f4a70f1fedae00f416f581
2013-03-08 16:41:25 -08:00
Jeff Sharkey
812085bc70 Allow loopback traffic in lockdown mode.
Bug: 8245184
Change-Id: If993e3d6f5c7ce5970bfe701074c85b9245aa2aa
2013-02-28 16:57:58 -08:00
Robert Greenwalt
e436e4f8a4 Remove two new permission checks
These checks while technically reasonable are a hard to swallow API change
that may break existing apps and pragmatically serves no purpose:  the protected
data is available in publicly readable java VM properties.

Change-Id: I522c493c2604a33e28d99e2be31054326c9a8323
2013-02-22 15:36:33 -08:00
Robert Greenwalt
5a6bdc46e2 Improve ConnectivityManager docs
Also fix some permission problems.
bug:5738328

Change-Id: Ib32c223f425b1fc03b8cce528456bcb50b540fdf
2013-02-22 10:39:20 -08:00
Jeff Sharkey
3671b1e910 Migrate to using Mockito directly.
Change-Id: I1fcc5d1a780f5831bd6685f0735d4c0c6d245735
2013-02-19 15:28:19 -08:00
Kenny Root
0786207be5 am dc7b3e3b: am 9657ba0e: Merge "KeyStore: stop using state()"
# Via Android Git Automerger (1) and others
* commit 'dc7b3e3b6e1aa3f347c7d843ee453688c4d90e29':
  KeyStore: stop using state()
2013-02-14 12:50:34 -08:00
Kenny Root
b9594ce9eb KeyStore: stop using state()
Change-Id: I721974fd95f8d1ab06a3fd1bbb4c9b4d9d1d7752
2013-02-14 12:06:51 -08:00
Robert Greenwalt
9055ae3697 Fix a permissions probem in ConnectivityManager
stopUsingNetworkFeature fails because of new permissions checks in netd.

Change-Id: I04cb10d955c9dd9977c460c6c1db0d1910a863ce
2013-02-12 17:18:25 -08:00
Robert Greenwalt
0dd19a8394 Reintroduce the net.dns system properties <TEMP>
Removing these properties broke video playback as they used
a custom dns resolver.  We'll work together to resolve our
resolver issues in the future, but this was the easy fix to
get things working again.

bug:8173236
Change-Id: I687dae59eda4fc449efc34eed11c3dc88a110ad0
2013-02-11 15:25:10 -08:00
Robert Greenwalt
034170cd4c Merge "Second pass tying into dns cache per interface" 2013-02-07 19:02:47 +00:00
Mattias Falk
8b47b3601f Second pass tying into dns cache per interface
Set dns servers for secondary nets and attach the
processes (pids) that are using the secondary nets
to the secondary nets associated dns cache.

bug:5465296
Change-Id: I1eaf92d5c6b81d287e9fb2763b3d972d9de34395
2013-02-06 17:43:28 -08:00
Wink Saville
75d880dfb0 Merge "Revert "Clean up published network condition reporting."" 2013-01-31 00:32:36 +00:00
Wink Saville
5b7573e835 Revert "Clean up published network condition reporting."
In some cases causes grey ICON's.

This reverts commit 82413d0b2acad73b9a008e0c53392a54f9555cf8

Change-Id: I09f893d03651c3fb9fcb88ee9e5ac7ce6cb6e273
2013-01-31 00:30:13 +00:00
Robert Greenwalt
20da885caa Merge "Revert "Second pass tying into dns cache per interface"" 2013-01-19 00:36:12 +00:00
Robert Greenwalt
63837f455d Revert "Second pass tying into dns cache per interface"
This reverts commit f60f94a89e49c125f4aff6496710a0fb66579545

Change-Id: If52dffd5100a6b03275da0eabfa05e24c5ecada9
2013-01-19 00:34:07 +00:00
Wink Saville
82413d0b2a Clean up published network condition reporting.
Change-Id: I371c04bcb0547f1133e7ce12a6871aad3b3fdc6b
2013-01-18 09:31:13 -08:00
Mattias Falk
f60f94a89e Second pass tying into dns cache per interface
Set dns servers for secondary nets and attach the
processes (pids) that are using the secondary nets
to the secondary nets associated dns cache.

Change-Id: Id865c2c3fdc0ec1c3e30c134e9ea4109f4f2fbeb
bug:5465296
2013-01-11 15:47:08 -08:00
Jean-Baptiste Queru
12174a1c62 am 48576911: Merge from AOSP staging branch
* commit '48576911a2de25c46ecfbecdf7dcb373b70be3a5':
  Return error upon attempt to use non-existent APN
  Memory leak due to bad destroy sequence
2012-12-18 15:52:45 -08:00
Jean-Baptiste Queru
48576911a2 Merge from AOSP staging branch
Change-Id: Iad3df4845e6fae16c4ae6dbddcad0121d4775dcd
2012-12-18 15:14:12 -08:00
Mikael Hedegren
342a7cb69f Return error upon attempt to use non-existent APN
startUsingNetworkFeature will ignore errors from
reconnect - causing ConnectivityService to send
faulty information back to requester.

Change-Id: I4e0fcc1addd84da409cdc1eed1a95d25d925e020
2012-12-18 15:32:48 +01:00
Jianzheng Zhou
dcf03f3972 Refactor getPersistedNetworkPreference
Optimize for updating mNetworkPreference according to device's networkAttributes
setting from overlay config.xml when connectivityservice start.

Change-Id: I90286332d4f453038f1ddac7dd9d1265d96b4859
Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
2012-12-06 12:00:04 -08:00
Robert Greenwalt
60bfacd8ef Merge "Support for dns domain." 2012-11-16 12:56:56 -08:00
Robert Greenwalt
8058f62189 Support for dns domain.
bug:6799630
Change-Id: I10070eddb65b7b60f0bc2b3e1e320e1aa4ec6e98
2012-11-16 11:25:32 -08:00
Jeff Sharkey
2528b50b91 Increase readability of connectivity event log.
Bug: 6322766
Change-Id: I556759f5fc1466cdd4db6b4574084a8068dc9909
2012-11-09 15:57:02 -08:00
Dianne Hackborn
7ff30113de Remove extraneous logs.
Change-Id: I4c47d36748de91bd6fddc419afbf59552bf63e9a
2012-11-08 13:13:48 -08:00
Jeff Sharkey
625239a054 Migrate more Secure settings to Global.
Migrate networking, storage, battery, DropBox, and PackageManager
related Secure settings to Global table.

Bug: 7232014, 7231331, 7231198
Change-Id: I772c2a9586a2f708c9db95622477f235064b8f4d
2012-09-27 16:22:53 -07:00
Jeff Sharkey
bdfce2ec05 First step towards cleaning up Global settings.
Remove all @Deprecated @hide settings, and clean up any stragglers.

Bug: 7232125
Change-Id: Ibf67093c728d4a28565129b923edb1701d3b2789
2012-09-26 17:18:49 -07:00
Jeff Brown
bf6f6f9de7 Update references to migrated global settings.
Fixed one setting that was migrated but not marked deprecated.

Removed a hidden setting that is no longer used by the new
power manager service.

Bug: 7231172
Change-Id: I332f020f876a18d519a1a20598a172f1c98036f7
2012-09-25 15:27:51 -07:00
Irfan Sheriff
9538bdd3c7 Captive check for both mobile and wifi
Bug: 7113195
Bug: 7102238
Bug: 7087564

Change-Id: Iac08db9de3935338ad498aa3983d2ca82057dda1
2012-09-20 12:13:06 -07:00
Jeff Sharkey
e6e6197d7c Actually move to Global settings.
Also add better ConnectivityService logging.

Bug: 7157464
Change-Id: Ia235a7e62ed809240913c4782920c1410c7d597d
2012-09-14 13:47:51 -07:00
Jeff Sharkey
f56e2435b6 Restrict lockdown and firewall to AID_SYSTEM.
Bug: 7076289
Change-Id: Iafa3054335e8b1c3c8c3b8db2a4191d4ed4c8c41
2012-09-06 17:59:14 -07:00