Commit Graph

8097 Commits

Author SHA1 Message Date
Jeff Sharkey
aac2c50385 Move battery stats to xt_qtaguid for data stats.
Replace TrafficStats calls by reading values from xt_qtaguid kernel
module. To keep BatteryStatsImpl changes lightweight, cache recently
parsed stats. Tracks mobile ifaces from ConnectivityService.

Refactor xt_qtaguid parsing into factory outside of NMS. Add stats
grouping based on UID, and total based on limiting filters like iface
prefix and UID.

Bug: 4902271
Change-Id: I533f116c434b77f93355bf95b839e7478528505b
2011-10-09 13:49:08 -07:00
The Android Automerger
8cc55a22bc merge in ics-release history after reset to master 2011-10-09 07:00:35 -07:00
Scott Main
f58b7d82d0 docs: some helpful javadocs for network info
Change-Id: I8f1879bf10acd6371a76f11a8e5ec08643c3f943
2011-10-06 19:26:48 -07:00
Scott Main
5058914700 docs: deprecate thingy
Change-Id: I579824680f3b5110d56981becaaf81f917989e7e
2011-10-06 18:32:43 -07:00
Chia-chi Yeh
ec49c91929 Merge "VPN: temporarily disable the default proxy when VPN is active." 2011-10-06 15:29:50 -07:00
Chia-chi Yeh
f386f9ec7e Merge "ConnectivityService: detach the logic of global proxy." 2011-10-06 15:29:43 -07:00
Jeff Sharkey
7aaf57609e am a50d0f89: Merge "Hide quota APIs until finalized." into ics-factoryrom
* commit 'a50d0f8985d811a6a2f49aa65e31892048e96ccf':
  Hide quota APIs until finalized.
2011-10-06 11:22:40 -07:00
Jeff Sharkey
eb3e8c66cb Hide quota APIs until finalized.
Bug: 5383656
Change-Id: Ia2a978a6ff2ee642b0ea4d7d6b8857b7efffd612
2011-10-06 10:50:09 -07:00
The Android Automerger
78c740e6c4 merge in ics-release history after reset to master 2011-10-05 06:58:56 -07:00
Jeff Sharkey
d49f1a59f9 Read iface stats from single proc file.
When available, use single "iface_stat_all" file instead of reading
values from dozens of files scattered across proc.  Tests to verify.

Bug: 5397840
Change-Id: I0247be518436c1f79b32c4b72216739f49a9e8cc
2011-10-04 13:22:39 -07:00
Jeff Sharkey
ad268036a4 Track xtables summary, move tether stats, time.
Begin tracking xtables summary of data usage to compare with values
reported from /proc/net/dev.  Roll tethering directly into UID stats
to trigger UID stats persisting when crossing threshold.

Include xtables summary and authoritative time in samples.

Bug: 5373561, 5397882, 5381980
Change-Id: Ib7945522caadfbe0864fdf391582dc820f4f371e
2011-10-03 17:21:05 -07:00
Chia-chi Yeh
763a11c5bd VPN: temporarily disable the default proxy when VPN is active.
Bug: 5361858
Change-Id: I99e84cce9c99ff1f5fdccbfd3bfb9cf496ac541c
2011-10-03 15:34:04 -07:00
Chia-chi Yeh
ae16661808 ConnectivityService: detach the logic of global proxy.
The current implementation of global proxy is dead,
and it will be removed completely in separate changes.

Change-Id: I54f6b3960f761483d28d808e99db4c71c9c0348d
2011-10-03 14:04:42 -07:00
The Android Automerger
853de1d9e9 merge in ics-release history after reset to master 2011-09-30 06:45:07 -07:00
Lorenzo Colitti
aa035385d3 Revert "Tell the resolver what protocols to use."
Change Ife82a8d8 broke IPv6 on wifi. Change I4e3a69ea is
an alternate approach that does not require any framework
changes.

Bug: 5284168
Change-Id: Ib6e002aa23700adc71051cf6b76860545497dbf4
2011-09-28 23:07:03 -07:00
The Android Automerger
1724d7dbdd merge in ics-release history after reset to master 2011-09-26 06:59:53 -07:00
Jeff Sharkey
6d38bd1bc3 Merge "Watch network subtype, tethering teardown, empty." 2011-09-25 23:44:10 -07:00
The Android Automerger
3afd130d3b merge in ics-release history after reset to master 2011-09-25 07:00:19 -07:00
Robert Greenwalt
bc75548c32 am c1abed5b: Merge "Tell the resolver what protocols to use." into ics-factoryrom
* commit 'c1abed5b5b202d7dec168959b9b8cb3f78ccbad3':
  Tell the resolver what protocols to use.
2011-09-22 23:39:53 -07:00
Robert Greenwalt
c1abed5b5b Merge "Tell the resolver what protocols to use." into ics-factoryrom 2011-09-22 16:57:43 -07:00
Robert Greenwalt
521aaa48e2 Tell the resolver what protocols to use.
Stop guessing based on the connectivity of the default route and use the correct
v4/v6 proto for your pid.

bug:5284168
Change-Id: Ife82a8d8e54c0ace2bc9e8a624b11d29a4e285e2
2011-09-22 16:43:15 -07:00
Jeff Sharkey
b6188a1aac Watch network subtype, tethering teardown, empty.
Watch for changes to telephony network subtype, and update iface
mapping to persist stats under correct type.  Update network stats
before removing tethering NAT rules.

Skip recording that would create empty historical buckets.  Query UID
stats before iface stats to always skew positive when counters are
actively rolling forward.

Bug: 5360042, 5359860, 5335674, 5334448
Change-Id: I8aa37b568e8ffb70647218aa1aff5195d3e44d5a
2011-09-22 16:19:06 -07:00
Wink Saville
693ee83a6c am 904fb9d7: Merge "Notify people of empty proxies too." into ics-factoryrom
* commit '904fb9d79cc72879e4c6767c219ec78feda8e62b':
  Notify people of empty proxies too.
2011-09-22 10:53:40 -07:00
The Android Automerger
73b5a19829 merge in ics-release history after reset to master 2011-09-22 07:00:05 -07:00
Robert Greenwalt
90b574ef05 Notify people of empty proxies too.
We were telling people when the proxy changed, except if it was changed to null.
bug:5263946

Change-Id: I83416dac8fe992168a8aafd5676f9faee4e484d0
2011-09-21 16:37:34 -07:00
Wink Saville
933cb47f64 am 4aa8d943: Merge "Reduce connectivity logging" into ics-factoryrom
* commit '4aa8d943a970008915b703758743b107927d96fa':
  Reduce connectivity logging
2011-09-21 14:14:28 -07:00
Wink Saville
a7d56571c2 Reduce connectivity logging
Change-Id: I5d45b8fbcd01e42df7f2b1cf02fb5b226128abb8
2011-09-21 11:05:43 -07:00
The Android Automerger
a9ae5b7c80 merge in ics-release history after reset to master 2011-09-21 07:00:07 -07:00
Irfan Sheriff
4aa0b2ece5 Change hostname format to conform to specification
Underscore is not allowed as per RFC 952

Bug: 5348537
Change-Id: I618c137fd54ecf36cece3b9eba39c51cda3aeac3
2011-09-20 15:22:00 -07:00
The Android Automerger
c9ce515a2a merge in ics-release history after reset to master 2011-09-19 06:59:57 -07:00
Jeff Sharkey
f444762587 Sample atomic network stats buckets, full poll.
When sampling network stats, always use atomic buckets instead of
interpolating.  Always poll iface and UID together so we distribute
into buckets equally.  Move stale bucket trimming to just before
writing stats.

Bug: 5321340
Change-Id: I78a2226778a79c875f3668336e39ea24a7b4d5c4
2011-09-18 16:27:21 -07:00
Jeff Sharkey
c611ea2aac am aaf30173: (-s ours) Merge "DO NOT MERGE: Sample atomic network stats buckets, full poll." into ics-factoryrom
* commit 'aaf301736e923db15918617145069658696be453':
  DO NOT MERGE: Sample atomic network stats buckets, full poll.
2011-09-18 16:21:38 -07:00
Jeff Sharkey
ade8174d53 DO NOT MERGE: Sample atomic network stats buckets, full poll.
When sampling network stats, always use atomic buckets instead of
interpolating.  Always poll iface and UID together so we distribute
into buckets equally.  Move stale bucket trimming to just before
writing stats.

Bug: 5321340
Change-Id: I78a2226778a79c875f3668336e39ea24a7b4d5c4
2011-09-18 16:17:51 -07:00
Jeff Sharkey
8f5e775626 am 3d1d57dc: Merge "Collect and persist tethering stats." into ics-factoryrom
* commit '3d1d57dcdb02ace6af5810bd4ec3f8fad5fc1799':
  Collect and persist tethering stats.
2011-09-18 16:17:39 -07:00
The Android Automerger
733e7f1993 merge in ics-release history after reset to master 2011-09-18 07:00:21 -07:00
Jeff Sharkey
300f08f094 Collect and persist tethering stats.
Use new "gettetherstats" netd command to retrieve statistics for
active tethering connections.  Keep tethering poll events separate
from UID poll, even though they end up same historical structures.

Bug: 5244846
Change-Id: Ia0c5165f6712c12b51586f86c331a2aad4ad6afb
2011-09-16 16:05:51 -07:00
The Android Automerger
bad184a939 merge in ics-release history after reset to master 2011-09-15 06:34:24 -07:00
JP Abgrall
7682298a7d NetworkManagement SocketTagger: Migrate QTagUid support to JNI.
* Instead of javaland trying to write commands to
   /proc/net/xt_qtaguid/ctrl
use the libcutils/qtaguid.c support via JNI.
* Get rid of tagToKernel() handled by qtaguid library.

Requires libcutils changes from c/132538/

Change-Id: I9de5b3fa4a596c56835024c6d376769a0eea7db1
2011-09-15 02:29:03 -07:00
Jeff Sharkey
9c57b7f2ef Merge "Network stats flag to force complete poll." 2011-09-14 21:44:19 -07:00
Jeff Sharkey
d34133cad7 Network stats flag to force complete poll.
Devices currently delay collecting UID stats during common operations
like global alerts to reduce parsing load.  Here we introduce a flag
to always collect UID and iface stats together to aid debugging.

Bug: 5321340
Change-Id: Ia8e1daf1a6f9d5f5cf1f64a04b6b6766ee965ab6
2011-09-14 19:47:05 -07:00
The Android Open Source Project
3b30b92fac Reconcile with gingerbread-release gingerbread-mr4-release honeycomb-LTE-release
Change-Id: I2ef7b37dce08a4012ed7ba1704841fb2af846b76
2011-09-14 07:22:47 -07:00
The Android Automerger
a533b39a78 merge in ics-release history after reset to master 2011-09-14 06:34:13 -07:00
Robert Greenwalt
a8d046103a am ee4e84b3: am 2f835a61: Merge "Make copies of NetworkInfo to give out." into honeycomb-LTE
* commit 'ee4e84b3346b4160b7bd45c134ca7c0d7322b6af':
  Make copies of NetworkInfo to give out.
2011-09-13 14:25:27 -07:00
The Android Automerger
6d9e964f00 merge in ics-release history after reset to master 2011-09-13 06:34:10 -07:00
Jeff Sharkey
4dc0642d32 Data usage structure optimizations.
Driven by traceview hotspots found in Settings UI.

Change-Id: I614a049523c526b7fcd12fffdf53a3e4723623e4
2011-09-12 16:13:20 -07:00
Robert Greenwalt
ab13e9c111 Make copies of NetworkInfo to give out.
Otherwise we'll change it out from under those we've given it too.
bug:5233462

Change-Id: Iffc886849edfa6ced3da1133f9d363e11b2733f8
2011-09-11 16:46:33 -07:00
Robert Greenwalt
ee4e84b334 am 2f835a61: Merge "Make copies of NetworkInfo to give out." into honeycomb-LTE
* commit '2f835a6193c14e27cf761d85ac3ea4c9bd9296f8':
  Make copies of NetworkInfo to give out.
2011-09-09 15:52:42 -07:00
Robert Greenwalt
3084999887 Make copies of NetworkInfo to give out.
Otherwise we'll change it out from under those we've given it too.
bug:5233462

Change-Id: Iffc886849edfa6ced3da1133f9d363e11b2733f8
2011-09-09 15:10:42 -07:00
The Android Automerger
bd4c36e6d0 merge in ics-release history after reset to master 2011-09-08 06:34:13 -07:00
Jeff Sharkey
d1a5951ed9 Poll UID stats during iface changes, enforce idx.
When ifaces change, poll UID stats without persisting, since they
depend on knowing active iface to store correctly.  Log dropped UID
stats when iface is unknown.  Switch to using flags when calling
performPoll().

Enforce that "idx" values are consistent from xt_qtaguid.  Transition
to using Log.wtf() for important checks, mostly around file I/O,
kernel stats parsing, and kernel module control.  Increase stats
persist threshold to 2MB to reduce churn.

Bug: 5269476, 5270106
Change-Id: I721215bfb65127f95775c71cf135e907cd567e92
2011-09-07 18:06:30 -07:00