Commit Graph

1644 Commits

Author SHA1 Message Date
Adrian Roos
ee2ba33204 Merge "API: Clean up redundant and ineffective usages of SystemApi and TestApi"
am: af0e1c2fa5

Change-Id: I016cacee1e1de6c7a8269fc3605ed25716598d9e
2018-12-12 08:33:17 -08:00
Adrian Roos
be53fbb8d5 API: Clean up redundant and ineffective usages of SystemApi and TestApi
Everything that is marked SystemApi or TestApi, but not @hide is still
part of the public SDK, it is therefore not sound to have that combination.

In the future, specifing such a combination will be considered an error
to prevent inadvertently exposing SystemApi and TestApi as public API.

Bug: 115333477
Change-Id: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea
Merged-In: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea
Test: METALAVA_PREPEND_ARGS="--error UnhiddenSystemApi" m checkapi
Exempt-From-Owner-Approval: API cleanup
2018-12-12 15:02:26 +01:00
Adrian Roos
8518275a11 Merge "API: Clean up redundant and ineffective usages of SystemApi and TestApi" 2018-12-12 13:43:34 +00:00
Xin Li
b2f3b9b820 [automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master am: 07ea8a407d -s ours
am: 659576f54f  -s ours

Change-Id: Iadfa0ee17ed14272aeadfac213126175544ed732
2018-12-11 15:34:50 -08:00
Xin Li
659576f54f [automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master
am: 07ea8a407d  -s ours

Change-Id: I81786efa9a194dad95d2a1ee079b1915ea26abd2
2018-12-11 15:04:45 -08:00
Xin Li
6f9c73f8c9 DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
Bug: 120502534
Change-Id: Idc8bfb6d97a869b76cfb87ca1a494201baf9e8bd
2018-12-11 14:13:44 -08:00
Adrian Roos
ef420e9754 API: Clean up redundant and ineffective usages of SystemApi and TestApi
Everything that is marked SystemApi or TestApi, but not @hide is still
part of the public SDK, it is therefore not sound to have that combination.

In the future, specifing such a combination will be considered an error
to prevent inadvertently exposing SystemApi and TestApi as public API.

Bug: 115333477
Change-Id: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea
Test: METALAVA_PREPEND_ARGS="--error UnhiddenSystemApi" m checkapi
Exempt-From-Owner-Approval: API cleanup
2018-12-11 20:38:02 +01:00
Xin Li
07ea8a407d DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master
Bug: 120502534
Change-Id: I7351a1832c4bd2fd86324183ab83e9088d716822
2018-12-10 12:30:19 -08:00
Junyu Lai
83a52f5fb2 Merge "Refactoring of deleting stats in NetworkStats based on uids." am: c8dcfb8b4b am: 2d00948a0c
am: 2d79ef94f8

Change-Id: I29c57276424464afd54e184c369d30a5e9707f14
2018-12-10 03:10:15 -08:00
junyulai
6fe079615b Ignore ipv6 tx traffic on clat uid.
Currently, 464xlat counts its ipv6 tx traffic into root uid.
When user is making ipv4 upload over ipv6-only network, ipv4
tx traffic may sometimes be counted faster then ipv6 tx
traffic.

Thus, NetworkStatsService may detect non-monotonic values due
to 464xlat adjustment.

So the solution is that: for clatd, make ipv6 tx traffic counts
into clat uid, and then ignore it in the framework side.

Bug: 118602783
Test: 1. manually verify clatd traffic on clat uid.
      2. runtest frameworks-net

Change-Id: Ifb478b79e3e281918c70e16d1f90682c78f33db1
2018-12-10 15:19:03 +08:00
Junyu Lai
2d79ef94f8 Merge "Refactoring of deleting stats in NetworkStats based on uids." am: c8dcfb8b4b
am: 2d00948a0c

Change-Id: Icfe86f71f9416dcd5fcc9aafd8c346197cde7cff
2018-12-09 21:46:07 -08:00
Junyu Lai
2d00948a0c Merge "Refactoring of deleting stats in NetworkStats based on uids."
am: c8dcfb8b4b

Change-Id: I60b086861a9a91cdd54c56c7caf21d26a6dd294a
2018-12-09 21:38:59 -08:00
Junyu Lai
c8dcfb8b4b Merge "Refactoring of deleting stats in NetworkStats based on uids." 2018-12-10 05:15:28 +00:00
junyulai
bbaddec5d7 Refactoring of deleting stats in NetworkStats based on uids.
In follow-up commits, current API would create new NetworkStats
every time when 464xlatAdjustment wants to filtered out some
uids.

This commit refactors it to delete stats in-place to get better
performance.

Bug: 118602783
Test: atest FrameworksNetTests
Change-Id: I858f95d1fa7733111786243b4e261ce8a70a068d
2018-12-06 19:01:17 +09:00
Luke Huang
1d7e968b14 Merge "Use ParcelFileDescriptor instead of FileDescriptor in INetd.aidl" am: d6c2dc5908 am: 7d5693279a
am: 0c54c1616d

Change-Id: I1dd010a0b4ec54c87b509c1e05185164fde9e4cb
2018-12-04 22:44:36 -08:00
Luke Huang
0c54c1616d Merge "Use ParcelFileDescriptor instead of FileDescriptor in INetd.aidl" am: d6c2dc5908
am: 7d5693279a

Change-Id: I8b89e88d1db96581ab91d649e5af621c499669ed
2018-12-04 22:35:32 -08:00
Luke Huang
7d5693279a Merge "Use ParcelFileDescriptor instead of FileDescriptor in INetd.aidl"
am: d6c2dc5908

Change-Id: I87360c19d58de38772f95ba8123a559007c6e71d
2018-12-04 22:21:26 -08:00
android-build-team Robot
1fc6d8adf1 Merge cherrypicks of [5704859, 5705300, 5704034, 5704195, 5705082, 5704058, 5704059, 5704932, 5705340, 5705341, 5705342, 5705343, 5705344, 5705361, 5705362, 5705363, 5705364, 5704870, 5704196, 5705083, 5701785, 5701786, 5701787, 5704035, 5705261, 5705281, 5704036, 5704037, 5704038, 5704871, 5704933, 5704872, 5705347, 5705262, 5704934] into pi-qpr2-release
Change-Id: Ifb7d048c4deb34b18e69173fd09e91c45980e2d9
2018-12-05 05:16:39 +00:00
junyulai
09254d2638 Change types of fields of network stats reported to framework.
Currently, NetworkStats use int to handle uid, set and tag,
while native side using unsigned int mixing with signed int
with that. This commit make necessary changes in JNI part while
libnetdbpf unifying the types of fields.

Bug: 112226716
Bug: 119193941
Test: 1. manually reconnect vpn
      2. update apps from playstore
      3. atest libnetdbpf_test
      4. runtest frameworks-net
      5. cts-tradefed run cts -m CtsUsageStatsTestCases -t \
              android.app.usage.cts.NetworkUsageStatsTest

Change-Id: I6c27124db8292e2825fba51b8994f013897cb566
Merged-In: I6c27124db8292e2825fba51b8994f013897cb566
(cherry picked from commit bf7803eed8283d5a1caa2efe90aa449590ddb94f)
(cherry picked from commit 5a43a6735e)
2018-12-05 05:14:02 +00:00
junyulai
5ea66a0a55 Fix negative uid stats caused by 464xlat adjust when eBPF is on.
When using xt_qtaguid to count per uid stats,
NetworkStatsService needs to adjust the 464xlat traffic since
iptables module would double count for ipv4 and ipv6 packet.
But for eBPF, the per uid stats is collected in a different
hook, so the adjustment on root uid would only be needed in tx
direction.

Bug: 112226716
Test: 1. Make ipv4 traffic in ipv6-only network and check data
         usage.
      2. Make ipv4 traffic in a client which connect to
         ipv6-only hotspot.
      3. runtest frameworks-net
      4. cts-tradefed run cts -m CtsNetTestCases -t \
                 android.net.cts.TrafficStatsTest
      5. cts-tradefed run cts -m CtsUsageStatsTestCases

Change-Id: Ic9a84f5446eddc943c255d5f3b89dad171f53cac
Merged-In: Ic9a84f5446eddc943c255d5f3b89dad171f53cac
(cherry picked from commit c33ac0d43b594f6154accf03ae7e3fd34dedc79d)
(cherry picked from commit 3da40c4828)
2018-12-05 05:13:56 +00:00
Bill Yi
d5fda04e91 Merge pi-qpr1-release PQ1A.181105.017.A1 to pi-platform-release
Change-Id: Id08fdcae21e3ceb54e893a9ed11da6e67c889895
2018-11-28 18:45:59 -08:00
Luke Huang
d913fb44ad Use ParcelFileDescriptor instead of FileDescriptor in INetd.aidl
Stable aidl won't support FileDescriptor but ParcelFileDescriptor.
In order to migrate to stable aidl, replace all FileDescriptor in
INdetd.aidl.

Test: runtest frameworks-net passes
Change-Id: Icdf37aed0e0cce0352070a437066e77c0f2fd85a
2018-11-28 13:41:58 +08:00
android-build-team Robot
26eca90cb9 Snap for 5140444 from 294484563c94eedd70f8dd53d134d701a1d6e9cb to pi-qpr2-release
Change-Id: Iae8b94ce89b79e0e3fd9f0e2daf7d186660f2df9
2018-11-26 18:42:25 +00:00
Benedict Wong
a041d6fb80 Merge changes from topic "xfrmi-support" am: f928c1e4b9 am: 719761f60c
am: 0cfc49485c

Change-Id: I9c543d38c88181b12cdbc7bdb93d7e38f1dfd425
2018-11-25 19:38:35 -08:00
Benedict Wong
0cfc49485c Merge changes from topic "xfrmi-support" am: f928c1e4b9
am: 719761f60c

Change-Id: I13a826f5ae3c4cb700be789b369848685da1bc41
2018-11-25 19:26:26 -08:00
Benedict Wong
719761f60c Merge changes from topic "xfrmi-support"
am: f928c1e4b9

Change-Id: I9b76a58ab9ebdb9abb01216e8b3916f1f52f9267
2018-11-25 19:15:37 -08:00
Benedict Wong
c6fcedd779 Cleanup and update comments SA mark disabling comments
This commit cleans up and upates comments with regard to changes in
aosp/721999, clarifying the restrictions and potential pitfalls we would
see with regards to IPsec tunnel mode without updatable SAs.

Bug: 111854872
Test: Compiles, comment-only change
Change-Id: I07b0063987463c1a3cf42e112839a31739947c80
2018-11-21 22:50:52 -08:00
Benedict Wong
5d74984c24 Add XFRM-I support to IpSecService
This change adds support for XFRM-I to all IpSecService netd calls.
Fallback logic is in netd, and thus both VTI and XFRM-I parameters are
always passed down to IpSecService.

Bug: 78589502
Test: All java, CTS tests passing
Change-Id: Ie4186f0ad7e50763b21831f6fa411b5ee436de78
2018-11-21 08:34:54 -08:00
Benedict Wong
683441d87a Disable attempted updating of SA marks
SA marks are never updated during the UPDSA call. This change disables
the attempts to update the specified SAs, ensuring that the config
stored in IpSecService matches that of the allocated kernel resources.

Bug: 111854872
Test: Unit, CTS tests passing
Change-Id: Ic1fb862c8021ffa260c3e262ec698d8af0a826d9
2018-11-21 08:34:54 -08:00
android-build-team Robot
157b0b1b87 Snap for 5143169 from 807672ac4fcd5b877fd7a404f22595cd9ae7ad0a to pi-qpr2-release
Change-Id: I679936796f8e82f1d510e317b4036299128ad06c
2018-11-21 04:05:40 +00:00
Lorenzo Colitti
db7ce1e574 [automerger skipped] Merge changes from topic "sort stats" into pi-dev am: 664145dcbc -s ours
am: e6f051b6c6  -s ours

Change-Id: Ifb8171b56932ef6b7c70a0ff36ebacc4ee7801db
2018-11-16 05:56:23 -08:00
Lorenzo Colitti
e6f051b6c6 [automerger skipped] Merge changes from topic "sort stats" into pi-dev
am: 664145dcbc  -s ours

Change-Id: Iaf2d41bf8c4464e05f8733d453fcc1a168ef8323
2018-11-16 05:41:50 -08:00
Junyu Lai
11e2cb862b Merge "Change types of fields of network stats reported to framework." am: 2c0a0092f1 am: 40de2a46a3
am: 979209a2a3

Change-Id: Iab166b8b06d3a744b8cfc83e0467c478642ce185
2018-11-13 02:03:05 -08:00
Junyu Lai
979209a2a3 Merge "Change types of fields of network stats reported to framework." am: 2c0a0092f1
am: 40de2a46a3

Change-Id: I0bf2bdc56f46928b94f0954e799d51196171fdc4
2018-11-13 01:53:45 -08:00
junyulai
5a43a6735e Change types of fields of network stats reported to framework.
Currently, NetworkStats use int to handle uid, set and tag,
while native side using unsigned int mixing with signed int
with that. This commit make necessary changes in JNI part while
libnetdbpf unifying the types of fields.

Bug: 112226716
Bug: 119193941
Test: 1. manually reconnect vpn
      2. update apps from playstore
      3. atest libnetdbpf_test
      4. runtest frameworks-net
      5. cts-tradefed run cts -m CtsUsageStatsTestCases -t \
              android.app.usage.cts.NetworkUsageStatsTest

Change-Id: I6c27124db8292e2825fba51b8994f013897cb566
Merged-In: I6c27124db8292e2825fba51b8994f013897cb566
(cherry picked from commit bf7803eed8283d5a1caa2efe90aa449590ddb94f)
2018-11-13 17:44:41 +08:00
Junyu Lai
40de2a46a3 Merge "Change types of fields of network stats reported to framework."
am: 2c0a0092f1

Change-Id: I82da681df48cd6425bbfb962d3969fa236e9db29
2018-11-13 01:37:17 -08:00
junyulai
6d49d8da7e Change types of fields of network stats reported to framework.
Currently, NetworkStats use int to handle uid, set and tag,
while native side using unsigned int mixing with signed int
with that. This commit make necessary changes in JNI part while
libnetdbpf unifying the types of fields.

Bug: 112226716
Test: 1. manually reconnect vpn
      2. update apps from playstore
      3. atest libnetdbpf_test
      4. runtest frameworks-net
      5. cts-tradefed run cts -m CtsUsageStatsTestCases -t \
              android.app.usage.cts.NetworkUsageStatsTest

Change-Id: I6c27124db8292e2825fba51b8994f013897cb566
2018-11-08 23:07:00 +08:00
junyulai
3da40c4828 Fix negative uid stats caused by 464xlat adjust when eBPF is on.
When using xt_qtaguid to count per uid stats,
NetworkStatsService needs to adjust the 464xlat traffic since
iptables module would double count for ipv4 and ipv6 packet.
But for eBPF, the per uid stats is collected in a different
hook, so the adjustment on root uid would only be needed in tx
direction.

Bug: 112226716
Test: 1. Make ipv4 traffic in ipv6-only network and check data
         usage.
      2. Make ipv4 traffic in a client which connect to
         ipv6-only hotspot.
      3. runtest frameworks-net
      4. cts-tradefed run cts -m CtsNetTestCases -t \
                 android.net.cts.TrafficStatsTest
      5. cts-tradefed run cts -m CtsUsageStatsTestCases

Change-Id: Ic9a84f5446eddc943c255d5f3b89dad171f53cac
Merged-In: Ic9a84f5446eddc943c255d5f3b89dad171f53cac
(cherry picked from commit c33ac0d43b594f6154accf03ae7e3fd34dedc79d)
2018-11-07 10:16:26 +08:00
Junyu Lai
0ab82da19f Merge "Fix negative uid stats caused by 464xlat adjust when eBPF is on." am: 0d63da86e2 am: a38302f84f
am: fcb523e095

Change-Id: I9d0d8b67ed0159ba2a71059620ebe5698eb79ccb
2018-10-30 19:56:01 -07:00
Junyu Lai
fcb523e095 Merge "Fix negative uid stats caused by 464xlat adjust when eBPF is on." am: 0d63da86e2
am: a38302f84f

Change-Id: I3ee791e4b6fdd9d508807810183dc02c69bd2c0b
2018-10-30 19:46:18 -07:00
Junyu Lai
a38302f84f Merge "Fix negative uid stats caused by 464xlat adjust when eBPF is on."
am: 0d63da86e2

Change-Id: Ia5120619ce7d5cedd6e558ed4d1dc9a706638796
2018-10-30 19:35:32 -07:00
junyulai
7d412d0b46 Fix negative uid stats caused by 464xlat adjust when eBPF is on.
When using xt_qtaguid to count per uid stats,
NetworkStatsService needs to adjust the 464xlat traffic since
iptables module would double count for ipv4 and ipv6 packet.
But for eBPF, the per uid stats is collected in a different
hook, so the adjustment on root uid would only be needed in tx
direction.

Bug: 112226716
Test: 1. Make ipv4 traffic in ipv6-only network and check data
         usage.
      2. Make ipv4 traffic in a client which connect to
         ipv6-only hotspot.
      3. runtest frameworks-net
      4. cts-tradefed run cts -m CtsNetTestCases -t \
                 android.net.cts.TrafficStatsTest
      5. cts-tradefed run cts -m CtsUsageStatsTestCases

Change-Id: Ic9a84f5446eddc943c255d5f3b89dad171f53cac
2018-10-30 21:23:38 +08:00
Luke Huang
4f2898674e Merge "Refactor UidRange by using stable aidl structure" am: 55012f2249 am: 96c61c9fa2
am: 9a3586aa00

Change-Id: I82e06fe93a3ed88368b649ef8d3283322191ffe7
2018-10-28 18:06:15 -07:00
Luke Huang
9a3586aa00 Merge "Refactor UidRange by using stable aidl structure" am: 55012f2249
am: 96c61c9fa2

Change-Id: I09ac7fc6525948b76114ef936dc1b3d2d1bae0fb
2018-10-28 17:55:57 -07:00
Luke Huang
96c61c9fa2 Merge "Refactor UidRange by using stable aidl structure"
am: 55012f2249

Change-Id: I9ac52f3869fe051d0ef7f45768f1defad155b53b
2018-10-28 17:44:20 -07:00
Treehugger Robot
55012f2249 Merge "Refactor UidRange by using stable aidl structure" 2018-10-29 00:17:34 +00:00
Olivier Gaillard
7456dd9539 Merge "Update a few runnable/handler to use a static class instead of a runnable." 2018-10-26 08:05:30 +00:00
Xiangyu/Malcolm Chen
4ead2b6b84 [automerger skipped] Merge changes into pi-dev-plus-aosp
am: ace6d6fc61  -s ours

Change-Id: Id2d191ae22884f4380c087ec2aebe7bbbe180e5c
2018-10-25 22:52:45 -07:00
Bill Yi
7034246041 [automerger skipped] Merge pie-platform-release to aosp-master - DO NOT MERGE am: 567b439367 -s ours am: 13a634886b -s ours
am: f91213f1f5  -s ours

Change-Id: I75b649236c9bc42d627dd79d055e38b26e20fa40
2018-10-25 21:14:17 -07:00
Bill Yi
42384c6e04 [automerger skipped] Merge pi-platform-release to stage-aosp-master - DO NOT MERGE am: ef4374f6a2 -s ours
am: 51a3f72bbb  -s ours

Change-Id: Ibe80ad8a60c74e954623c543607573491754cd2e
2018-10-25 20:12:57 -07:00