Commit graph

1,698 commits

Message SHA1
am 2f5cb843: am e6ec511d: Merge "Add subId as parameter for get/setDataEnabled." into lmp-mr1-dev
* commit '2f5cb843553a596d314596c2bb776541db864d63':
  Add subId as parameter for get/setDataEnabled.

Wink Saville   authored and   Android Git Automerger   commited 2014-12-09 18:06:03 +00:00
421a8451e8
Merge "Add subId as parameter for get/setDataEnabled." into lmp-mr1-dev
Wink Saville   authored and   Android (Google) Code Review   commited 2014-12-09 17:52:27 +00:00
e6ec511d92
am 2f1e953f: am 4df65bf1: Merge "Direct notification of network interface changes." into lmp-mr1-dev
* commit '2f1e953f8fd6d7ee32c00a680f887607f1005f62':
  Direct notification of network interface changes.

Jeff Sharkey   authored and   Android Git Automerger   commited 2014-12-09 00:18:01 +00:00
2f94bf63a7
Direct notification of network interface changes.
Connectivity broadcasts recently changed and are no longer sent for
certain types of network changes.  For example, when stacked network
interfaces change for a mobile network.  To ensure that we pick up
all these details, directly wire the two services together.

Also remove some unused code for split network types.

Bug: 18666753
Change-Id: I0467bd5b330c0e0cb51af2306d821b41ad16337a

Jeff Sharkey   commited 2014-12-08 14:50:14 -08:00
7c503b1a25
am 5b41696c: am a8fb5803: Merge "Offer to "merge" subscribers for data usage." into lmp-mr1-dev
* commit '5b41696c56c124124d48168227a83b63bd55aea7':
  Offer to "merge" subscribers for data usage.

Jeff Sharkey   authored and   Android Git Automerger   commited 2014-12-08 19:44:27 +00:00
843d49abea
am c4b2ec1a: am 7032a8b9: Merge "Don\'t send the same PendingIntent more than once." into lmp-mr1-dev
* commit 'c4b2ec1a3a808c2dae0894e5f0cfd43d6ec1d5a2':
  Don't send the same PendingIntent more than once.

Jeremy Joslin   authored and   Android Git Automerger   commited 2014-12-08 19:36:27 +00:00
a20d7aa65d
am a4afe13a: am e19ed284: Merge "Reap unvalidated networks that have no chance of becoming highest scoring." into lmp-mr1-dev
* commit 'a4afe13af38c03ae6abb76d2cf36ae0672328fd8':
  Reap unvalidated networks that have no chance of becoming highest scoring.

Paul Jensen   authored and   Android Git Automerger   commited 2014-12-08 19:36:08 +00:00
5eba470dd7
am e52a2ea0: am ebd504dc: Merge "Fix issue #17323751: Additional items in aggregated battery stats" into lmp-mr1-dev
* commit 'e52a2ea03bd7b8ed2f3680c5198e00fb7ad5c34c':
  Fix issue #17323751: Additional items in aggregated battery stats

Dianne Hackborn   authored and   Android Git Automerger   commited 2014-12-08 19:33:49 +00:00
28fa1299fa
am d89f0d3d: am b81ce34a: Merge "Revert "Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev"" into lmp-mr1-dev
* commit 'd89f0d3d54dec1662b1cfed6c8e574ffcc8032d9':
  Revert "Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev"

Pavel Zhamaitsiak   authored and   Android Git Automerger   commited 2014-12-08 19:16:43 +00:00
26bf8bec31
Offer to "merge" subscribers for data usage.
There are some cases where multiple subscriber identities (IMSI)
should be treated as "merged together" from a data usage
perspective.  This is done by extending the template used for
matching purposes to support multiple subscribers.

Then, when we query historical usage or set network policies, we
normalize the matching template to merge to any other identities
that should be included.  When normalizing, the "lowest" identity
is always used for equality and storage purposes, which allows
identities to come and go over time.

This change also fixes data usage recording for multi-SIM devices
by passing along the concrete subscriber identity for each network
interface.  Also correctly create default policies for multi-SIM
devices.  This change also drops setPolicyDataEnable() until it can
be wired up to the right underlying NetworkAgent.  (This means we
still bring up the network, and then rely on iptables rules to block
traffic when over the limit, instead of proactively disabling the
connection.)

Bug: 18012787
Change-Id: If6acf32009fdfea2b836f5aff8e2f3e5e0248b4a

Jeff Sharkey   commited 2014-12-08 08:42:59 -08:00
fe0b08d122
Merge "Don't send the same PendingIntent more than once." into lmp-mr1-dev
Jeremy Joslin   authored and   Android (Google) Code Review   commited 2014-12-06 02:05:22 +00:00
7032a8b913
Merge "Reap unvalidated networks that have no chance of becoming highest scoring." into lmp-mr1-dev
Paul Jensen   authored and   Android (Google) Code Review   commited 2014-12-06 01:23:56 +00:00
e19ed28412
Don't send the same PendingIntent more than once.
Fixing a bug where a NetworkRequest's PendingIntent can be sent more
than once when networks are rematched before the intent completes.

Added a small delay before removing the request to give the receiving
client an opportunity to put in its own request. The delay value is
configurable via Settings.Secure.

Bug: 18614074
Change-Id: Iac7c5e5a04f42f2b6794e9e22349cc631bebeab7

Jeremy Joslin   commited 2014-12-05 14:58:04 -08:00
b9846d0e61
Merge "Fix issue #17323751: Additional items in aggregated battery stats" into lmp-mr1-dev
Dianne Hackborn   authored and   Android (Google) Code Review   commited 2014-12-05 22:54:08 +00:00
ebd504dc9a
Fix issue #17323751: Additional items in aggregated battery stats
- Now aggregate number of times each process has crashed and ANRed.
- Now aggregate total number of connectivity changes.
- Now record connectivity changes in the history.

Crash and ANR counts are new entries at the end of "pr" in checkin.

Connectivity change counts is a new entry at the end of "m" in checkin.

Connectivity changes in the history checkin are Ecn and include the
type of connection and its state.

Change-Id: I0c01186446034cf6c3fb97d45f5e3b5c69a0438a

Dianne Hackborn   commited 2014-12-05 13:54:24 -08:00
2813a69af1
am 461e7367: am f2568cef: Merge "Remember to cancel lingering when a network again satsifies a NetworkRequest." into lmp-mr1-dev
* commit '461e73677d208e4e97356cbc781ce490b90e2027':
  Remember to cancel lingering when a network again satsifies a NetworkRequest.

Paul Jensen   authored and   Android Git Automerger   commited 2014-12-05 20:18:45 +00:00
d1c8523566
Add subId as parameter for get/setDataEnabled.
Bug: 18279333
Change-Id: I2496a2fd92b154e5e6981cbf6b5b5939cda59122

Wink Saville   commited 2014-12-05 11:10:30 -08:00
02eb35caee
Revert "Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev"
This is the revert of ag/572619.

This reverts commit 31c992a477, reversing
changes made to 32b61ab28f54e5b00f472b2166f9b1100375e4ff.

Bug: 18609055
Bug: 17769720
Change-Id: I122eba200f2071d4e5777ec34c1d04fb567345a8

Erik Kline   authored and   Pavel Zhamaitsiak   commited 2014-12-05 18:02:56 +00:00
2e3fd9c6a2
am 95b5ca90: am 31c992a4: Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev
* commit '95b5ca9019720c4c012ca13791d32aa6d0bb5ba8':
  Remove CONNECTIVITY_CHANGE_DELAY and friends.

Erik Kline   authored and   Android Git Automerger   commited 2014-12-04 21:45:33 +00:00
4a3360aa65
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 "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 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
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 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 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 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
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 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 "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
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
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
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