Commit Graph

1549 Commits

Author SHA1 Message Date
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
Paul Jensen
d0464edc38 Make a network the default when it connects if we have no default.
When a network comes online, is a candidate for being the default network
(i.e. satisfies default NetworkRequest), and the device has no default
network, then make the new network the default network for the purposes
of routing network traffic.  This does not affect NetworkRequests or
NetworkCallbacks.  This ignores but does not affect network validation.

Benefits:
1. Offers a fail-safe in case network validation returns a false negative.
   For example:  It would be nice if every Android device didn't fail when
   clients3.google.com/generate_204 went down.
2. Offers a method to debug connectivity issues.
   For example:  If WiFi is failing, disabling Cellular would rule out
   interference from WiFi network validation.
3. Reduces delay between no connectivity and any connectivity.
4. Offers a fail-safe in cases of unreliable networks.
   For example: You need rescuing from a remote location with a weak signal
   offering 90% packet loss.  You just want your distress call to go out
   but are infuriated to find network validation blocks connectivity.

Change-Id: I78621a1fe8ed2a336591f65bf7b07a6cbcc7ba5e
2014-07-16 16:12:16 -07:00
The Android Automerger
3024153a2b merge in master-release history after reset to 4f3254b159f2d2d4fde5670a380d1aa4c2d4a0cd 2014-07-16 05:50:28 -07:00
Paul Jensen
26dd002a22 Fix hiding of sign-in to network notification.
Don't rely on the NetworkAgent still being connected when we go to
hide the notification.  The notification is hidden when the
NetworkAgent is disconnected so that wasn't a safe assumption.
By using the NetID as the notification identifier we also fix the
issue of multiple notifications of the same network type inadvertently
hiding the incorrect notification with the same network type.

bug:16317917
Change-Id: I01fdc466a0f430af9fc378445586ec7b83b3ac83
2014-07-15 19:06:39 +00:00
The Android Automerger
da0530e522 merge in master-release history after reset to 8ce5c32a37db3c6c5182047053ee0651fc93eff2 2014-07-12 05:50:55 -07:00
Sreeram Ramachandran
b5ae69d410 Remove unnecessary code and APIs.
This stuff has been replaced by setNetworkForUser() in NetdClient.

Change-Id: If525ee259b74314191d1913f7c2a3e828e05c38f
2014-07-11 18:16:04 -07:00
Aaron Whyte
487d7d6519 resolved conflicts for merge of a1a0a98d to master
Change-Id: I8ec28728c12d7cc3ce2c4f3d09d9ce6162504618
2014-07-11 13:34:41 -07:00