Commit Graph

1710 Commits

Author SHA1 Message Date
Jeff Sharkey
06abd9c5cb am 86af3b60: am 2f1e953f: am 4df65bf1: Merge "Direct notification of network interface changes." into lmp-mr1-dev
* commit '86af3b6061b8a8f08a449cc126c5d181bfe2de0b':
  Direct notification of network interface changes.
2014-12-09 23:20:26 +00:00
Jeff Sharkey
e273f27053 am 3c18de21: am 5b41696c: am a8fb5803: Merge "Offer to "merge" subscribers for data usage." into lmp-mr1-dev
* commit '3c18de21c76197ad7f16723806d2ce5cf6e30bb8':
  Offer to "merge" subscribers for data usage.
2014-12-09 22:23:19 +00:00
Jeremy Joslin
f31ad13b77 am a0922b09: am c4b2ec1a: am 6e39f696: Merge "Don\'t send the same PendingIntent more than once." into lmp-mr1-dev
* commit 'a0922b09ee4e6eff12d3b980f2af509d72e9ade3':
  Don't send the same PendingIntent more than once.
2014-12-09 01:00:09 +00:00
Paul Jensen
d1e080eea8 am 8ee62819: am a4afe13a: am 26c6a232: Merge "Reap unvalidated networks that have no chance of becoming highest scoring." into lmp-mr1-dev
* commit '8ee62819bb456d255adcadd16e745804988b4ae1':
  Reap unvalidated networks that have no chance of becoming highest scoring.
2014-12-09 01:00:00 +00:00
Dianne Hackborn
1201a2569c am cfe01d29: am e52a2ea0: am f91526ce: Merge "Fix issue #17323751: Additional items in aggregated battery stats" into lmp-mr1-dev
* commit 'cfe01d29913836d14dc762f0a8d1193b7626010e':
  Fix issue #17323751: Additional items in aggregated battery stats
2014-12-09 00:59:01 +00:00
Pavel Zhamaitsiak
9dc0babd8d am d7d4a9c8: am d89f0d3d: am b81ce34a: Merge "Revert "Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev"" into lmp-mr1-dev
* commit 'd7d4a9c81199dbdcfc0dc036d07aea0c3e810096':
  Revert "Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev"
2014-12-09 00:18:39 +00:00
Jeff Sharkey
86af3b6061 am 2f1e953f: am 4df65bf1: Merge "Direct notification of network interface changes." into lmp-mr1-dev
* commit '2f1e953f8fd6d7ee32c00a680f887607f1005f62':
  Direct notification of network interface changes.
2014-12-09 00:18:01 +00:00
Jeff Sharkey
aa6ff6c7b0 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
2014-12-08 14:50:14 -08:00
Jeff Sharkey
3c18de21c7 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.
2014-12-08 19:44:27 +00:00
Jeremy Joslin
a0922b09ee am c4b2ec1a: am 6e39f696: 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.
2014-12-08 19:36:27 +00:00
Paul Jensen
8ee62819bb am a4afe13a: am 26c6a232: 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.
2014-12-08 19:36:08 +00:00
Dianne Hackborn
cfe01d2991 am e52a2ea0: am f91526ce: 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
2014-12-08 19:33:49 +00:00
Pavel Zhamaitsiak
d7d4a9c811 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"
2014-12-08 19:16:43 +00:00
Jeff Sharkey
fffa983fe4 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
2014-12-08 08:42:59 -08:00
Jeremy Joslin
6e39f696b7 Merge "Don't send the same PendingIntent more than once." into lmp-mr1-dev 2014-12-06 02:05:22 +00:00
Paul Jensen
26c6a232bb Merge "Reap unvalidated networks that have no chance of becoming highest scoring." into lmp-mr1-dev 2014-12-06 01:23:56 +00:00
Jeremy Joslin
1d3acf930f 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
2014-12-05 14:58:04 -08:00
Dianne Hackborn
f91526cec0 Merge "Fix issue #17323751: Additional items in aggregated battery stats" into lmp-mr1-dev 2014-12-05 22:54:08 +00:00
Dianne Hackborn
37e2d0e068 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
2014-12-05 13:54:24 -08:00
Paul Jensen
ff1d0b7938 am f43033a6: am 461e7367: am 1f4d121b: Merge "Remember to cancel lingering when a network again satsifies a NetworkRequest." into lmp-mr1-dev
* commit 'f43033a63edf0828ad987c3e276ed6ed189d3069':
  Remember to cancel lingering when a network again satsifies a NetworkRequest.
2014-12-05 21:19:57 +00:00
Paul Jensen
f43033a63e am 461e7367: am 1f4d121b: 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.
2014-12-05 20:18:45 +00:00
Erik Kline
c1529548aa Revert "Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev"
This is the revert of ag/572619.

This reverts commit b5ae87a8d0, reversing
changes made to 32b61ab28f54e5b00f472b2166f9b1100375e4ff.

Bug: 18609055
Bug: 17769720
Change-Id: I122eba200f2071d4e5777ec34c1d04fb567345a8
2014-12-05 18:02:56 +00:00
Erik Kline
aabb20ee04 am e9d534d5: am 95b5ca90: am b5ae87a8: Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev
* commit 'e9d534d537aba50b554fad59c16302cbee65069e':
  Remove CONNECTIVITY_CHANGE_DELAY and friends.
2014-12-04 21:55:38 +00:00
Erik Kline
e9d534d537 am 95b5ca90: am b5ae87a8: Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev
* commit '95b5ca9019720c4c012ca13791d32aa6d0bb5ba8':
  Remove CONNECTIVITY_CHANGE_DELAY and friends.
2014-12-04 21:45:33 +00:00
Paul Jensen
1f4d121b74 Merge "Remember to cancel lingering when a network again satsifies a NetworkRequest." into lmp-mr1-dev 2014-12-04 19:27:52 +00:00
Paul Jensen
5c4e5fc0b9 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
2014-12-04 11:22:39 -05:00
Erik Kline
b5ae87a8d0 Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev 2014-12-04 03:14:02 +00:00
Lorenzo Colitti
8aae8b885a am 307422bd: am d99cd44f: am dc99c504: Merge "Make StatusBar display all default networks." into lmp-mr1-dev
* commit '307422bdefda3281eb211217d767027278d4f64b':
  Make StatusBar display all default networks.
2014-12-03 21:49:38 +00:00
Lorenzo Colitti
307422bdef am d99cd44f: am dc99c504: Merge "Make StatusBar display all default networks." into lmp-mr1-dev
* commit 'd99cd44f317a0e1b188a0033ebe4948f13c32491':
  Make StatusBar display all default networks.
2014-12-03 20:41:10 +00:00
Lorenzo Colitti
79bd2e2841 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
2014-12-02 10:27:05 -08:00
Paul Jensen
d5f533917d 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
2014-12-02 09:26:17 -05:00
Erik Kline
2ca89c1005 am ee1d722e: am d125266b: am 4bcd4a79: Merge "Revert some verbose logging from ag/489226" into lmp-mr1-dev
* commit 'ee1d722e1c8e9af9eca005b4a6390f0295726f18':
  Revert some verbose logging from ag/489226
2014-12-02 07:42:45 +00:00
Erik Kline
ee1d722e1c am d125266b: am 4bcd4a79: Merge "Revert some verbose logging from ag/489226" into lmp-mr1-dev
* commit 'd125266b3c0cabcb42e6331a312c66071fedd752':
  Revert some verbose logging from ag/489226
2014-12-02 07:35:59 +00:00
Erik Kline
4bcd4a7950 Merge "Revert some verbose logging from ag/489226" into lmp-mr1-dev 2014-12-02 07:22:33 +00:00
Lorenzo Colitti
9a0063cfca am 89f234c5: am 28ca40ff: am 425aacdc: Merge "Only use mDefaultDns if the network claims to offer Internet" into lmp-mr1-dev
* commit '89f234c56b44727434bf70594694f2daaa37dc3a':
  Only use mDefaultDns if the network claims to offer Internet
2014-12-02 07:07:41 +00:00
Lorenzo Colitti
89f234c56b am 28ca40ff: am 425aacdc: 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
2014-12-02 07:00:45 +00:00
Lorenzo Colitti
425aacdce0 Merge "Only use mDefaultDns if the network claims to offer Internet" into lmp-mr1-dev 2014-12-02 06:47:52 +00:00
Jeremy Joslin
2cb143348b am f8d0233b: am 33783a96: am 500f7811: Merge "Fix the ordering of extra values in the PI." into lmp-mr1-dev
* commit 'f8d0233b09c95860fa816c3b60372633a6a8b63e':
  Fix the ordering of extra values in the PI.
2014-12-01 20:07:32 +00:00
Jeremy Joslin
f8d0233b09 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.
2014-12-01 20:01:02 +00:00
Lorenzo Colitti
20068c2d12 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
2014-12-02 03:40:16 +09:00
Jeremy Joslin
de802a29a1 Fix the ordering of extra values in the PI.
Bug: 18539720
Change-Id: I6bb69394b05923ca25bc1b4902bc2540a13812bd
2014-11-26 14:24:15 -08:00
Paul Jensen
dbb383e443 am d1c7d285: am 58a493ac: am 1d27e7d6: Merge "Don\'t let NetworkMonitor state stop user-initiated transitions." into lmp-mr1-dev
* commit 'd1c7d28584cfb42abfd455ae478feb8b4426c746':
  Don't let NetworkMonitor state stop user-initiated transitions.
2014-11-26 19:42:10 +00:00
Paul Jensen
d1c7d28584 am 58a493ac: am 1d27e7d6: 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.
2014-11-26 18:43:29 +00:00
Paul Jensen
1d27e7d678 Merge "Don't let NetworkMonitor state stop user-initiated transitions." into lmp-mr1-dev 2014-11-26 12:05:01 +00:00
Erik Kline
bd49990557 Revert some verbose logging from ag/489226
Bug: 18171889
Change-Id: I582a17b2272746e04717ac8da1d6984ff187ddf6
2014-11-26 09:01:16 +09:00
Erik Kline
ec6a80208e Merge "Map TYPE_VPN integer to "VPN" string." 2014-11-25 18:46:37 +00:00
Jeff Davidson
c08f4ac258 am 6fdf2a17: am 30ddc724: 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.
2014-11-25 17:49:39 +00:00
Paul Jensen
f5ca486ba0 am 080b02fc: am b5f79d66: 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.
2014-11-25 17:37:54 +00:00
Sreeram Ramachandran
f7bc40c6b5 am 608ea322: am 04f46a02: Merge "Delete unused/non-working code." into lmp-mr1-dev
* commit '608ea322868385aaa46c20887795e72bf7068479':
  Delete unused/non-working code.
2014-11-25 15:10:20 +00:00
Sreeram Ramachandran
7faa2a28d9 am 4096a310: am dadd493c: Merge "Allow VPNs to specify their underlying networks." into lmp-mr1-dev
* commit '4096a3107b070339ba06102a32a368f28a31f9a4':
  Allow VPNs to specify their underlying networks.
2014-11-25 15:10:14 +00:00