Commit Graph

287 Commits

Author SHA1 Message Date
The Android Automerger
d2ae36db15 merge in jb-release history after reset to jb-dev 2012-05-14 07:03:27 -07:00
Jeff Sharkey
50c921475b Merge "Avoid updating thresholds during shutdown." into jb-dev 2012-05-10 10:35:45 -07:00
The Android Automerger
3894ae6ee3 merge in jb-release history after reset to jb-dev 2012-05-10 07:03:16 -07:00
Jeff Sharkey
b9439a4c2a Avoid updating thresholds during shutdown.
Bug: 6472388
Change-Id: I70e1ed5dc75056840f2f0b130ce0dfecb06f385e
2012-05-09 19:59:07 -07:00
Jeff Sharkey
ccd90baa9d Merge "Recover from Throwable in FileRotator, dump." into jb-dev 2012-05-09 14:36:40 -07:00
Irfan Sheriff
0e2eb98971 Merge "API review fixes" into jb-dev 2012-05-09 14:04:04 -07:00
Jeff Sharkey
585bc91d22 Recover from Throwable in FileRotator, dump.
In rewriteSingle(), catch Throwable to rollback to backup file,
instead of just IOException. Also add dumpAll() to pack up contents
for later debugging, and use it when encountering bad stats.

Bug: 6467868
Change-Id: Ic8e287cf5a235706811a304a88d71d11d3a79cd4
2012-05-09 13:43:19 -07:00
Irfan Sheriff
e4c42f4026 API review fixes
- Remove the notion of channel from an application perspective
- Remove the use of DnsSd as part of API and add a protocol type to allow
future extensions
- Use the listener object as a handler for stop and unregister operations. Also,
we now allow multiple active discovery operations.
- Remove init/deinit operations in favour of setting up construction

Bug:6434844
Change-Id: Id15521d571aac9c4053d81184ad66dfc54f636de
2012-05-09 11:48:42 -07:00
The Android Automerger
729ad3c0bf merge in jb-release history after reset to jb-dev 2012-05-08 08:20:07 -07:00
Jeff Sharkey
24a69bbd60 Ack, wrap advisePersistThreshold() in lock.
Bug: 6449725
Change-Id: I702dc2ff9d4b237c46d89bcae41289bc3e9ef2f8
2012-05-07 11:08:49 -07:00
The Android Automerger
b4bb6ee628 merge in jb-release history after reset to jb-dev 2012-05-06 14:21:36 -07:00
Jeff Sharkey
c78bc60039 Reduce persist threshold for lower warning/limit.
Default is 2MB persist threshold, but even that can be substantial
for devices on 100MB/month plans. This change gradually reduces the
persist threshold up to 8x lower (256kb outstanding) based on lowest
active policy.

Bug: 5382676
Change-Id: Ief4e8cdb169bfb151a3d1b45722a8eaa01926508
2012-05-03 12:12:10 -07:00
Jeff Sharkey
cfed18ad5b Begin collecting xtables iface counters.
Add method to parse new iface_stat_fmt proc stats, or return null
when kernel support is unavailable. Add test and remove older, unused
parsing code. Create new "xt" recorder to persist the new xtables
counters when available.

Add SSID support to NetworkIdentity to fix policy tests.

Bug: 6422414
Change-Id: I77f70e9acb79a559ab626f3af5c4f3599801ed43
2012-05-01 21:04:26 -07:00
The Android Automerger
9a1adfe715 merge in jb-release history after reset to jb-dev 2012-04-25 07:48:15 -07:00
Robert Greenwalt
b4e20cdc76 Merge "Allow quoted strings from NativeDaemonConnector" 2012-04-24 09:55:02 -07:00
The Android Automerger
0c447e9389 merge in jb-release history after reset to master 2012-04-24 07:03:02 -07:00
Jeff Sharkey
f6d43ea959 Clear identity when checking if bandwidth enabled.
Change-Id: I0f10f86dc14483e29609057c671454b322da4826
2012-04-23 14:39:19 -07:00
The Android Automerger
31cb87f84c merge in jb-release history after reset to master 2012-04-23 07:03:59 -07:00
Jeff Sharkey
32c773b16a Better assertions when bandwidth module disabled.
Also disable some verbose logging in WifiStateTracker.

Bug: 6368329
Change-Id: I9a5219bc1b3fd870468f7de46cdf4f173a437c59
2012-04-21 15:36:48 -07:00
Robert Greenwalt
2a9efc2c6e Allow quoted strings from NativeDaemonConnector
Previously we'd only handled quoted strings going into NDC.  This
change auto-handles quoted strings in broadcasts and allows
protocol handlers to request de-quoted elements when needed instead
of using the generic split(" ").

bug: 6353048
Change-Id: I8a07be86411063ed1b402294edc399b4cc076da5
2012-04-20 14:56:32 -07:00
Irfan Sheriff
52fc83a79a Fix build
Change-Id: I1968e0d7d25f613fa6cf72f82d79f17224e3d5ab
2012-04-19 10:26:34 -07:00
Irfan Sheriff
fb97ffe162 Add network service discovery broadcast
Allows apps to know if user has the feature turned off

Change-Id: I2d2fecb148eb4e48eb4aea51d1d7643a82df5c52
2012-04-19 09:54:40 -07:00
Irfan Sheriff
7500665eb7 Add user control to turn on/off nsd
Change-Id: Ide3cc20adb21ac6dffaf6b9b9136d77a129afa3b
2012-04-19 09:52:09 -07:00
The Android Automerger
ee1921df7e merge in jb-release history after reset to master 2012-04-18 07:03:09 -07:00
Irfan Sheriff
81394337bc Merge "Open network service discovery API" 2012-04-17 11:39:08 -07:00
The Android Automerger
1b35e30760 merge in jb-release history after reset to master 2012-04-17 07:02:37 -07:00
Jeff Sharkey
f133bbfff7 Merge "Move TrafficStats iface counters to xt_qtaguid." 2012-04-16 12:11:21 -07:00
The Android Automerger
18c1879142 merge in jb-release history after reset to master 2012-04-16 07:03:28 -07:00
Irfan Sheriff
18da1320fe Open network service discovery API
Add support for DNS based network service discovery API. This
allows applications to discover and resolve applications on a
local network such as Wi-Fi

Change-Id: Ie89895edd35d12b7f7a23fb5fed36cb2b2079f7a
2012-04-15 17:09:48 -07:00
Irfan Sheriff
287e63bbb6 Merge "Bonjour fixes" 2012-04-12 17:55:15 -07:00
Jeff Sharkey
8308b9b2af Move TrafficStats iface counters to xt_qtaguid.
Use xt_qtaguid iface_stat_all counters, which are monotonic during
a single boot.

Track all ifaces associated with mobile networks since boot, and
move TrafficStats to using these ifaces.  This will include usage of
networks omitted from config_data_usage_network_types, specifically
on devices that recycle network interfaces across APNs.

Split wildcard template matching, and move NetworkStatsService to
use mobile wildcard when logging stats.

Bug: 5324515
Change-Id: I2211c374c05d1b598cc647f2f873630538955ffe
2012-04-12 14:53:32 -07:00
Irfan Sheriff
e8de246bb4 Bonjour fixes
Change-Id: I1df1dc470bb42c84abc7e1a46bedf9f206910b65
2012-04-12 12:08:51 -07:00
The Android Automerger
7317788f5f merge in jb-release history after reset to master 2012-04-10 07:03:55 -07:00
Jeff Sharkey
1ba1b673f5 Migrate to @Override to remove warnings.
Bug: 6303344
Change-Id: I0d33b2ed448467379d576ccd71fb5ae20c878852
2012-04-09 10:57:21 -07:00
Jeff Sharkey
27421b1665 Splice operations before collapsing ifaces.
Bug: 6241038
Change-Id: Ide9058703f7305df8fb070af149ddce0653a0abf
2012-04-09 10:27:55 -07:00
The Android Automerger
ddbb91a9de merge in jb-release history after reset to master 2012-04-09 07:04:01 -07:00
Jeff Sharkey
920d9046bc INetworkStatsSession with lifecycle for caching.
Users outside system_server now explicitly communicate their
lifecycle, which keeps a strong-reference chain to any fully loaded
NetworkStatsCollection histories.

Bug: 6236498
Change-Id: I8e22739b6e89a626b676967a736d7117fd000778
2012-04-06 13:38:29 -07:00
Jeff Sharkey
3bd888f411 Support metered Wi-Fi NetworkPolicy.
Add networkId field to NetworkIdentity to identify Wi-Fi networks by
SSID.  Add support for policies without usage cycles.

Only apply mobile policies when SIM state is ready, which is cleaner
than just checking for airplane mode.  Also avoids creating no-op
default policies when subscriberId is null.

Bug: 3001465, 3291052
Change-Id: I1f8aaa49a5db306df022c402ea7f3f5d4bc0cfc7
2012-04-05 16:02:25 -07:00
The Android Automerger
8686eb3990 merge in jb-release history after reset to master 2012-04-05 07:03:55 -07:00
Irfan Sheriff
f3f68819df Fix build
Add missing file

Change-Id: I5ed1827e1183c37741675ce4d198d3e200c5fb94
2012-04-04 13:20:20 -07:00
Irfan Sheriff
77ec5581ed Add initial framework for DNS service discovery
Change-Id: I53c0b7ebfd75e520ebb7553612f1aa8413b6b79b
2012-04-04 12:24:56 -07:00
The Android Automerger
c7c3dad5a3 merge in jb-release history after reset to master 2012-03-19 07:03:27 -07:00
Jeff Sharkey
e4474c8bfe Remove network subtype check when building template.
Change-Id: I069d82a77d27dae6bfffe3b7e65d73b63f258ad9
2012-03-16 11:54:01 -07:00
Jeff Sharkey
8e38f3ddde Combine network subtypes by default.
Subtype controls (3G-vs-4G) aren't exposed in the UI, so tracking
data with that granularity creates unnecessary overhead. For example,
some GSM networks can regularly flap between two subtypes.

Bug: 6118868
Change-Id: Id098891dba52336d00d0f96632a7924e228b4713
2012-03-16 11:35:29 -07:00
The Android Automerger
fc661a8b12 merge in jb-release history after reset to master 2012-03-14 07:03:18 -07:00
Robert Greenwalt
69e1f3ae65 Record the trimmed cmd string for logs
The over the wire command includes a \0 that mangles log messages.
bug:6149176

Change-Id: I77d4e443f1966bff060f1b97570851f7549fee8e
2012-03-13 12:30:14 -07:00
The Android Automerger
1c083a4c4a merge in jb-release history after reset to master 2012-03-07 07:01:44 -08:00
Jeff Sharkey
d9e33ce00b Merge "Avoid updating network stats after shutdown." 2012-03-06 20:04:26 -08:00
Jeff Sharkey
0097f85348 Avoid updating network stats after shutdown.
Bug: 6109476
Change-Id: I9a3a8b182c8fa56d83ddc755d204d5b267c9bc5d
2012-03-06 19:59:57 -08:00
Robert Greenwalt
7f03e44443 Make NDC not block forever and handle restart.
Still possible for netd to get wedged but system won't die because of it.
Leads the way to having forking netd - then only individual commands would
wedge, promoting stability.

bug:5864209
bug:6019952
Change-Id: I43e4c5072863b8b812d4fe24d30d92eb1a11651a
2012-02-29 16:53:27 -08:00