Commit Graph

2120 Commits

Author SHA1 Message Date
Varun Anand
6018f64055 Addressing comments for http://ag/7700679.
(cherry picked from commit 81e79803de)

Note, that its in a separate CL so we could cherry-pick this CL to aosp.
http://ag/7700679 is already in aosp (http://aosp/865073).

Bug: 113122541
Bug: 120145746
Test: atest FrameworksNetTests

Change-Id: Ic1767bc8bf1460e4223f86465fc72344428e6055
Merged-In: I7cfda226b4ed11b67002b83b38fba0f5caf96718
2019-05-30 15:59:07 +00:00
android-build-team Robot
74ae89a82b Snap for 5616671 from 23f11427f87d313695457c111c24f4ddddf74f7c to rvc-release
Change-Id: I1b14d87eecf69ab52fee6cfb2288e19fdd739083
2019-05-30 03:12:57 +00:00
chen xu
adda49ea54 [automerger skipped] Merge "NetworkStatAccess Should checkCarrierPrivileges cross all subscriptions" into qt-dev am: 1824c32a5d -s ours am: e23aa86ced -s ours
am: 99547c1a94 -s ours
am skip reason: change_id I49fbde1fe73b33aadcf8fd23ad224f363b137bf3 with SHA1 47090f9dd0 is in history

Change-Id: I930ac9d00224860e9ef0149e722daea6bdc33019
2019-05-29 18:28:50 -07:00
chen xu
e23aa86ced [automerger skipped] Merge "NetworkStatAccess Should checkCarrierPrivileges cross all subscriptions" into qt-dev
am: 1824c32a5d -s ours
am skip reason: change_id I49fbde1fe73b33aadcf8fd23ad224f363b137bf3 with SHA1 47090f9dd0 is in history

Change-Id: Icfe0c92b130b7bde5686ec8186d5df0fa16aa126
2019-05-29 18:14:18 -07:00
TreeHugger Robot
1824c32a5d Merge "NetworkStatAccess Should checkCarrierPrivileges cross all subscriptions" into qt-dev 2019-05-30 01:00:44 +00:00
Chen Xu
2e9f584ad7 Merge "NetworkStatAccess Should checkCarrierPrivileges cross all subscriptions" am: 478cbabf8c am: 4d206af049 am: 911e39e070
am: ae68df7c35

Change-Id: I66053706047e5b575f3e13e0701ef2e63d882574
2019-05-29 11:20:59 -07:00
Chen Xu
911e39e070 Merge "NetworkStatAccess Should checkCarrierPrivileges cross all subscriptions" am: 478cbabf8c
am: 4d206af049

Change-Id: Ib2d02bd3936ae112f62861c301d99582e0b998b0
2019-05-29 10:43:06 -07:00
Varun Anand
44acf847fd Merge changes from topic "vpn_data_accounting" into qt-dev am: b33d2ca2e3 am: 72f3140992
am: a6cd7d86a0

Change-Id: I87e704d91803c20313b61403a4cc2ee0a10cec95
2019-05-29 10:18:57 -07:00
chen xu
3b8356c7ef NetworkStatAccess Should checkCarrierPrivileges cross all subscriptions
Bug: 133236378
Test: Manual
Change-Id: I49fbde1fe73b33aadcf8fd23ad224f363b137bf3
Merged-in: I49fbde1fe73b33aadcf8fd23ad224f363b137bf3
2019-05-29 17:16:54 +00:00
Varun Anand
72f3140992 Merge changes from topic "vpn_data_accounting" into qt-dev
am: b33d2ca2e3

Change-Id: I234eb2b20f47bde94b4aba89867e9d1c7e9ee7d5
2019-05-29 09:44:04 -07:00
Varun Anand
81e79803de Addressing comments for http://ag/7700679.
Note, that its in a separate CL so we could cherry-pick this CL to aosp.
http://ag/7700679 is already in aosp.

Bug: 113122541
Bug: 120145746
Test: atest FrameworksNetTests

Change-Id: I7cfda226b4ed11b67002b83b38fba0f5caf96718
2019-05-29 18:15:34 +09:00
Varun Anand
8481d9d55d NetworkStatsService: Fix getDetailedUidStats to take VPNs into account.
(cherry picked from commit 720133f79d)

This API is similar to one provided by NetworkStatsFactory with the
difference that NSS also migrates traffic from VPN UID to other apps.

Since traffic can only be migrated over NetworkStats delta, NSS
therefore maintains NetworkStats snapshot across all UIDs/ifaces/tags.

This snapshot gets updated whenever NSS records a new snapshot
(based on various hooks such as VPN updating its underlying networks,
network getting lost, etc.), or getDetailedUidStats API is invoked by
one of its callers.

Bug: 113122541
Bug: 120145746
Test: atest FrameworksNetTests
Test: manually verified that battery stats are migrating traffic off of
TUN (after patching above CL where we point BatteryStats to use this
API).

Change-Id: I4b8d7c5b6905a4a12c1806dfd35c2c4c63610404
2019-05-29 18:15:24 +09:00
Varun Anand
921b3f3e85 Take all VPN underlying networks into account when migrating traffic for
VPN uid.

(cherry picked from commit c8dbdf35de)

Bug: 113122541
Bug: 120145746
Test: atest FrameworksNetTests
Test: Manually verified on device that stats from VPN UID are moved
      appropriately based on its declared underlying network set.
Test: vogar --mode app_process --benchmark NetworkStatsBenchmark.java

Change-Id: I7f368c5970b2dcb969fe0daf5ef44edb1f51d09d
2019-05-29 18:15:17 +09:00
chen xu
47090f9dd0 NetworkStatAccess Should checkCarrierPrivileges cross all subscriptions
Bug: 133236378
Test: Manual
Change-Id: I49fbde1fe73b33aadcf8fd23ad224f363b137bf3
2019-05-28 23:28:56 -07:00
android-build-team Robot
3b719a7e80 Snap for 5571274 from ad374d746b05dee5f074378aeb334a47c60d3a0b to rvc-release
Change-Id: Id14f676a8e6e76528cb2823af0795d48f46f97c5
2019-05-16 03:19:35 +00:00
Lei Yu
2f790284cd Merge "Use merged NetworkTemplate to query data usage" into qt-dev am: 35fcd6b0e3
am: 77d71f800f

Change-Id: Ie50429d27ea5851af65007e3d668b6fd4ac3308e
2019-05-14 18:47:02 -07:00
Lei Yu
77d71f800f Merge "Use merged NetworkTemplate to query data usage" into qt-dev
am: 35fcd6b0e3

Change-Id: I1030f49eb9e24ad8bc4a10c3ab8890c34d20f8f6
2019-05-14 17:51:03 -07:00
Lei Yu
3c6fb30f24 Use merged NetworkTemplate to query data usage
This CL uses merged NetworkTemplate so that it shows correct
data for carrier which is a virtual that has multiple
subscriberId under the hood.

By doing this, this CL also adds several hidden API so settings
can query by NetworkTemplate directly.

Fixes: 120566366
Test: RunSettingsLibRoboTests
Change-Id: I8b747697933c75b48b14387adafb5ac9ca165926
2019-05-13 11:42:23 -07:00
android-build-team Robot
092c18a7c6 Snap for 5556694 from 454dede91146557fa10c7b245bb61174cb2f012e to rvc-release
Change-Id: I75976e652e90b57a8f5216a8313330a0aab0dc70
2019-05-11 03:18:37 +00:00
Junyu Lai
8b26882951 Merge changes Ibff278a6,If6d537a3 am: 33e236823f am: a865058628
am: bf5b7628c5

Change-Id: Ib9ef9ff5c943c4502b91feaa2690f0838215809d
2019-05-10 02:36:04 -07:00
Junyu Lai
bf5b7628c5 Merge changes Ibff278a6,If6d537a3 am: 33e236823f
am: a865058628

Change-Id: Ic51f3b32375378ff74bdd54d1f36569b277fc80f
2019-05-09 23:30:19 -07:00
Xin Li
7d8ede8836 [automerger skipped] DO NOT MERGE - Merge Pie Bonito/Sargo into master. am: e963030676 -s ours am: bd1a8961e2 -s ours
am: 884a1ada47 -s ours
am skip reason: subject contains skip directive

Change-Id: If1ca678ef3942f98d1e68a28a59a2831de27b919
2019-05-09 21:26:56 -07:00
Treehugger Robot
33e236823f Merge changes Ibff278a6,If6d537a3
* changes:
  Revert "Add NATT keepalive resources and methods into IpSecService"
  Revert "[KA11] Verify fd ownership and allocate resource for NattKeepalive"
2019-05-10 01:42:26 +00:00
Xin Li
884a1ada47 [automerger skipped] DO NOT MERGE - Merge Pie Bonito/Sargo into master. am: e963030676 -s ours
am: bd1a8961e2 -s ours
am skip reason: subject contains skip directive

Change-Id: I862d40111b2e525e5838bf09e169c8c3f416633b
2019-05-09 17:16:31 -07:00
Junyu Lai
75eabfeb7c Revert "Add NATT keepalive resources and methods into IpSecService"
This reverts commit 4aac3e9e48.

Reason for revert: Adds dependency between IpSecService and
                   ConnectivityService may lead to future deadlock
		   problems. Uses a simpler approach instead,
		   hence the solution is not needed.
		   See aosp/954040.

Change-Id: Ibff278a6eee666cd85dba81c2bed94d568679b02
2019-05-10 00:58:18 +08:00
Xin Li
e963030676 DO NOT MERGE - Merge Pie Bonito/Sargo into master.
Bug: 131756210
Change-Id: I77a701deda4935526ad452564f9bda77af345f46
2019-05-09 09:27:04 -07:00
Lorenzo Colitti
f730a8ad8d Merge "Add IPsec checks for IPSEC_TUNNEL feature" into qt-dev am: 22e0b2c514
am: 707fc41210

Change-Id: I0f3376eec642800542b5e516a02aef286be6f614
2019-05-09 01:30:52 -07:00
Lorenzo Colitti
707fc41210 Merge "Add IPsec checks for IPSEC_TUNNEL feature" into qt-dev
am: 22e0b2c514

Change-Id: I9bd0fa3958c63a148af98abfe7cc6e4301cf01c2
2019-05-08 21:20:19 -07:00
Lorenzo Colitti
22e0b2c514 Merge "Add IPsec checks for IPSEC_TUNNEL feature" into qt-dev 2019-05-09 03:25:35 +00:00
android-build-team Robot
2320f2b9a2 Snap for 5546569 from 5654efd4cb1d5ccc1d3a2c9973725e4c675ac236 to rvc-release
Change-Id: I379d3d541a48cd079621866e277a71914f91eb63
2019-05-09 03:08:32 +00:00
Lorenzo Colitti
21f699b1a1 [automerger skipped] Merge "Add EPROTONOSUPPORT to IpSecManager SSE map" into qt-dev am: a1a0653dab -s ours
am: d50abfdae5 -s ours
am skip reason: change_id Iec3d5fc4a9bcad7c104414afefae775232d46558 with SHA1 7e9c1ceadd is in history

Change-Id: I6bd69e682abcd0c6b2310506ccd6b225a26f1bb4
2019-05-08 02:49:24 -07:00
Lorenzo Colitti
d50abfdae5 [automerger skipped] Merge "Add EPROTONOSUPPORT to IpSecManager SSE map" into qt-dev
am: a1a0653dab -s ours
am skip reason: change_id Iec3d5fc4a9bcad7c104414afefae775232d46558 with SHA1 7e9c1ceadd is in history

Change-Id: Ifb346ddf63b0d6547f3c67110c17c630f3aa72c9
2019-05-08 02:37:04 -07:00
Jordan Liu
74620136df Merge changes into qt-dev-plus-aosp
am: 5b5a0240a6

Change-Id: I40ec10f3beaea50cf9abf2b5825a40436c620f58
2019-05-07 19:26:01 -07:00
Benedict Wong
e9763752c7 Add IPsec checks for IPSEC_TUNNEL feature
This patch adds checks to ensure that the IPSEC_TUNNEL feature flag is
enabled.

Bug: 117183273
Test: Compiles & tests passing
Change-Id: I2699dda29e1eed139bc6fd1b70071e5ab33cad88
2019-05-08 00:11:28 +00:00
Android Build Merger (Role)
5b5a0240a6 Merge changes into qt-dev-plus-aosp 2019-05-07 22:19:43 +00:00
Benedict Wong
c45974b0d6 Add EPROTONOSUPPORT to IpSecManager SSE map
This change maps EPROTONOSUPPORT to the list of error codes that map to
UnsupportedOperationException in IpSecManager.

Bug: 80103456
Test: Compiles, CTS tests ran
Change-Id: Iec3d5fc4a9bcad7c104414afefae775232d46558
Merged-In: Iec3d5fc4a9bcad7c104414afefae775232d46558
(cherry picked from commit dcbc670688d815ce89954765fac46aa2ad6d8adb)
2019-05-07 14:32:17 -07:00
android-build-team Robot
0625be3e26 Snap for 5518923 from d480edf1f79c13bcc201768a39a1b4495c3f1ed0 to rvc-release
Change-Id: I553015efeb0e6a92a42bc9a9f34695f407cdcd00
2019-05-01 03:06:23 +00:00
Benedict Wong
e6096f4b8e Merge "Add EPROTONOSUPPORT to IpSecManager SSE map" am: 7050ce9434 am: 533559234e
am: 7a2cf07c8d

Change-Id: Iabb278381ed66d7423ad374a717b0b5a41d39846
2019-04-29 17:41:49 -07:00
Benedict Wong
7a2cf07c8d Merge "Add EPROTONOSUPPORT to IpSecManager SSE map" am: 7050ce9434
am: 533559234e

Change-Id: I23e0b56529b9df23558002ddb9e6210d711228cf
2019-04-29 14:16:30 -07:00
Benedict Wong
533559234e Merge "Add EPROTONOSUPPORT to IpSecManager SSE map"
am: 7050ce9434

Change-Id: I9ab4161e2b04615ce782c89cd9e99d98cdbdc92d
2019-04-29 13:35:37 -07:00
android-build-team Robot
4e276ebeb2 Snap for 5503049 from 0ca782e26d821a9db1d04b68dc4bfcbfa6afd913 to rvc-release
Change-Id: I3002020942c057e22aed6f9dc4dcca27d5508177
2019-04-25 03:12:24 +00:00
Benedict Wong
7e9c1ceadd Add EPROTONOSUPPORT to IpSecManager SSE map
This change maps EPROTONOSUPPORT to the list of error codes that map to
UnsupportedOperationException in IpSecManager.

Bug: 80103456
Test: Compiles, CTS tests ran
Change-Id: Iec3d5fc4a9bcad7c104414afefae775232d46558
2019-04-24 21:31:01 +00:00
android-build-team Robot
328ec53ad3 Snap for 5499065 from 065adafc6571843bc70f00f10dae37301e1d7013 to rvc-release
Change-Id: Ib35beac431e0b272e8e39d2306f44ac8c0a98837
2019-04-24 03:22:26 +00:00
Chenbo Feng
7e729bdaa5 [automerger skipped] Merge "Ask netd to swap stats map before reading" into qt-dev am: 197077dc8f -s ours
am: 811f91f337 -s ours
am skip reason: change_id I8fa37c26bec23ffca0b29b679e72ba1189f557f1 with SHA1 876218abcb is in history

Change-Id: I863180a63bcbaa7f7ed76fc759e2f8f2dae1d764
2019-04-23 18:23:54 -07:00
Chenbo Feng
bc13d2e0b0 [automerger skipped] Merge "Add a lock to protect persistent stats snapshot" into qt-dev am: 8e7794e97b -s ours
am: 2c8ab195b0 -s ours
am skip reason: change_id I73851336452110afb74d6dd1ca5e50047d5b3d4a with SHA1 57f207b1c7 is in history

Change-Id: Id3eca996369f20b684f2d3d0436a79288193c7b0
2019-04-23 15:27:25 -07:00
Chenbo Feng
811f91f337 [automerger skipped] Merge "Ask netd to swap stats map before reading" into qt-dev
am: 197077dc8f -s ours
am skip reason: change_id I8fa37c26bec23ffca0b29b679e72ba1189f557f1 with SHA1 876218abcb is in history

Change-Id: I48dc5783885a97a0b0c975202c5878c058695524
2019-04-23 15:13:56 -07:00
TreeHugger Robot
197077dc8f Merge "Ask netd to swap stats map before reading" into qt-dev 2019-04-23 21:57:09 +00:00
Chenbo Feng
2c8ab195b0 [automerger skipped] Merge "Add a lock to protect persistent stats snapshot" into qt-dev
am: 8e7794e97b -s ours
am skip reason: change_id I73851336452110afb74d6dd1ca5e50047d5b3d4a with SHA1 57f207b1c7 is in history

Change-Id: I30d66ea36a7beee9ccf940c547c47a6f7220e0a2
2019-04-23 12:23:12 -07:00
TreeHugger Robot
8e7794e97b Merge "Add a lock to protect persistent stats snapshot" into qt-dev 2019-04-23 18:19:06 +00:00
Chenbo Feng
10fac71887 Ask netd to swap stats map before reading
To avoid protentail race problem between netd and system_server when
reading the network stats map. Always inform netd before reading the
stats and let netd to do a swap between active stats map and inactive
stats map. So the system_server can safely remove the stats after
reading.

Bug: 126620214
Test: android.app.usage.cts.NetworkUsageStatsTest
      android.net.cts.TrafficStatsTest

Change-Id: I8fa37c26bec23ffca0b29b679e72ba1189f557f1
Merged-In: I8fa37c26bec23ffca0b29b679e72ba1189f557f1
(cherry picked from commit f729cb5fd654a0f099128734f849800fde9ba525)
2019-04-23 14:21:32 +00:00