Commit Graph

1807 Commits

Author SHA1 Message Date
Andrei Onea
0fbf072ca6 Add @UnsupportedAppUsage annotations
For packages:
  android.net
  android.net.wifi
  android.nfc

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I7489aad1dceeb18ed7ca48a1ed8829a668b3fa04
2019-02-27 13:31:33 +00:00
Xin Li
da46efeb0a [automerger skipped] DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master am: 090a80a420 -s ours
am: 030d9f682a -s ours
am skip reason: subject contains skip directive

Change-Id: I2b3cf7ba11fc80010badbb212902a5507d5caae0
2019-02-25 17:16:05 -08:00
Xin Li
030d9f682a [automerger skipped] DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master
am: 090a80a420 -s ours
am skip reason: subject contains skip directive

Change-Id: I6c115125bad894bbb597557f2e9c3de3eb2b95b5
2019-02-25 16:13:06 -08:00
Xin Li
090a80a420 DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master
Bug: 120848293
Change-Id: I2f9a524f2ba552de3f62e343075cf0abf400bbae
2019-02-21 16:02:06 -08:00
Xin Li
14d4847954 [automerger skipped] DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into stage-aosp-master am: 38b1a2d9df -s ours
am: 211356e565 -s ours
am skip reason: subject contains skip directive

Change-Id: I333d887a77e5ff5f0949c02fc460b8d23cded964
2019-02-14 21:02:00 -08:00
Xin Li
211356e565 [automerger skipped] DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into stage-aosp-master
am: 38b1a2d9df -s ours
am skip reason: subject contains skip directive

Change-Id: I49505ddfda138f983dd8a75361f270549254f4f8
2019-02-14 14:33:10 -08:00
Xin Li
38b1a2d9df DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into
stage-aosp-master

Bug: 124234733
Change-Id: Ic4f67fde0835da0b1c363906cccef0d244e38393
2019-02-14 09:48:06 -08:00
android-build-team Robot
4a44ee4a83 Snap for 5180536 from 1fc6d8adf1 to pi-platform-release
Change-Id: I7c5a9c9e96572c32eadd97448c4886f9c9150a19
2019-02-09 02:33:11 +00:00
Remi NGUYEN VAN
a618134a1e Merge "Remove last NetworkStack usage of hidden APIs" am: 16ec5d038c am: e4675dcaab
am: ba3b82db1e

Change-Id: I2059d9cfa3015388301a74828255354b6dc23c23
2019-01-29 21:42:29 -08:00
Remi NGUYEN VAN
ba3b82db1e Merge "Remove last NetworkStack usage of hidden APIs" am: 16ec5d038c
am: e4675dcaab

Change-Id: I488fc028b8fd2aa5a09464082c65a4889a8a6b62
2019-01-29 21:27:50 -08:00
Remi NGUYEN VAN
e4675dcaab Merge "Remove last NetworkStack usage of hidden APIs"
am: 16ec5d038c

Change-Id: I27c78d09938f672a4428a17436d5ed0541170d0d
2019-01-29 21:13:46 -08:00
Remi NGUYEN VAN
5db0919a0d Remove last NetworkStack usage of hidden APIs
Includes various small changes to stop using hidden APIs

Test: make NetworkStack
Test: flashed, booted, WiFi and tethering working
Bug: 112869080
Change-Id: Id2830795a444f484b377ed6437435a1cd833697a
2019-01-30 10:23:24 +09:00
Remi NGUYEN VAN
83bde292f1 Merge "Add SocketUtils for NetworkStack" am: d9cc11e8bd am: 4d301b8d85
am: d3030bf5b4

Change-Id: I6d059f9cd1a694659bfd7ac09a32022d29c03f85
2019-01-28 23:47:36 -08:00
Remi NGUYEN VAN
d3030bf5b4 Merge "Add SocketUtils for NetworkStack" am: d9cc11e8bd
am: 4d301b8d85

Change-Id: I89fe62b4baf63104359bb6741807bb2f1666cdd9
2019-01-28 22:57:39 -08:00
Nick Kralevich
4cc7177dfc Merge "jni: more O_CLOEXECs" am: 0bd511611e am: 7b51a98e96
am: 9a2787c2e7

Change-Id: I34f53d427efb89f295a2027ceffcb5ccbd149e0b
2019-01-28 22:33:27 -08:00
Nick Kralevich
9a2787c2e7 Merge "jni: more O_CLOEXECs" am: 0bd511611e
am: 7b51a98e96

Change-Id: I358eab4877418f2c9a09a8b8d8c4c978de0656d7
2019-01-28 21:46:54 -08:00
Remi NGUYEN VAN
4d301b8d85 Merge "Add SocketUtils for NetworkStack"
am: d9cc11e8bd

Change-Id: I0db40afbf2de55d77d9d5493e556f499d2383f59
2019-01-28 21:19:36 -08:00
Nick Kralevich
7b51a98e96 Merge "jni: more O_CLOEXECs"
am: 0bd511611e

Change-Id: Id9eabfa92a488dbf7a27108aff8101d602e1adc9
2019-01-28 20:31:59 -08:00
Remi NGUYEN VAN
d9cc11e8bd Merge "Add SocketUtils for NetworkStack" 2019-01-28 23:14:08 +00:00
Nick Kralevich
cac3986f14 jni: more O_CLOEXECs
Prevent FDs from leaking across an execve() boundary.

Test: compiles and boots
Change-Id: I5f91046917b55b6abead0a5c6e939f82814e6f18
2019-01-28 10:39:10 -08:00
Remi NGUYEN VAN
894533059e Add SocketUtils for NetworkStack
These utilities can only be used for privileged apps. The underlying
implementation cannot be @SystemApi.

Test: m
Bug: 112869080
Change-Id: Idfa90561102e5b03ab2b79486d3ad46457128bf8
2019-01-28 20:11:27 +09:00
junyulai
1677ea7de5 Hide Keepalive offload API in IpSec
Since the new keepalive API is exported in ConnectivityManager,
hide Keepalive API in IpSec, also make system-current.txt sync
for this part.

Bug: 114151147
Test: m -j
Change-Id: I076030bdbab1cd7d69f6a034577d529970b050dc
2019-01-25 14:41:19 +08:00
Chenbo Feng
ac4d7d1258 Merge "Use delta reads for per uid traffic stats" am: 39de2905a5 am: 03074c729f
am: cf8d605cfb

Change-Id: Ia2d3aad715dc1a2ff65ea9ec1a5badeda47c47a6
2019-01-24 11:57:26 -08:00
Chenbo Feng
cf8d605cfb Merge "Use delta reads for per uid traffic stats" am: 39de2905a5
am: 03074c729f

Change-Id: Ibc1e7d1b6be2915d4000cda2b7a9141ac387f7f0
2019-01-24 11:12:54 -08:00
Chenbo Feng
03074c729f Merge "Use delta reads for per uid traffic stats"
am: 39de2905a5

Change-Id: I17faec2cc2a73e56d0f19abad32154b378857fc4
2019-01-24 10:55:09 -08:00
Chenbo Feng
39de2905a5 Merge "Use delta reads for per uid traffic stats" 2019-01-24 18:16:25 +00:00
Remi NGUYEN VAN
69281a355b Merge changes I1250730c,I7d00848c am: e693d49c0a am: fef17fd05f
am: ff1f9b78d4

Change-Id: Icc938491a9c4474cc27a4376ef03c954aac461b3
2019-01-23 09:01:09 -08:00
Remi NGUYEN VAN
ff1f9b78d4 Merge changes I1250730c,I7d00848c am: e693d49c0a
am: fef17fd05f

Change-Id: I31c9f6c11d0f52a34f68151fc2baca1921dcadad
2019-01-23 08:40:50 -08:00
Remi NGUYEN VAN
fef17fd05f Merge changes I1250730c,I7d00848c
am: e693d49c0a

Change-Id: I2f19490a2340bdc2630162dfe9a277dffc5041fa
2019-01-23 08:26:33 -08:00
Remi NGUYEN VAN
63e61c427d Move IpClient to NetworkStack
Test: atest FrameworksNetTests NetworkStackTests
Bug: b/112869080
Change-Id: I7d00848c052382cd1b6ce458868bed6a1e9e8ec5
2019-01-23 16:44:21 +09:00
Chenbo Feng
a9382c9793 Use delta reads for per uid traffic stats
For the detailed network stats of each uid and tag, the native
implementation provides delta read instead of consistent stats
data since boot. Every time the readNetworkStatsDetail function gets
called, the data pulled will be cleared. We will keep a persistent data
since boot in NetworkStatsService instead.

Fixed some checkstyle complains in related files as well.

Bug: 79171384
Test: android.app.usage.cts.NetworkUsageStatsTest
      NetworkStatsServiceTest
Change-Id: I50bcf278739135081d522e50b0e88d76fd9ab131
2019-01-22 13:50:35 -08:00
junyulai
e07ef701d7 [automerger skipped] Merge "resolve merge conflicts of da290bec0c5418e758b92abad7be8e729cf37d68 to stage-aosp-master" into stage-aosp-master am: 2c811e8843
am: b05c88fbf0 -s ours
am skip reason: change_id I3d94acb71c142ec38b750e58822881ff383341cc with SHA1 77c8591f9d is in history

Change-Id: I5d6fc7b41600f4ffda5dde6f3aea045edc01e24a
2019-01-21 11:01:38 -08:00
junyulai
b05c88fbf0 Merge "resolve merge conflicts of da290bec0c5418e758b92abad7be8e729cf37d68 to stage-aosp-master" into stage-aosp-master
am: 2c811e8843

Change-Id: Ibdbccc7b205677c9f3e7b0b876c13c83c0c51a70
2019-01-21 10:53:47 -08:00
Mike SU
77c8591f9d fix getIfaceStats and getTotalStats bug
root cause: getIfaceStats and getTotalStats is directly reading
iface_stat_fmt or eBPF, not include tether stats.
solution: add tether stats to getIfaceStats and getTotalStats.

Clean cherry-pick of aosp/848934

Bug: 120039819
Test case1:
1. tether offload is enabled on phone, enable MHS on phone.
2. Use test app to check getMobileRxBytes->getIfaceStats
3. Download 10M file on MHS client
4. Use test app to check getMobileRxBytes->getIfaceStats again
result: getMobileRxBytes increased around 10M

Test case2:
1. tether offload is disabled on phone, enable MHS on phone.
repeat above step 2~4
result: getMobileRxBytes increased around 10M

Following CTS cases passed
run cts -m CtsNetTestCases --test android.net.cts.TrafficStatsTest
run cts -m CtsUsageStatsTestCases --test android.app.usage.cts.NetworkUsageStatsTest

Change-Id: I3d94acb71c142ec38b750e58822881ff383341cc
2019-01-21 20:55:06 +08:00
junyulai
19ec97e903 resolve merge conflicts of da290bec0c5418e758b92abad7be8e729cf37d68 to stage-aosp-master
Bug: None
Test: I solemnly swear I tested this conflict resolution.

Change-Id: I719965f13d1f726fdac5b475fd8733b07e28f5b6
Merged-In: I3d94acb71c142ec38b750e58822881ff383341cc
2019-01-21 12:22:13 +00:00
Mike SU
3657ce9690 fix getIfaceStats and getTotalStats bug
root cause: getIfaceStats and getTotalStats is directly reading
iface_stat_fmt or eBPF, not include tether stats.
solution: add tether stats to getIfaceStats and getTotalStats.

Bug: 120039819
Test case1:
1. tether offload is enabled on phone, enable MHS on phone.
2. Use test app to check getMobileRxBytes->getIfaceStats
3. Download 10M file on MHS client
4. Use test app to check getMobileRxBytes->getIfaceStats again
result: getMobileRxBytes increased around 10M

Test case2:
1. tether offload is disabled on phone, enable MHS on phone.
repeat above step 2~4
result: getMobileRxBytes increased around 10M

Following CTS cases passed
run cts -m CtsNetTestCases --test android.net.cts.TrafficStatsTest
run cts -m CtsUsageStatsTestCases --test android.app.usage.cts.NetworkUsageStatsTest

Change-Id: I3d94acb71c142ec38b750e58822881ff383341cc
2019-01-10 12:16:25 -06:00
Chenbo Feng
14c16b87a9 Merge "Adjust map names due to new bpfloader" am: 0317e9e374 am: 37cec67bdc
am: 50252f86f3

Change-Id: Iedbb541ba2fa5916048e3f40d5cc128a83d0dc6b
2019-01-09 11:34:54 -08:00
Chenbo Feng
50252f86f3 Merge "Adjust map names due to new bpfloader" am: 0317e9e374
am: 37cec67bdc

Change-Id: I28a2e41a354abdd8b2113c927a6489ea8710b431
2019-01-09 11:15:44 -08:00
Chenbo Feng
37cec67bdc Merge "Adjust map names due to new bpfloader"
am: 0317e9e374

Change-Id: If97a15a7f7b6a066bbf46db3497270a8c9a81026
2019-01-09 10:53:22 -08:00
Treehugger Robot
0317e9e374 Merge "Adjust map names due to new bpfloader" 2019-01-09 18:34:49 +00:00
junyulai
dad2d5ad85 [automerger skipped] Merge "DO NOT MERGE: Revert: use legacy way to get tcp packet count" am: a1e93d0a66 -s ours am: ac828b9ad4 -s ours
am: fa29021fb7 -s ours
am skip reason: subject contains skip directive

Change-Id: I4066f56a63322b6cf60d61927739f07846fd9e37
2019-01-08 21:37:53 -08:00
junyulai
fa29021fb7 [automerger skipped] Merge "DO NOT MERGE: Revert: use legacy way to get tcp packet count" am: a1e93d0a66 -s ours
am: ac828b9ad4 -s ours
am skip reason: subject contains skip directive

Change-Id: I3c3a25cd81aaff1a4d5ac7e5d4db9a03ea8f9d84
2019-01-08 21:24:13 -08:00
junyulai
ac828b9ad4 [automerger skipped] Merge "DO NOT MERGE: Revert: use legacy way to get tcp packet count"
am: a1e93d0a66 -s ours
am skip reason: subject contains skip directive

Change-Id: I3b55e5cac6168719dc586013707c8d270b148206
2019-01-08 21:19:09 -08:00
Treehugger Robot
a1e93d0a66 Merge "DO NOT MERGE: Revert: use legacy way to get tcp packet count" 2019-01-09 05:10:05 +00:00
junyulai
579bf97659 DO NOT MERGE: Revert: use legacy way to get tcp packet count
In Q, legacy way to get tcp packet count is not planned to be
supported. Users who use this unsupported API e.g., data stall
detection are also planned to be removed.

Thus, this change reverts 0b4a66a1c2 which is the short term
solution in P.

Bug: 110443385
Test: atest FrameworksNetTests
Change-Id: Ia09f908edbf194b9aa873a3bdd5aee7b6fcb16bc
2019-01-09 10:38:32 +08:00
Chenbo Feng
150dc6f187 Adjust map names due to new bpfloader
With the new loader support added. The bpf map format is defined by bpf
kernel program as well. Change the netd bpf program to the new format.

Test: CtsUsageStatsTestCases
Bug: 112334572
Change-Id: I34e38e0a8cf0cca54dc52ec897771452f9d90525
2019-01-04 12:06:35 -08:00
Junyu Lai
92c56063be Merge "Ignore ipv6 tx traffic on clat uid." am: 191f32fdc7 am: 9c0075aad0
am: 59c7f1a494

Change-Id: I1ac85ac863026ea99117c5b0115bcc0c9144fb7b
2019-01-04 08:47:41 -08:00
Junyu Lai
59c7f1a494 Merge "Ignore ipv6 tx traffic on clat uid." am: 191f32fdc7
am: 9c0075aad0

Change-Id: I0f289ce46462f494adb99628bd504cafb584eeeb
2019-01-04 08:30:44 -08:00
Junyu Lai
9c0075aad0 Merge "Ignore ipv6 tx traffic on clat uid."
am: 191f32fdc7

Change-Id: I181c3c812caa9bcd359fbddf74d14adeb7e83419
2019-01-04 08:13:29 -08:00
Junyu Lai
191f32fdc7 Merge "Ignore ipv6 tx traffic on clat uid." 2019-01-04 09:29:10 +00:00