Commit graph

1,497 commits

Message SHA1
Merge "Flush DNS cache when routes change." into lmp-dev
Paul Jensen   authored and   Android (Google) Code Review   commited 2014-08-06 21:46:55 +00:00
9524ff39e3
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

Paul Jensen   commited 2014-08-06 22:39:40 -04:00
e0fd4a850b
Remove dead CaptivePortalTracker.
Captive portals are now detected by the NetworkMonitor.

Change-Id: Ibfb04bf83b1028231397a577468f110d7ab1dc06

Paul Jensen   commited 2014-08-07 02:32:54 +00:00
87d4c79ccf
Add Logging around getNetworkInfo.
bug:16610051
Change-Id: I04f19efc99bce6d990364291b6cd8105f08ab263

Robert Greenwalt   commited 2014-08-02 00:15:41 +00:00
774a27f26c
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

Lorenzo Colitti   authored and   Robert Greenwalt   commited 2014-08-01 23:52:04 +00:00
cfb3657167
Merge "Add logging of Legacy Type info." into lmp-dev
Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2014-07-24 16:04:26 +00:00
f6ef1ebcfc
Fix docs build.
Change-Id: I3be4c5b74e85d2491316986d8c3c0575cd01a8fc

Dan Sandler   commited 2014-07-31 02:27:52 -04:00
3d2c4da534
Allow using third-party HTTP/... stacks for per-network URLs.
Also switch to double-checked locking for
mNetworkBoundSocketFactory and OkHttpClient.

Change-Id: Ic52776ee760036ad5623b7496156b8909dc282fa

Lorenzo Colitti   commited 2014-07-31 02:17:28 +00:00
8d20c50093
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

Robert Greenwalt   commited 2014-07-30 16:31:24 -07:00
94e22143de
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

Lorenzo Colitti   authored and   Paul Jensen   commited 2014-07-30 17:31:04 +00:00
54a8d4c170
Remove dead code 4.
Removing:
handleDnsConfigurationChange
updateDnsLocked
updateRoutes
handleConnectivityChange
handleConnect
handleDisconnect

Adding a missing flushVmDnsCache and setting of mActiveDefaultNetwork

Change-Id: I681fc72c317833ea1deb42db0b43d2adb21baeff

Robert Greenwalt   commited 2014-07-29 16:32:08 +00:00
160638d7e4
Remove dead code 3.
Removing mNetRequestersPids and mPriorityList.

Change-Id: I8295040436b62f7f6495ece7154246fb719288a4

Robert Greenwalt   commited 2014-07-29 00:36:38 +00:00
b2fc774964
Allow VPNs to add/remove link addresses dynamically.
Bug: 15409819
Change-Id: If91fc6891d7ce04060362c6cde8c57462394c4e8

Sreeram Ramachandran   commited 2014-07-29 00:32:59 +00:00
e458632059
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

Robert Greenwalt   commited 2014-07-28 14:48:52 -07:00
00c1c93a3e
Merge "Remove dead code 1." into lmp-dev
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2014-07-24 20:48:02 +00:00
73b0009b50
Prohibit address families by default unless a VPN explicitly allows them.
Bug: 15972465
Change-Id: I3278d94536fefacc86390c1ba4231680f7be8589

Sreeram Ramachandran   commited 2014-07-28 18:52:41 +00:00
6ba91ae8a0
Remove dead code 1.
Starting with startUsingNetworkFeature and stop.
Figure it's easier to code review incremental changes.

Change-Id: I19aee65e740858c3a9a2a1a785663f6fee094334

Robert Greenwalt   commited 2014-07-28 11:34:36 -07:00
c36a74f2a6
Add a getBoundURL method that returns a network-specific URL.
Change-Id: I4b57e675bb87064ab75dcc36b00fdc7a2987b86e

Lorenzo Colitti   commited 2014-07-28 16:16:58 +00:00
b9ab4282cf
Move Alarm setup to systemReady.
Don't register alarms before the system is ready.

bug:16484913
Change-Id: Iae5c75ff8d40d4d39dbb23ff65a600b4a00cd1f0

Robert Greenwalt   commited 2014-07-27 12:30:51 -07:00
dbd260b50a
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

Sreeram Ramachandran   commited 2014-07-25 15:17:23 -07:00
3518e37286
Fix DUN-based tethering.
It was calling into dead ConnectivityService code rather than using
the new ConnectivityManager shim code.

bug:15221541
Change-Id: I1e3eea8a658a162ce36673ed1cf7b1e7e4372c42

Robert Greenwalt   commited 2014-07-24 14:39:51 -07:00
abbc41e859
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

Robert Greenwalt   commited 2014-07-23 12:42:47 -07:00
50eb5e72ea
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

Ye Wen   commited 2014-07-23 11:41:17 -07:00
ca7ababe8b
Cleanup: Delete dead code.
Bug: 15413389
Change-Id: I315468832ef18ffc84174e54774ab63b86d284dc

Sreeram Ramachandran   commited 2014-07-22 15:46:34 -07:00
c06ec73149
Updated media browsing API & tests.
Change-Id: I3a1e3eead99a98b1890e05843dd90203cee517b7

Yao Chen   commited 2014-07-21 21:14:43 -07:00
32cfa6eaf5
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

Paul Jensen   authored and   Robert Greenwalt   commited 2014-07-16 16:12:16 -07:00
d0464edc38
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

Paul Jensen   commited 2014-07-15 19:06:39 +00:00
26dd002a22
Remove unnecessary code and APIs.
This stuff has been replaced by setNetworkForUser() in NetdClient.

Change-Id: If525ee259b74314191d1913f7c2a3e828e05c38f

Sreeram Ramachandran   commited 2014-07-11 18:16:04 -07:00
b5ae69d410
resolved conflicts for merge of a1a0a98d to master
Change-Id: I8ec28728c12d7cc3ce2c4f3d09d9ce6162504618

Aaron Whyte   commited 2014-07-11 13:34:41 -07:00
487d7d6519
Readjust location of NETID_UNSET definition.
This is a tweak to my 8ec11bb change I a-little-too-hastily committed.

Change-Id: Ibeee9382109994c66227d1c42aac749e2a274ed7

Paul Jensen   commited 2014-07-11 16:53:39 +00:00
5dea435dd4
Define NETID_UNSET in ConnectivityManager.
This allows some cleanup and removal of dead code.

bug:15489928
Change-Id: Iaf0507bc2e8ec6dcc253f01f61c5b221d46581f9

Paul Jensen   commited 2014-07-11 12:00:10 -04:00
65743a26ad
am 39a9ec20: Allow overlays to configure ConnectivityService\'s network sampling to not wake the device. This can increase clockwork device battery life. Bug:15455204
* commit '39a9ec20d4':
  Allow overlays to configure ConnectivityService's network sampling to not wake the device. This can increase clockwork device battery life. Bug:15455204

Aaron Whyte   authored and   Android Git Automerger   commited 2014-07-11 01:46:08 +00:00
a1a0a98d37
Missed an entry in the copy constructor.
bug:15755597
Change-Id: Iee17ca88404a6a50258d204a12cd0c04cd15e34e

Robert Greenwalt   commited 2014-07-10 14:55:14 -07:00
bd7397eb5b
Allow overlays to configure ConnectivityService's network sampling to not wake the device.
This can increase clockwork device battery life.
Bug:15455204

Change-Id: Ifc551e6a522627dc8e5cfdfb8f56d4e3cbeea936

Aaron Whyte   commited 2014-07-10 14:05:35 -07:00
39a9ec20d4
Add networkSpecifier string to NetworkCapabilties.
Allows transport specific network selectivity where multi-sim or sta+sta
is supported.

bug:1575597
Change-Id: I9c60fe7710e988c17d63236788b492a3ddd264a1

Robert Greenwalt   commited 2014-07-10 20:58:20 +00:00
a6bc0916e7
Convert Vpn from NetworkStateTracker to NetworkAgent.
This eliminates the need for the ConnectivityService.VpnCallback class.
This requires shifting VPNs to the new "network" netd API.
VpnService.protect() is modified to no longer go through ConnectivityService.
NetworkCapabilities is extended to add a transport type for VPNs and a
capability requiring a non-VPN (so the default NetworkRequest isn't satisfied
by a VPN).

bug:15409918
Change-Id: Ic4498f1961582208add6f375ad16ce376ee9eb95

Paul Jensen   commited 2014-07-10 20:39:33 +00:00
8b5fc62d12
Merge "Refactor wifi p2p's startDhcpServer function"
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2014-07-10 18:27:37 +00:00
1166831856
Refactor wifi p2p's startDhcpServer function
Add getTetheredDhcpRanges() interface and call it before calling
mNwService.startTethering to update dhcp ranges.  This will allow
p2p apps to run well concurently with other tethering apps.

Manual import of AOSP change 81546 by jianzheng.zhou@freescale.com

Change-Id: Iebc62f95bdcedde80e2c1d3e9580d3f625c3b50b

Robert Greenwalt   commited 2014-07-10 18:56:12 +00:00
e594a76c9f
Add AlarmClock API to AlarmManager
Adds a new kind of alarm that represents an alarm clock and
a way to query the next scheduled alarm clock.

Deprecates Settings.System.NEXT_ALARM_FORMATTED.

Bug: 14589952
Change-Id: I297eeeff36d07adcda010afac183d0f5ee37dc99

Adrian Roos   commited 2014-07-10 17:07:36 +00:00
9d896191e5
Merge "Enable network validations and add app to handle captive portal login."
Paul Jensen   authored and   Android (Google) Code Review   commited 2014-07-10 00:32:18 +00:00
bf09bfca2f
Enable network validations and add app to handle captive portal login.
Network validation prevents networks claiming to provide internet connectivity
from becoming the default network in cases where internet connectivity is not
found to actually exist.
If a captive portal is encountered the appropriate broadcasts and notifications
are surfaced to allow apps to handle signing in.  If no app handles signing in,
my system app will handle it.

Bug:15409233
Bug:15409354

Change-Id: Ie240d7eac4bdbab8cc7578782bd72d8b26de7951

Paul Jensen   commited 2014-07-10 13:14:01 -04:00
239ce0b6d6
Merge "Add Network inspection API."
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2014-07-09 21:39:59 +00:00
11e39d2fb7
Add Network inspection API.
Adds getNetworksNetworkInfo.
Adds getAllNetworks.

Cleans up some synchronization issues.

Change-Id: I82c7a4b554e3c6c1adfe6027cc54b028ed6dbac9

Robert Greenwalt   commited 2014-07-10 10:48:23 -07:00
02fe11eba3
Add Trust to NetworkCapabilities.
Indicates the user has indicated implicit trust of a network.  This
generally means it's a sim-selected carrier, a plugged in ethernet,
a paired BT device or a wifi they've asked to connect to.  Untrusted
networks are probably limited to unknown wifi AP.

Change-Id: I89490bdaa3c2d63d33f876c72d8b088dc155fa3d

Robert Greenwalt   commited 2014-07-08 23:55:18 +00:00
a134636a4b
CW on Master: Disable CaptivePortalTracker, EthernetService
BUG: 15143878

Change-Id: I6c534a28c1fcd475982ae70e7f3af69f3a219e24

Joe LaPenna   authored and   Robert Greenwalt   commited 2014-07-08 22:52:02 +00:00
c4bb3c9092
Remove dead code.
Also adds a TYPE_VPN so the VPN can be strongly typed.

Change-Id: Ibf39450c480f16ce5ab4c25b47965691b844fb92

Robert Greenwalt   commited 2014-07-07 17:09:01 -07:00
ce7a144472
Merge "Remove unused api."
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2014-07-02 18:55:10 +00:00
f7c7336625
When adding a NetworkRequest, cancel linger for satisfying Network.
This fixes a problem where a requested network can later suddenly disappear if
it was lingering when the request arrived and later the linger timeout expired.

bug:15927234
Change-Id: Ib3fae45820ce4421e3bc5b623937a16d5f1efa0f

Paul Jensen   commited 2014-07-07 15:50:24 +00:00
7ba4d03c1c
Fix build
Change-Id: I7d0787e4a1f778008c979c4174ef445a950c4250

Glenn Kasten   commited 2014-07-07 07:12:29 -07:00
b20d886bce
Remove unused api.
bug:15595155
Change-Id: Ifd79365bd45f20f531782244f471a4cfc32a4135

Robert Greenwalt   commited 2014-07-02 13:50:33 -07:00
e0b0051472