Commit Graph

1921 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
78452f1b8d Merge "Fix network usage stats on 464xlat tethered." into pi-dev 2018-04-02 23:09:50 +00:00
Lorenzo Colitti
e5161662a6 Merge "Allow applications to query for foreground/background data usage." into pi-dev 2018-04-02 22:20:03 +00:00
Remi NGUYEN VAN
38ff833161 [automerger skipped] Merge "Add method to NetworkStatsService for UID stats." into pi-dev
am: 4cac91f292  -s ours

Change-Id: I4182b2dfad1f40dd29da8c3612cf0dbc4038aa7b
2018-04-02 19:43:54 +00:00
Remi NGUYEN VAN
0023be9ea9 Fix network usage stats on 464xlat tethered.
Usage stats corrections for 464xlat in NetworkStatsFactory are not applied
to tethered traffic. Add adjustments in NetworkStatsService. After
migrating external callers off NetworkStatsFactory, we will be able to
only apply adjustments in NetworkStatsService and remove stacked
interface tracking from NetworkStatsFactory.
Bug: 72107146
Fixes: 72107146
Test: runtest frameworks-net & manual - checked corrected network usage
Merged-In: Ieb25c41c651499fdd01225ae5ac21d95e3d823f5
Merged-In: I016722f3a0ae2ae0a1d48bfacc4fe07ee3578ef7
(cherry-pick of aosp I5ce450e616b4fddf21f2a491fe5d0c9e9f969bda)

Change-Id: Id41cf22a0f9a63cb1832e9375bfb045861f08e52
2018-04-02 13:30:02 +00:00
Lorenzo Colitti
b0efeaf855 Allow applications to query for foreground/background data usage.
Currently the NetworkStatsManager APIs allow applications to
query for their own data usage by UID and tag, but do not allow
applications to query by foreground/background state.

This is causing popular apps to resort to parsing xt_qtaguid
stats files directly. Because this is no longer allowed for apps
targeting P and above, provide replacement functionality.

This API allows apps to query for data usage for a given state,
but not to receive data usage broken down by state. This is
consistent with how the current UID and tag APIs work. It is also
not an undue burden on apps: there are currently only two states
of interest (FOREGROUND and everything else), and even if we add
states in the future, unmodified apps can still obtain total
traffic using STATE_ALL.

Bug: 72977484
Test: New CTS test added in other change in this topic.
Change-Id: Ic8c9194569ffd599b49e4a8197c5c2ea0ec3f7f7
2018-04-02 19:58:24 +09:00
android-build-team Robot
2efc989528 Snap for 4693955 from 4cac91f292 to pi-release
Change-Id: I6e6f83688e11a4b7b20c32e170e39c5f7abbcadb
2018-04-02 07:22:18 +00:00
Remi NGUYEN VAN
4cac91f292 Merge "Add method to NetworkStatsService for UID stats." into pi-dev 2018-04-02 05:40:04 +00:00
android-build-team Robot
0a74eab99d Snap for 4693621 from 07a75e0f9f93980ea52e3ff337c8f4da504fb8e2 to pi-release
Change-Id: I8e050f7507a6553a58714dc85fcfbf9c30f18b81
2018-04-01 07:24:29 +00:00
Benedict Wong
0daca16b23 [automerger skipped] Merge "Disallow Reserved SPI Allocation" into pi-dev
am: 97e1f5b953  -s ours

Change-Id: I80f554392a01a4942b5c4927b8ad13d11dd5490a
2018-03-31 01:30:03 +00:00
Nathan Harold
2ca5629668 [automerger skipped] Disallow Reserved SPI Allocation
am: 1b88f0e6ab  -s ours

Change-Id: I64fb79980348f96116ad73893571babe3d7d29a6
2018-03-31 01:05:18 +00:00
Benedict Wong
4bc550c5d1 [automerger skipped] Merge changes from topic "encap-api" into pi-dev
am: cafd11d598  -s ours

Change-Id: I19ea85409c7b8653a734e74afc092959e91a0aad
2018-03-30 22:57:46 +00:00
Benedict Wong
97e1f5b953 Merge "Disallow Reserved SPI Allocation" into pi-dev 2018-03-30 22:29:26 +00:00
Benedict Wong
addb481748 [automerger skipped] Require explicitly supplied truncation length
am: ad2615cae5  -s ours

Change-Id: I873ba85ee623a445c2ade21f656bd56e8a0fdeed
2018-03-30 22:28:03 +00:00
Benedict Wong
cafd11d598 Merge changes from topic "encap-api" into pi-dev
* changes:
  Require explicitly supplied truncation length
  Clarify UDP encapsulation socket API
2018-03-30 20:28:19 +00:00
Remi NGUYEN VAN
8edbb9b98a [automerger skipped] Merge "Allow null subscriberId in NetworkStatsManager." into pi-dev
am: 66fcefd311  -s ours

Change-Id: I6e8983cc087a8a42e1404bb5f99bcd297b0ff313
2018-03-30 15:55:32 +00:00
Benedict Wong
693f1beccc [automerger skipped] Merge "Add documentation for TCP interactions with transforms" into pi-dev
am: 0f57fe460b  -s ours

Change-Id: I6f24e8fbffedccbbce98c8bfede66ffc764a58ec
2018-03-30 10:43:36 +00:00
Remi NGUYEN VAN
944eab8689 Add method to NetworkStatsService for UID stats.
Useful for clients such as BatteryStats which currently rely
on NetworkStatsFactory. Data at that stage is incomplete as
it does not account for tethering, VT data and corresponding
464xlat corrections.

Test: runtest frameworks-net, CTS tests pass.
Bug: b/72107146
Merged-In: I31c5b9b4a7c6e72910152415894a137f000a5858
Merged-In: I2527d95000c7500c824ede70f87ecb38e21ed323
(cherry picked from aosp 088ff6824f13145ea52207bdead0d7e454a6f3ce)

Change-Id: Ie80f1bb21124241f3414f9be77aceac9a44ec6d1
2018-03-30 18:58:18 +09:00
Nathan Harold
1b88f0e6ab Disallow Reserved SPI Allocation
Disallow the allocation of SPIs in the range
reserved for future use by RFC 4303.

Bug: 77205120
Test: runtest frameworks-net
Merged-In: I05e26ed34b5871f1a07d5bd7b58b79a64cd74b67
Change-Id: I05e26ed34b5871f1a07d5bd7b58b79a64cd74b67
(cherry picked from commit 7f606ee8e57d9d8b7c5d0cb2a78421aa02efb385)
2018-03-30 01:54:36 -07:00
Lorenzo Colitti
dcc60bcef3 Merge "Disallow Reserved SPI Allocation" am: 9c68e5a5b7
am: 62e6b774e3

Change-Id: Ic5c7857754a04ae7238414b55a1e5ab653d62f6b
2018-03-30 08:33:06 +00:00
Lorenzo Colitti
9951c93f3c Merge "Require explicitly supplied truncation length" am: dc77e9c3da
am: 2749432646

Change-Id: I347bfd43be54d162dea831770ab08d792ea1443f
2018-03-30 07:45:04 +00:00
Remi NGUYEN VAN
66fcefd311 Merge "Allow null subscriberId in NetworkStatsManager." into pi-dev 2018-03-30 07:39:23 +00:00
Lorenzo Colitti
3baa94c23f Merge "Clarify UDP encapsulation socket API" am: 0cf9421304
am: a12c8fe218

Change-Id: I5fcf79691c670e710e46b3a9eac8a580c44028fb
2018-03-30 06:48:17 +00:00
Lorenzo Colitti
9c68e5a5b7 Merge "Disallow Reserved SPI Allocation" 2018-03-30 06:16:17 +00:00
Benedict Wong
ad2615cae5 Require explicitly supplied truncation length
Instead of providing default truncation lengths (based on RFC or
otherwise), this change imposes a restriction that the truncation length
must be supplied for all auth or aead algorithms.

Bug: 77204048
Test: Updated tests, ran on walleye
Merged-In: I4a0e2e71aa97259e56f44e7c8a2ce53135708d97
Change-Id: I4a0e2e71aa97259e56f44e7c8a2ce53135708d97
(cherry picked from commit bb7f2820f5bcccf8618078c2cbe4ea9836797e3b)
2018-03-29 23:07:42 -07:00
Benedict Wong
a386e37eab Clarify UDP encapsulation socket API
This change updates the getSocket() methods for IPsec to improve clarity
of the return types, both for public APIs, and internal-only methods.

Bug: 72473753
Test: APIs updated, CTS + unit tests ran.
Merged-In: I0afebd432c5d04c47c93daa1ce616d712aa323d7
Change-Id: I0afebd432c5d04c47c93daa1ce616d712aa323d7
(cherry picked from commit 4c987ebade580d4abc8a3d549e0df90baab33140)
2018-03-29 23:05:42 -07:00
Lorenzo Colitti
dc77e9c3da Merge "Require explicitly supplied truncation length" 2018-03-30 04:59:22 +00:00
Lorenzo Colitti
0cf9421304 Merge "Clarify UDP encapsulation socket API" 2018-03-30 04:58:47 +00:00
Remi NGUYEN VAN
9968ec4f14 Allow null subscriberId in NetworkStatsManager.
Use a MATCH_MOBILE_WILDCARD template to avoid filtering by
subscriberId when querying statistics from NetworkStatsService.

Bug: 74038898
Change-Id: I8296220472a9ba37044dd1a5ede9bdb45d3ed339
Fixes: 74038898
Test: runtest frameworks-net, CTS tests pass
Merged-In: I1e4e283c6eaecf33d12488e41e0c524f6ff83954
Merged-In: Ia84d2c7cc63bf8b8bf30f133e0382fd7103bf490
(cherry-picked from aosp I4b39e7031416cb33b23d89aa36ff0f774eaa942f)
2018-03-30 12:18:23 +09:00
Benedict Wong
0f57fe460b Merge "Add documentation for TCP interactions with transforms" into pi-dev 2018-03-30 00:01:43 +00:00
Remi NGUYEN VAN
f11ee9cd95 Merge "Fix network usage stats on 464xlat tethered." am: 83088dcd8e
am: aa20932ff1

Change-Id: I016722f3a0ae2ae0a1d48bfacc4fe07ee3578ef7
2018-03-29 07:46:34 +00:00
Benedict Wong
543e30cd5d Require explicitly supplied truncation length
Instead of providing default truncation lengths (based on RFC or
otherwise), this change imposes a restriction that the truncation length
must be supplied for all auth or aead algorithms.

Bug: 77204048
Test: Updated tests, ran on walleye
Change-Id: I4a0e2e71aa97259e56f44e7c8a2ce53135708d97
2018-03-28 18:02:54 -07:00
Nathan Harold
c37f6f6b89 Disallow Reserved SPI Allocation
Disallow the allocation of SPIs in the range
reserved for future use by RFC 4303.

Bug: 77205120
Test: runtest frameworks-net
Change-Id: I05e26ed34b5871f1a07d5bd7b58b79a64cd74b67
2018-03-28 16:08:57 +00:00
android-build-team Robot
a63e18784f Snap for 4683893 from f0edf03edaaf15a48295ce87baae93e1a7db0122 to pi-release
Change-Id: I8a450a70da831c3964896b1ba09467cf62f9c138
2018-03-28 07:25:50 +00:00
Remi NGUYEN VAN
857952d498 Fix network usage stats on 464xlat tethered.
Usage stats corrections for 464xlat in NetworkStatsFactory are not applied
to tethered traffic. Add adjustments in NetworkStatsService. After
migrating external callers off NetworkStatsFactory, we will be able to
only apply adjustments in NetworkStatsService and remove stacked
interface tracking from NetworkStatsFactory.
Bug: 72107146
Fixes: 72107146
Test: runtest frameworks-net & manual - checked corrected network usage

Change-Id: I5ce450e616b4fddf21f2a491fe5d0c9e9f969bda
2018-03-28 12:14:14 +09:00
Benedict Wong
50b0ab8086 Clarify UDP encapsulation socket API
This change updates the getSocket() methods for IPsec to improve clarity
of the return types, both for public APIs, and internal-only methods.

Bug: 72473753
Test: APIs updated, CTS + unit tests ran.
Change-Id: I0afebd432c5d04c47c93daa1ce616d712aa323d7
2018-03-27 19:46:50 -07:00
Benedict Wong
3465252be3 Merge "Add documentation for TCP interactions with transforms" am: 0721bd0ff4
am: 28427a9c4d

Change-Id: I3aef3f0f16929b60cd9bb293373d18a3988076a7
2018-03-28 01:26:33 +00:00
Benedict Wong
c5106f3cfc Add documentation for TCP interactions with transforms
Updates API documentation to mention that TCP sockets where transforms
are deactivated will not send FIN packets.

Bug: 74851550
Test: API updates only
Merged-In: I8169f221c8c747538a8bddfbf02dcc73c9337189
Change-Id: I8169f221c8c747538a8bddfbf02dcc73c9337189
(cherry picked from commit 7d31a2f3579eff80c3cef07feadf77dbfcbfcd17)
2018-03-27 15:20:32 -07:00
Benedict Wong
0721bd0ff4 Merge "Add documentation for TCP interactions with transforms" 2018-03-27 22:19:37 +00:00
Jeff Sharkey
367d402c6e Merge "Don't let callers OOM the system process." into pi-dev
am: 662cedc67c

Change-Id: I9698aab0d98c564ad7779462485576121e9bc815
2018-03-27 20:08:50 +00:00
TreeHugger Robot
662cedc67c Merge "Don't let callers OOM the system process." into pi-dev 2018-03-27 19:05:24 +00:00
Jeff Sharkey
33851627b0 Don't let callers OOM the system process.
Constrain our default history size to 180 days; if we end up needing
more, we'll dynamically grow the history object.

Test: manual
Bug: 70916680
Change-Id: Id885f9800ad8f45fb0c1a89dab5a4b10ffd9e2f2
2018-03-27 11:09:18 -06:00
android-build-team Robot
38d995bf0f Snap for 4680594 from bf47ae315220dc0ad9d360d063e2fe9fe01c2990 to pi-release
Change-Id: Idb73fa3ffe3aacbe11a4175b1fbbb169a6c826be
2018-03-27 07:26:17 +00:00
Jeff Sharkey
80ab927810 Merge "API council requested tweaks to TrafficStats." into pi-dev
am: 9a6bc76ee8

Change-Id: I6b969377a6e268c1377fcc17f2443cb73072fda2
2018-03-27 03:57:46 +00:00
Jeff Sharkey
17a3875fb6 API council requested tweaks to TrafficStats.
Test: atest android.appsecurity.cts.AppSecurityTests#testAppFailAccessPrivateData
Bug: 71584606
Change-Id: I4be8a47d54a04f17cbaac735d543ff7d6370376d
2018-03-26 13:12:39 -06:00
Benedict Wong
0a8e73c1b3 Add documentation for TCP interactions with transforms
Updates API documentation to mention that TCP sockets where transforms
are deactivated will not send FIN packets.

Bug: 74851550
Test: API updates only
Change-Id: I8169f221c8c747538a8bddfbf02dcc73c9337189
2018-03-26 11:33:05 -07:00
android-build-team Robot
5fcf723341 Snap for 4677756 from 6da53af9c55ba2231cd2f47c7dffb150f2c22a89 to pi-release
Change-Id: I97ad116a96610d781a8652edd3535863294657f5
2018-03-25 07:25:42 +00:00
Remi NGUYEN VAN
a2d63a7043 Merge "Add method to NetworkStatsService for UID stats." am: db89ca3c12
am: af2fafe743

Change-Id: I2527d95000c7500c824ede70f87ecb38e21ed323
2018-03-23 04:01:09 +00:00
Nathan Harold
07a10f38c7 Merge "Add MANAGE_IPSEC_TUNNELS Permission" into pi-dev
am: 0205fd1064

Change-Id: I7f1c987901c3634fb81d93402d5cb0af80fff11e
2018-03-23 01:57:41 +00:00
Nathan Harold
00e77247eb Add MANAGE_IPSEC_TUNNELS Permission
Add a new MANAGE_IPSEC_TUNNELS permission and
protect all IPsec Tunnel mode APIs with it.
This permission is only granted to the system or
through an AppOp.

Bug: 66955045
Test: compilation
Change-Id: I0f618373b500c493ef2211bece681f74652a1833
2018-03-22 14:16:50 -07:00
Nathan Harold
dea33f2b3c [automerger skipped]Merge "Add NonNull Annotations To IpSec API Surface" into pi-dev
am: 9594175655  -s ours

Change-Id: Ieca39ff6788ca7293ff95516120b947e502f4085
2018-03-22 19:11:11 +00:00