Commit graph

13,045 commits

Message SHA1
Merge "Remember to cancel lingering when a network again satsifies a NetworkRequest." into lmp-mr1-dev
Paul Jensen   authored and   Android (Google) Code Review   commited 2014-12-04 19:27:52 +00:00
f2568cef34
Reap unvalidated networks that have no chance of becoming highest scoring.
These networks are unneeded and waste battery.  We won't bring up these
networks in the first place if they have no chance of becoming highest scoring.
This change handles the case where these networks are already up and
transition to a state where they have no chance of becoming highest scoring.
This happens when another network validates with a score higher than this
network can ever hope to attain.

bug:18489123
Change-Id: I77a96a72e250e25e44e0c50e7a928af8b35bb6ab

Paul Jensen   commited 2014-12-04 11:22:39 -05:00
abda68bf52
merge in master-release history after reset to master
The Android Automerger   commited 2014-12-04 05:55:56 -08:00
41a7bf80cf
Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev
Erik Kline   authored and   Android (Google) Code Review   commited 2014-12-04 03:14:02 +00:00
31c992a477
am 12fdb64d: am d99cd44f: am dc99c504: Merge "Make StatusBar display all default networks." into lmp-mr1-dev
* commit '12fdb64da9':
  Make StatusBar display all default networks.

Lorenzo Colitti   authored and   Android Git Automerger   commited 2014-12-03 21:49:38 +00:00
66b7f4269e
am d99cd44f: am dc99c504: Merge "Make StatusBar display all default networks." into lmp-mr1-dev
* commit 'd99cd44f317a0e1b188a0033ebe4948f13c32491':
  Make StatusBar display all default networks.

Lorenzo Colitti   authored and   Android Git Automerger   commited 2014-12-03 20:41:10 +00:00
12fdb64da9
merge in master-release history after reset to master
The Android Automerger   commited 2014-12-03 05:55:05 -08:00
43091d4521
Make StatusBar display all default networks.
The basic principle is: if an app's traffic could possibly go
over a network without the app using the multinetwork APIs (hence
"by default"), then the status bar should show that network's
connectivity.

In the normal case, app traffic only goes over the system's default
network connection, so that's the only network returned.

With a VPN in force, some app traffic may go into the VPN, and thus over
whatever underlying networks the VPN specifies, while other app traffic
may go over the system default network (e.g.: a split-tunnel VPN, or an
app disallowed by the VPN), so the set of networks returned includes the
VPN's underlying networks and the system default.

Specifically:

1. Add a NETWORK_CAPABILITY_VALIDATED bit to NetworkCapabilities.
2. Add a hidden API to retrieve the NetworkCapabilities of
   all default networks for a given macro-user.
3. Modify the status bar code that used getActiveNetworkInfo to
   determine which network was active, and make it consider all
   validated networks instead.
4. Because the set of active networks depends on which VPN app
   the user is running, make the status bar re-evaluate the
   networking situation when the active user changes.

Bug: 17460017
Change-Id: Ie4965f35fb5936b088e6060ee06e362c22297ab2

Lorenzo Colitti   authored and   Jeff Davidson   commited 2014-12-02 10:27:05 -08:00
8db934afbf
Remember to cancel lingering when a network again satsifies a NetworkRequest.
When WiFi's score drops and then comes back up we would previously linger
WiFi but forget to cancel the linger timeout, so 30s later WiFi would
unexpectedly tear down.  Also, make sure this is only done for created
Networks as "created" is the signal to initialy match Networks and requests.

bug:18169560
Change-Id: Ia69b110f6473371e556c60b950253758e023b7aa

Paul Jensen   commited 2014-12-02 09:26:17 -05:00
935ceef02a
am 0d4d3213: am d125266b: am 858e96b3: Merge "Revert some verbose logging from ag/489226" into lmp-mr1-dev
* commit '0d4d3213ab':
  Revert some verbose logging from ag/489226

Erik Kline   authored and   Android Git Automerger   commited 2014-12-02 07:42:45 +00:00
5aaacecb3c
am d125266b: am 858e96b3: Merge "Revert some verbose logging from ag/489226" into lmp-mr1-dev
* commit 'd125266b3c0cabcb42e6331a312c66071fedd752':
  Revert some verbose logging from ag/489226

Erik Kline   authored and   Android Git Automerger   commited 2014-12-02 07:35:59 +00:00
0d4d3213ab
Merge "Revert some verbose logging from ag/489226" into lmp-mr1-dev
Erik Kline   authored and   Android (Google) Code Review   commited 2014-12-02 07:22:33 +00:00
858e96b354
am 62ef21f6: am 28ca40ff: am 9cc5bd0f: Merge "Only use mDefaultDns if the network claims to offer Internet" into lmp-mr1-dev
* commit '62ef21f609':
  Only use mDefaultDns if the network claims to offer Internet

Lorenzo Colitti   authored and   Android Git Automerger   commited 2014-12-02 07:07:41 +00:00
fb534ff34c
am 28ca40ff: am 9cc5bd0f: Merge "Only use mDefaultDns if the network claims to offer Internet" into lmp-mr1-dev
* commit '28ca40ff78dc5e62d0e26e7340b74ad6e5ba767e':
  Only use mDefaultDns if the network claims to offer Internet

Lorenzo Colitti   authored and   Android Git Automerger   commited 2014-12-02 07:00:45 +00:00
62ef21f609
Merge "Only use mDefaultDns if the network claims to offer Internet" into lmp-mr1-dev
Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2014-12-02 06:47:52 +00:00
9cc5bd0f6c
am 0d0d3946: am 33783a96: am 500f7811: Merge "Fix the ordering of extra values in the PI." into lmp-mr1-dev
* commit '0d0d3946e7':
  Fix the ordering of extra values in the PI.

Jeremy Joslin   authored and   Android Git Automerger   commited 2014-12-01 20:07:32 +00:00
0db64c4969
am 33783a96: am 500f7811: Merge "Fix the ordering of extra values in the PI." into lmp-mr1-dev
* commit '33783a962f3336400d12cd739ae33b9452ea14be':
  Fix the ordering of extra values in the PI.

Jeremy Joslin   authored and   Android Git Automerger   commited 2014-12-01 20:01:02 +00:00
0d0d3946e7
Only use mDefaultDns if the network claims to offer Internet
Currently, if a network does not specify DNS servers, we default
it to using 8.8.8.8. This was done because the emulator did not
specify DNS servers. However, it causes queries to fail slowly,
instead of failing fast, on networks that do not have
connectivity to 8.8.8.8.

Bug: 18327075
Change-Id: I0df13ff4a17ee65e640be96695a3af31b020963a

Lorenzo Colitti   commited 2014-12-02 03:40:16 +09:00
aa4f1f6680
merge in master-release history after reset to master
The Android Automerger   commited 2014-12-01 05:53:47 -08:00
79b42ce65e
Fix the ordering of extra values in the PI.
Bug: 18539720
Change-Id: I6bb69394b05923ca25bc1b4902bc2540a13812bd

Jeremy Joslin   commited 2014-11-26 14:24:15 -08:00
362093ebaa
am 6877505c: am 58a493ac: am d59fd959: Merge "Don\'t let NetworkMonitor state stop user-initiated transitions." into lmp-mr1-dev
* commit '6877505cf1':
  Don't let NetworkMonitor state stop user-initiated transitions.

Paul Jensen   authored and   Android Git Automerger   commited 2014-11-26 19:42:10 +00:00
bc3a686d9a
am 58a493ac: am d59fd959: Merge "Don\'t let NetworkMonitor state stop user-initiated transitions." into lmp-mr1-dev
* commit '58a493accfeafa13fd77a16e832c5ad72a4c9006':
  Don't let NetworkMonitor state stop user-initiated transitions.

Paul Jensen   authored and   Android Git Automerger   commited 2014-11-26 18:43:29 +00:00
6877505cf1
merge in master-release history after reset to master
The Android Automerger   commited 2014-11-26 05:53:04 -08:00
14d553c15a
Merge "Don't let NetworkMonitor state stop user-initiated transitions." into lmp-mr1-dev
Paul Jensen   authored and   Android (Google) Code Review   commited 2014-11-26 12:05:01 +00:00
d59fd959b4
Revert some verbose logging from ag/489226
Bug: 18171889
Change-Id: I582a17b2272746e04717ac8da1d6984ff187ddf6

Erik Kline   commited 2014-11-26 09:01:16 +09:00
2106740914
Merge "Map TYPE_VPN integer to "VPN" string."
Erik Kline   authored and   Android (Google) Code Review   commited 2014-11-25 18:46:37 +00:00
637e14a64f
am 6fdf2a17: am 65f31d8d: Merge "Don\'t enforce control permission when preparing consented VPN." into lmp-mr1-dev
* commit '6fdf2a1709c2006275d148e3156d249dcc27a99c':
  Don't enforce control permission when preparing consented VPN.

Jeff Davidson   authored and   Android Git Automerger   commited 2014-11-25 17:49:39 +00:00
ae48252896
am 080b02fc: am d8b132b7: Merge "Don\'t bother validating networks that don\'t satisfy the default request." into lmp-mr1-dev
* commit '080b02fc6c4531646d29ff4039080f2ac6d5f31a':
  Don't bother validating networks that don't satisfy the default request.

Paul Jensen   authored and   Android Git Automerger   commited 2014-11-25 17:37:54 +00:00
e85f9aaa83
am 608ea322: am eac470a9: Merge "Delete unused/non-working code." into lmp-mr1-dev
* commit '608ea322868385aaa46c20887795e72bf7068479':
  Delete unused/non-working code.

Sreeram Ramachandran   authored and   Android Git Automerger   commited 2014-11-25 15:10:20 +00:00
8ee414c445
am 4096a310: am 83f7111b: Merge "Allow VPNs to specify their underlying networks." into lmp-mr1-dev
* commit '4096a3107b070339ba06102a32a368f28a31f9a4':
  Allow VPNs to specify their underlying networks.

Sreeram Ramachandran   authored and   Android Git Automerger   commited 2014-11-25 15:10:14 +00:00
dedb930376
am 1d16570b: am 9a4a64cb: Merge "Eliminate race conditions in UID-based network filtering." into lmp-mr1-dev
* commit '1d16570b374ffaea89a3e3d403146008d12e60b9':
  Eliminate race conditions in UID-based network filtering.

Sreeram Ramachandran   authored and   Android Git Automerger   commited 2014-11-25 15:10:08 +00:00
8c06e6939a
Map TYPE_VPN integer to "VPN" string.
Bug: 18439110
Change-Id: I0fa0c9e6a9293ab724e2b5e7d0f586f05cd100c7

Erik Kline   commited 2014-11-25 13:16:58 +09:00
b1ff700053
Merge "Don't enforce control permission when preparing consented VPN." into lmp-mr1-dev
Jeff Davidson   authored and   Android (Google) Code Review   commited 2014-11-24 21:19:56 +00:00
65f31d8ddc
Merge "Don't bother validating networks that don't satisfy the default request." into lmp-mr1-dev
Paul Jensen   authored and   Android (Google) Code Review   commited 2014-11-24 18:30:36 +00:00
d8b132b7b2
Merge "Delete unused/non-working code." into lmp-mr1-dev
Sreeram Ramachandran   authored and   Android (Google) Code Review   commited 2014-11-24 17:24:26 +00:00
eac470a946
Merge "Allow VPNs to specify their underlying networks." into lmp-mr1-dev
Sreeram Ramachandran   authored and   Android (Google) Code Review   commited 2014-11-24 17:24:04 +00:00
83f7111bdd
Merge "Eliminate race conditions in UID-based network filtering." into lmp-mr1-dev
Sreeram Ramachandran   authored and   Android (Google) Code Review   commited 2014-11-24 17:21:18 +00:00
9a4a64cb80
Don't let NetworkMonitor state stop user-initiated transitions.
GCM can call reportInetCondition() at any time which can cause
the NetworkMonitor to transition states to reevaluate at any time.
Previously we were only listening for users clicking the sign-in
notificaiton or completing sign-in when in the appropriate state.
With this change NetworkMonitor's state does not stop us from
listening for the user's actions.

bug:17917929
Change-Id: Ic1da31d90f7090e5fc111874cb7c37d505aaf590

Paul Jensen   commited 2014-11-24 11:11:32 -05:00
073b8ab2da
merge in master-release history after reset to 476edb57012260990e19fe363e6433488518916a
The Android Automerger   commited 2014-11-23 05:52:26 -08:00
a74bd501d8
merge in master-release history after reset to 476edb57012260990e19fe363e6433488518916a
The Android Automerger   commited 2014-11-22 05:54:45 -08:00
fb7d94ff0a
am 54c11274: am c0491a2e: Merge "Lightweight checkin output for network stats." into lmp-mr1-dev
* commit '54c11274b5e7ce9f774f7c846d7165563279b96a':
  Lightweight checkin output for network stats.

Jeff Sharkey   authored and   Android Git Automerger   commited 2014-11-21 22:09:28 +00:00
e6646ce80d
Don't enforce control permission when preparing consented VPN.
If a VPN app requests to be prepared and has already obtained user
consent, there is no need to additionally enforce the control
permission. We only need to enforce the control permission when a VPN
is first being prepared, where such a preparation would bypass user
consent.

Also ensure that in this case, the VPN being prepared matches the
calling app. Otherwise an app could prepare another pre-consented VPN,
which is not particularly dangerous but is likely unexpected.

Finally, remove misleading comment in ConnectivityService#prepareVpn.
This method IS called from VpnService.prepare(), not only from
system-privileged apps.

Bug: 18442887
Change-Id: Ic3227c6c1c74312697f0576d3811b06692a4edff

Jeff Davidson   commited 2014-11-21 12:56:29 -08:00
2b1cc9574c
Lightweight checkin output for network stats.
Define and print a compact version of network statistics when dump
is requested with the "--checkin" flag.  Defaults to last 24 hours,
but included data can be tweaked with various flags.

Groups together detailed network identities into larger umbrella
terms like "mobile" and "wifi."

Bug: 18415963
Change-Id: I70cf9c828ea5c6e5bb6884837d3608f66fbad2e6

Jeff Sharkey   commited 2014-11-21 10:11:10 -08:00
80330fb05d
Allow VPNs to specify their underlying networks.
These are used when responding to getActiveNetworkInfo() (and cousins)
when an app is subject to the VPN.

Bug: 17460017
Change-Id: Ief7a840c760777a41d3358aa6b8e4cdd99c29f24

Sreeram Ramachandran   commited 2014-11-21 09:26:18 -08:00
af655d9e52
Delete unused/non-working code.
Change-Id: I2cba9ffdb4ed547cb922d0ac08abf81e49ffa66b

Sreeram Ramachandran   commited 2014-11-21 08:08:19 -08:00
5876d9ec20
Eliminate race conditions in UID-based network filtering.
The previous code retrieved information from the legacy tracker multiple
times for each user query, leading to race conditions where the info
could've changed between the calls.

Refactors the handling of legacy data types in ConnectivityService and
unifies call paths so that APIs that deal with legacy data types
(NetworkInfo and int/networkType) and newer types (such as Network) go
through common code paths, using NetworkState to hold all the necessary
data pieces. This enables follow-on bug fixes to getActiveNetworkInfo().

The changes are limited to public "query" APIs (those that retrieve some
network information or the other). More details about the specific
changes and their rationale can be found in the code review thread.

Bug: 17460017
Change-Id: I656ee7eddf2b8cace5627036452bb5748043406c

Sreeram Ramachandran   commited 2014-11-21 08:07:13 -08:00
44e21e44e3
am 9f8f78ca: Merge "Don\'t allow an uncreated Network to satsify requests." into lmp-mr1-dev
automerge: 934b73f

* commit '934b73fb50afd4280a1b6a509376ca86424fa7b2':
  Don't allow an uncreated Network to satsify requests.

Paul Jensen   authored and   android-build-merger   commited 2014-11-21 12:50:35 +00:00
f9576fc0eb
Merge "Don't allow an uncreated Network to satsify requests." into lmp-mr1-dev
Paul Jensen   authored and   Android (Google) Code Review   commited 2014-11-21 12:42:34 +00:00
9f8f78ca78
am 8a2ac41d: am 7057035c: am c3f5d718: Merge "Fix null handling in proxies." into lmp-dev automerge: 0a1f0d7
* commit '8a2ac41dcfa0ec10c09a7599d9345798c21cd47d':
  Fix null handling in proxies.

Geoffrey Borggaard   authored and   Android Git Automerger   commited 2014-11-21 10:31:03 +00:00
a85c974f0c
am c3f5d718: Merge "Fix null handling in proxies." into lmp-dev
automerge: 0a1f0d7

* commit '0a1f0d74f2':
  Fix null handling in proxies.

Geoffrey Borggaard   authored and   android-build-merger   commited 2014-11-21 10:17:39 +00:00
7057035ccc