Commit Graph

1555 Commits

Author SHA1 Message Date
The Android Automerger
c865be34be merge in master-release history after reset to 5cf541805d4187ba3d84378a02dbec2dc3ba6907 2014-08-14 06:04:12 -07:00
The Android Automerger
170bffdc60 merge in master-release history after reset to e4a8309101d09bfc72e76ff7fbf88c4cff283e0e 2014-08-13 05:53:24 -07:00
Lorenzo Colitti
435565dd96 Switch RouteInfo to use IpPrefix instead of LinkAddress.
This addresses a TODO and also makes it possible to create
routes to destinations that are not valid LinkAddresses, such as
multicast addresses.

Bug: 16875580
Change-Id: Id4c77b00dc3064bf27d78cdcbbe035e645748cfe
2014-08-13 21:17:20 +09:00
Robert Greenwalt
59dca37d82 Remove extraneous clearing of inet condition
This was old code I missed in previous inet condition refactor
and caused us to show "not connect" icon any time we connected
to a secondary network (mms/supl/etc).

bug:16896743
Change-Id: I0fa62e09bb0b7c0ee0864bb1f95967eac5f60d3e
2014-08-12 14:51:48 -07:00
The Android Automerger
febcdbb8a3 merge in master-release history after reset to 82e25bb6e6d0e14bb0ce2d7d7319719a5c21aa85 2014-08-12 05:52:24 -07:00
Jeff Sharkey
0aef9341d3 Hack and ship: NetworkStats edition.
Some devices use clatd for catching raw IPv4 traffic when running on
a pure-IPv6 carrier network.  In those situations, the per-UID
stats are accounted against the clat iface, so framework users need
to combine both the "base" and "stacked" iface usage together.

This also means that policy rules (like restricting background data
or battery saver) need to apply to the stacked ifaces.

Finally, we need to massage stats data slightly:

-- Currently xt_qtaguid double-counts the clatd traffic *leaving*
the device; both against the original UID on the clat iface, and
against UID 0 on the final egress interface.

-- All clatd traffic *arriving* at the device is missing the extra
IPv6 packet header overhead when accounted against the final UID.

Bug: 12249687, 15459248, 16296564
Change-Id: I0ee59d96831f52782de7a980e4cce9b061902fff
2014-08-11 18:40:23 -07:00
The Android Automerger
0f28ec47dc merge in master-release history after reset to aafbe51719f92042ad95f6de617c1fe658c9405a 2014-08-10 05:50:42 -07:00
Robert Greenwalt
a1d68e73b9 First pass of changing statusbar connectedness
Switching from GCM-only inet condition reports to using our network
validation (captive portal check).

Note that currently the GCM signal is disconnected.  Next step is to
make the bad-network report API trigger a re-evaluation of the network
and get negative reports from the NetworkMonitor.

Change-Id: Ie2ebab1e5c04775e3c4d6738f656a6c8157dba76
2014-08-07 22:31:05 +00:00
The Android Automerger
0681ab07f5 merge in master-release history after reset to e81eae72bf2c5fc3e57669eddf3c6b51288510cd 2014-08-07 05:50:47 -07:00
Paul Jensen
74940206ed Stop ConnectivityService from talking to netd about uncreated networks.
This avoids logged netd errors that are red-herrings.

bug:16667349
Change-Id: I5d6f1681f1d38dab0af4c535573a0c45c0216603
2014-08-07 02:44:51 +00:00
Paul Jensen
9524ff39e3 Merge "Flush DNS cache when routes change." into lmp-dev 2014-08-06 21:46:55 +00:00
Paul Jensen
e0fd4a850b Flush DNS cache when routes change.
We used to do this but the change got lost in the NetworkAgent
upgrade.  This brings it back.  ConnectivityService has netd do
the actual flushing.

bug:16549455
Change-Id: I11ddd55fcb9d1ed1d2c6a9be7eb8c57e41bdbdb8
2014-08-06 22:39:40 -04:00
Paul Jensen
87d4c79ccf Remove dead CaptivePortalTracker.
Captive portals are now detected by the NetworkMonitor.

Change-Id: Ibfb04bf83b1028231397a577468f110d7ab1dc06
2014-08-07 02:32:54 +00:00
The Android Automerger
d6fc2c38a4 merge in master-release history after reset to 0e66fa8e86a8f6f5cf8b701877f41b57469fcdaa 2014-08-02 05:50:27 -07:00
Robert Greenwalt
774a27f26c Add Logging around getNetworkInfo.
bug:16610051
Change-Id: I04f19efc99bce6d990364291b6cd8105f08ab263
2014-08-02 00:15:41 +00:00
Lorenzo Colitti
cfb3657167 Improve LegacyTypeTracker.
Keep track of requests as well as of networks that come and go.
This is necessary, for example, to ensure that we pretend that
HIPRI has gone down when the HIPRI request goes away, even
though the underlying cell network is actually completely
unaffected.

Also, ensure that when switching default networks we send
disconnect broadcasts (and do so *before* connect broadcasts, to
maintain the illusion).

Bug: 16610051
Change-Id: Ib3c831387124940156df05b312cc36bc0724373e
2014-08-01 23:52:04 +00:00
The Android Automerger
37923f4218 merge in master-release history after reset to 98b779f10390ec2b26a4ad20d66933cce7078c8f 2014-07-31 05:50:36 -07:00
Lorenzo Colitti
8d20c50093 Allow using third-party HTTP/... stacks for per-network URLs.
Also switch to double-checked locking for
mNetworkBoundSocketFactory and OkHttpClient.

Change-Id: Ic52776ee760036ad5623b7496156b8909dc282fa
2014-07-31 02:17:28 +00:00
Lorenzo Colitti
54a8d4c170 Use a new socket for each of the host's IP addresses.
If Socket.connect() times out, the socket cannot be used any
more - any attempt to do so fails with EBADF. Use a new
socket for each IP address.

Bug: 16664129
Change-Id: If3616df86f7c2da0eabd30dca5db65d0da85cb17
2014-07-30 17:31:04 +00:00
Robert Greenwalt
160638d7e4 Remove dead code 4.
Removing:
handleDnsConfigurationChange
updateDnsLocked
updateRoutes
handleConnectivityChange
handleConnect
handleDisconnect

Adding a missing flushVmDnsCache and setting of mActiveDefaultNetwork

Change-Id: I681fc72c317833ea1deb42db0b43d2adb21baeff
2014-07-29 16:32:08 +00:00
The Android Automerger
545049ce2a merge in master-release history after reset to a11b4e52284a0ac7580fc32693b474f20542e30f 2014-07-29 07:27:35 -07:00
The Android Automerger
e94fa1a503 merge in master-release history after reset to a11b4e52284a0ac7580fc32693b474f20542e30f 2014-07-29 07:10:06 -07:00
The Android Automerger
149b8dcdfb merge in master-release history after reset to a11b4e52284a0ac7580fc32693b474f20542e30f 2014-07-29 06:58:58 -07:00
The Android Automerger
7df6b4ddfe merge in master-release history after reset to a11b4e52284a0ac7580fc32693b474f20542e30f 2014-07-29 06:52:18 -07:00
The Android Automerger
227a4c1dcd merge in master-release history after reset to a11b4e52284a0ac7580fc32693b474f20542e30f 2014-07-29 06:34:15 -07:00
The Android Automerger
e3d13b3483 merge in master-release history after reset to a11b4e52284a0ac7580fc32693b474f20542e30f 2014-07-29 06:24:01 -07:00
The Android Automerger
7e36276d74 merge in master-release history after reset to a11b4e52284a0ac7580fc32693b474f20542e30f 2014-07-29 05:50:26 -07:00
Robert Greenwalt
b2fc774964 Remove dead code 3.
Removing mNetRequestersPids and mPriorityList.

Change-Id: I8295040436b62f7f6495ece7154246fb719288a4
2014-07-29 00:36:38 +00:00
Sreeram Ramachandran
e458632059 Allow VPNs to add/remove link addresses dynamically.
Bug: 15409819
Change-Id: If91fc6891d7ce04060362c6cde8c57462394c4e8
2014-07-29 00:32:59 +00:00
Robert Greenwalt
00c1c93a3e Remove dead code 2.
Removing ConnectivityService.NetworkFactory.  This requires disabling
the ConnectivityServiceTest, but that's been broken since we stopped
using NetworkStateTrackers anyway.

Change-Id: I9b86bd37eb9d018c40f60dca5b00d62c36d4e3ad
2014-07-28 14:48:52 -07:00
The Android Automerger
bfa8549dfe merge in master-release history after reset to 4183c452bd60ea62cdb019d9db71ee6b4d059b3f 2014-07-28 05:50:10 -07:00
Robert Greenwalt
dbd260b50a Move Alarm setup to systemReady.
Don't register alarms before the system is ready.

bug:16484913
Change-Id: Iae5c75ff8d40d4d39dbb23ff65a600b4a00cd1f0
2014-07-27 12:30:51 -07:00
The Android Automerger
699aacfc10 merge in master-release history after reset to 5410d2c20a67f74cfd1c2054db575c658b91b2e4 2014-07-27 05:49:57 -07:00
The Android Automerger
9f17c9123b merge in master-release history after reset to 5410d2c20a67f74cfd1c2054db575c658b91b2e4 2014-07-26 05:50:58 -07:00
Sreeram Ramachandran
3518e37286 Implement support for bypassable VPNs.
Bypassable VPNs grab all traffic by default (just like secure VPNs), but:
+ They allow all apps to choose other networks using the multinetwork APIs.
  If these other networks are insecure ("untrusted"), they will enforce that the
  app holds the necessary permissions, such as CHANGE_NETWORK_STATE.
+ They support consistent routing. If an app has an existing connection over
  some other network when the bypassable VPN comes up, it's not interrupted.

Bug: 15347374
Change-Id: Iaee9c6f6fa8103215738570d2b65d3fcf10343f3
2014-07-25 15:17:23 -07:00
Robert Greenwalt
abbc41e859 Fix DUN-based tethering.
It was calling into dead ConnectivityService code rather than using
the new ConnectivityManager shim code.

bug:15221541
Change-Id: I1e3eea8a658a162ce36673ed1cf7b1e7e4372c42
2014-07-24 14:39:51 -07:00
Robert Greenwalt
73b0009b50 Merge "Remove dead code 1." into lmp-dev 2014-07-24 20:48:02 +00:00
Sreeram Ramachandran
6ba91ae8a0 Prohibit address families by default unless a VPN explicitly allows them.
Bug: 15972465
Change-Id: I3278d94536fefacc86390c1ba4231680f7be8589
2014-07-28 18:52:41 +00:00
Robert Greenwalt
c36a74f2a6 Remove dead code 1.
Starting with startUsingNetworkFeature and stop.
Figure it's easier to code review incremental changes.

Change-Id: I19aee65e740858c3a9a2a1a785663f6fee094334
2014-07-28 11:34:36 -07:00
Lorenzo Colitti
b9ab4282cf Add a getBoundURL method that returns a network-specific URL.
Change-Id: I4b57e675bb87064ab75dcc36b00fdc7a2987b86e
2014-07-28 16:16:58 +00:00
Lorenzo Colitti
f6ef1ebcfc Merge "Add logging of Legacy Type info." into lmp-dev 2014-07-24 16:04:26 +00:00
Dan Sandler
3d2c4da534 Fix docs build.
Change-Id: I3be4c5b74e85d2491316986d8c3c0575cd01a8fc
2014-07-31 02:27:52 -04:00
Robert Greenwalt
94e22143de Add logging of Legacy Type info.
There are some bugs where getActiveNetworkInfo gives bad data (seemingly)
and this will give the backing data in logs.

bug:16610051
Change-Id: Iad867485ad78daeb3e88665dcd0fdb0af756a3bf
2014-07-30 16:31:24 -07:00
Robert Greenwalt
50eb5e72ea Reenable logging.
ConnectivityService has been rewritten for L and is in a stabilizing period.
We need the logging to track down bugs people report.
Restoring to Pre-L conditions.

If there's excess logging please report it - it probably indicates a bug.

Change-Id: I7baf891e3bf12e1545afeb92b8d5af0b01e12a7b
2014-07-23 12:42:47 -07:00
Ye Wen
ca7ababe8b Infer legacy network type for ConnectivityManager.requestNetwork
ConnectivityManager.requestNetwork pass TYPE_NONE to
sendRequestForNetwork which prevents it from being used with legacy API
requestRouteToHostAddress. This CL infers the legacy network type
automatically from the network capabilities.

b/16324360

Change-Id: I591d38f875f42f56e8cfc157db2069c9eee0ee26
2014-07-23 11:41:17 -07:00
The Android Automerger
a7b0964b32 merge in master-release history after reset to 7da98bf0cf91e27ff3732d26a677dd91f4d374cf 2014-07-23 05:50:27 -07:00
Sreeram Ramachandran
c06ec73149 Cleanup: Delete dead code.
Bug: 15413389
Change-Id: I315468832ef18ffc84174e54774ab63b86d284dc
2014-07-22 15:46:34 -07:00
Yao Chen
32cfa6eaf5 Updated media browsing API & tests.
Change-Id: I3a1e3eead99a98b1890e05843dd90203cee517b7
2014-07-21 21:14:43 -07:00
The Android Automerger
2cdadb58e6 merge in master-release history after reset to e6fab43592b71d2914858054d3732783d1c3ec07 2014-07-21 05:50:18 -07:00
The Android Automerger
a5c7ef99c5 merge in master-release history after reset to 1f7b4ba7adc74cb9857ead2d69c4d08f1c0cd056 2014-07-19 05:50:53 -07:00