Commit Graph

2054 Commits

Author SHA1 Message Date
Automerger Merge Worker
43759b76c3 [automerger skipped] Merge "Fix crash and duplicated ethernet tethering request" into rvc-dev am: 02ee003aa5 -s ours
am skip reason: Change-Id I7c5127e96d80d077735010d2e62c7227805ccb10 with SHA-1 c8e7d759be is in history

Change-Id: I8c338aedd21b50b412d600d165c1d0f63453d52a
2020-03-09 08:20:47 +00:00
Automerger Merge Worker
87aa2869fe Fix crash and duplicated ethernet tethering request
This change fix two things:
1. Handle ethernet callback in internal thread to avoid crash. IpServer
should be created from tethering thread, otherwise mIpNeighborMonitor of
IpServer would throw
   IllegalStateException("start() called from off-thread")
2. Ethernet tethering request may be duplicated if multiple
startTethering is called but no stopTethering

Bug: 130840861
Bug: 148824036
Test: ON/OFF ethernet tehtering manually
      atest TetheringTests

Change-Id: Ibd3ea6bc6751bd65647ff381f9b0124bc3395c09
Merged-In: I7c5127e96d80d077735010d2e62c7227805ccb10
Merged-In: Ibd3ea6bc6751bd65647ff381f9b0124bc3395c09
(cherry picked from commit 72702b979654234c18045f04270040056a74cf90)
2020-03-09 02:02:23 +00:00
Automerger Merge Worker
93e1e0c625 [automerger skipped] Merge "Merge stage-aosp-master to aosp-master - DO NOT MERGE" am: d11ef42169 am: f01b99332b -s ours
am skip reason: subject contains skip directive

Change-Id: I25e889bad69a7a3bfd819e7a75a69a16f29b92da
2020-03-06 00:26:36 +00:00
Bill Yi
d11ef42169 Merge "Merge stage-aosp-master to aosp-master - DO NOT MERGE" 2020-03-05 18:27:30 +00:00
Automerger Merge Worker
1ff5f65f5b Merge changes I794a24d0,Iab32b2db am: f46d3aa4bb am: ae7c0fddb7
Change-Id: If256ed4437ddcbcc72a6f766cff2f4cc512ee3f7
2020-03-04 13:36:11 +00:00
Automerger Merge Worker
ae7c0fddb7 Merge changes I794a24d0,Iab32b2db am: f46d3aa4bb
Change-Id: I03f6b9e521793b92f83a21583a2e53fb1d31fba1
2020-03-04 13:26:51 +00:00
Junyu Lai
f46d3aa4bb Merge changes I794a24d0,Iab32b2db
* changes:
  Remove setHandler in NetworkStatsService
  Remove the need of accessing handler in NSS unit test
2020-03-04 13:07:49 +00:00
junyulai
2999462561 Remove setHandler in NetworkStatsService
Currently, internal handler is set by setHandler after
constructing NSS object. This was introduced in ag/866187 to
access the handler in the unit test.

However, the design put NSS in a bad situation where all classes
that need handler or executor could not be final and need to be
dynamically allocated in order to get a valid handler.

Thus, since the usage of handler is removed in previous patch,
this change eliminate setHandler by initializing the handler in
the constructor.

Test: atest FrameworksNetTests
Bug: 150664039

Change-Id: I794a24d00b0ca9fdc78091e7b9ab7307e0f034b7
2020-03-04 16:01:21 +08:00
Automerger Merge Worker
e342a89cad [automerger skipped] Merge "Move DnsSdTxtRecord to net common static library" am: 8d6a6e0d4b am: faf27ff64c -s ours
am skip reason: Change-Id I6118b313ce668707d598aa2eab9baee2f7622dbc with SHA-1 1970749b57 is in history

Change-Id: I678c69314756955e3b6182ab6b25ba7395bedd97
2020-03-04 06:09:52 +00:00
Automerger Merge Worker
faf27ff64c Merge "Move DnsSdTxtRecord to net common static library" am: 8d6a6e0d4b
Change-Id: I1101a06ab084e1ff61a785f78b1ae5ac50bfbcd8
2020-03-04 05:56:55 +00:00
Aaron Huang
e045a555af Move DnsSdTxtRecord to net common static library
DnsSdTxtRecord is moved to frameworks/libs/net for mainline
support. Also change the import path using this class.

Bug: 139268426
Bug: 135998869
Test: atest FrameworksNetTests
      ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh

Change-Id: I6118b313ce668707d598aa2eab9baee2f7622dbc
Merged-In: I6118b313ce668707d598aa2eab9baee2f7622dbc
2020-03-02 08:21:26 +00:00
Automerger Merge Worker
9074f2acc8 Merge "Fix crash and duplicated ethernet tethering request" am: 41c82c99df am: b903184cdd
Change-Id: I64f6f64c643e626380403d3e15c6ed4b5f2330ef
2020-02-28 03:04:11 +00:00
Automerger Merge Worker
b903184cdd Merge "Fix crash and duplicated ethernet tethering request" am: 41c82c99df
Change-Id: Idd4eca225909f88ef6d57fd8952ae497ec82115b
2020-02-28 02:49:58 +00:00
markchien
c8e7d759be Fix crash and duplicated ethernet tethering request
This change fix two things:
1. Handle ethernet callback in internal thread to avoid crash. IpServer
should be created from tethering thread, otherwise mIpNeighborMonitor of
IpServer would throw
   IllegalStateException("start() called from off-thread")
2. Ethernet tethering request may be duplicated if multiple
startTethering is called but no stopTethering

Bug: 130840861
Bug: 148824036
Test: ON/OFF ethernet tehtering manually
      atest TetheringTests

Change-Id: I7c5127e96d80d077735010d2e62c7227805ccb10
2020-02-27 14:50:16 +08:00
Automerger Merge Worker
662cc3d540 Merge "[SP12] Remove the usage of getVtDataUsage" am: afeed9dee4 am: 7fe2313922 am: ac4706dc7a
Change-Id: I28c84ee96a3a209868769aad16a2d2e596a0c342
2020-02-19 23:02:38 +00:00
Automerger Merge Worker
ac4706dc7a Merge "[SP12] Remove the usage of getVtDataUsage" am: afeed9dee4 am: 7fe2313922
Change-Id: Ia10e2365d5f02a1e3444d80e6d7f9d5da00264e0
2020-02-19 00:54:03 +00:00
Automerger Merge Worker
7fe2313922 Merge "[SP12] Remove the usage of getVtDataUsage" am: afeed9dee4
Change-Id: I4e617685c887098e5a93905b77455fb42116a99c
2020-02-19 00:33:48 +00:00
Junyu Lai
afeed9dee4 Merge "[SP12] Remove the usage of getVtDataUsage" 2020-02-19 00:13:02 +00:00
Junyu Lai
50e1c228d0 Merge "[SP16] Address comments on aosp/1172143" am: f4eaaa2415 am: d58bf88378 am: 59a0c28cf3
Change-Id: I4cff4d096f375210585ceae5eb27002b97a35226
2020-02-17 14:18:32 +00:00
Junyu Lai
ad9585467c Merge "[SP17] Wait for stats providers to report stats update" am: 1e47a3e71d am: 48433d6735 am: 91c2f32f05
Change-Id: I719a1b2c75123f6fa6c765eeced055720c052c9b
2020-02-17 14:18:06 +00:00
Junyu Lai
59a0c28cf3 Merge "[SP16] Address comments on aosp/1172143" am: f4eaaa2415 am: d58bf88378
Change-Id: Id6d4be756ec4bd6d3e9c7b8fa1d85b3bdc802a10
2020-02-15 02:51:23 +00:00
Junyu Lai
d58bf88378 Merge "[SP16] Address comments on aosp/1172143" am: f4eaaa2415
Change-Id: I9c826c08320e112466dea0d2628f3447ebcb7d02
2020-02-15 02:35:42 +00:00
Junyu Lai
f4eaaa2415 Merge "[SP16] Address comments on aosp/1172143" 2020-02-15 02:21:30 +00:00
Junyu Lai
91c2f32f05 Merge "[SP17] Wait for stats providers to report stats update" am: 1e47a3e71d am: 48433d6735
Change-Id: I4b5c9e1cca7641b786e118ff979b33b25394fa3e
2020-02-15 02:03:52 +00:00
Junyu Lai
48433d6735 Merge "[SP17] Wait for stats providers to report stats update" am: 1e47a3e71d
Change-Id: I5e6a69fb50c9820f8b0a7e834608a32f651a860a
2020-02-15 01:38:09 +00:00
Benedict Wong
4531c37767 [automerger skipped] Merge "Implement Ikev2VpnRunner" am: e334a83e46 am: c722981400 am: ae8b9c5683 -s ours
am skip reason: skipped by user benedictwong

Change-Id: Ie1f6f8dbd10161342a7f14935def73820a68b057
2020-02-14 20:11:15 +00:00
junyulai
304de51561 [SP17] Wait for stats providers to report stats update
From current design, the traffic accounted by stats providers
will be updated asynchronously when force polling. When upper
layer make two subsequently queries. They will get stale
stats upon the first query, and may get newest/stale stats
base on the result of race.

Thus, wait for a bit of time to allow asynchronous stats update
complete to reduce the chance of race. In pratice, it would
be finished in ~2ms when testing.

Test: systrace.py network
Test: atest FrameworksNetTests
Bug: 147460444
Change-Id: I22a00fc4049cddf77fd578e25769ae1979f2cc6d
2020-02-14 17:03:35 +08:00
junyulai
4fe16c5214 [SP16] Address comments on aosp/1172143
Test: atest FrameworksNetTests
Test: atest NetworkPolicyManagerServiceTest
Test: m doc-comment-check-docs
Bug: 130855321
Change-Id: Iccaab09f5b9668ec4a7249737c64a69cecb08d15
2020-02-14 16:53:40 +08:00
junyulai
12ddc700c8 [SP12] Remove the usage of getVtDataUsage
Currently NetworkStatsService holding a lock when invoking
getVtDataUsage, which causes a lot of deadlock problems since
Phone will also have binder calls to system_server.

Thus, this change uses a new set of API to break such situation,
that allows VT to report stats asynchronously.

Test: atest FrameworksNetTests FrameworksTelephonyTests
Bug: 130855321
Fix: 143923500

Change-Id: Ifdb8599c3bade09208b4730710fc99da1afad71d
2020-02-14 15:37:16 +08:00
Benedict Wong
ae8b9c5683 Merge "Implement Ikev2VpnRunner" am: e334a83e46 am: c722981400
Change-Id: I0048c33ac9b5b60d2f64a90d7c5d9e5e829cf24d
2020-02-13 21:46:13 +00:00
Benedict Wong
c722981400 Merge "Implement Ikev2VpnRunner" am: e334a83e46
Change-Id: I9b966b52f78fa54dca9d8c3032ec26ed853ad572
2020-02-13 21:31:28 +00:00
Benedict Wong
e334a83e46 Merge "Implement Ikev2VpnRunner" 2020-02-13 21:15:24 +00:00
Benedict Wong
c85b7b0114 Implement Ikev2VpnRunner
This change adds the implementation for IKEv2/IPsec VPNs.

Bug: 144246767
Test: Manually tested
Change-Id: I5ccec756cec49ccf57ccc4d5ad800eeb5d595a76
Merged-In: I5ccec756cec49ccf57ccc4d5ad800eeb5d595a76
2020-02-13 18:37:06 +00:00
Benedict Wong
c2eefbb98a Merge "Implement Ikev2VpnRunner" 2020-02-13 18:36:49 +00:00
Benedict Wong
9ee6603153 Implement Ikev2VpnRunner
This change adds the implementation for IKEv2/IPsec VPNs.

Bug: 144246767
Test: Manually tested
Change-Id: I5ccec756cec49ccf57ccc4d5ad800eeb5d595a76
2020-02-13 00:33:44 -08:00
Automerger Merge Worker
afff4915ec Merge "Fix incorrect interpolation of active bucket for partial requests." am: cb011605cf am: 244299e38b am: 16d7a45bfe
Change-Id: I3a7df5061e0a2a90231072a5cd3e8c799302b346
2020-02-13 08:26:15 +00:00
Automerger Merge Worker
16d7a45bfe Merge "Fix incorrect interpolation of active bucket for partial requests." am: cb011605cf am: 244299e38b
Change-Id: I1d6aa0c23fd227eca478e4a6ab5fd7dd26e4c297
2020-02-13 08:07:01 +00:00
Automerger Merge Worker
244299e38b Merge "Fix incorrect interpolation of active bucket for partial requests." am: cb011605cf
Change-Id: Ibfaf1e3d13ce758323c30381ba44702b6016d9eb
2020-02-13 07:53:18 +00:00
Maciej Żenczykowski
cb011605cf Merge "Fix incorrect interpolation of active bucket for partial requests." 2020-02-13 07:37:57 +00:00
Automerger Merge Worker
d6bf586774 Merge "[SP10] Add IntDef annotations for system api of NetworkStats" am: 9d8a9cbfcc am: 9ec52c9fe8 am: 027902a86c
Change-Id: I0e7322090364fc1724797641276416c07277d0bc
2020-02-12 05:27:01 +00:00
Automerger Merge Worker
027902a86c Merge "[SP10] Add IntDef annotations for system api of NetworkStats" am: 9d8a9cbfcc am: 9ec52c9fe8
Change-Id: Icc69f682437baf209aa537820201be45db6ccf3a
2020-02-12 05:11:59 +00:00
Automerger Merge Worker
9ec52c9fe8 Merge "[SP10] Add IntDef annotations for system api of NetworkStats" am: 9d8a9cbfcc
Change-Id: I4d352ed54671ce77ebbcaa9f0808a0ef703d3c6f
2020-02-12 04:54:02 +00:00
Treehugger Robot
9d8a9cbfcc Merge "[SP10] Add IntDef annotations for system api of NetworkStats" 2020-02-12 04:37:55 +00:00
Automerger Merge Worker
1934036da7 Merge "[SP11] add dumpsys support to dump stats inside providers" am: 2b4a6517bf am: e49c7caae3 am: 6c2c1baecf
Change-Id: I03ea04d5851ae4f911f9c64dbdb235aedf4cea3c
2020-02-12 03:28:19 +00:00
Automerger Merge Worker
6c2c1baecf Merge "[SP11] add dumpsys support to dump stats inside providers" am: 2b4a6517bf am: e49c7caae3
Change-Id: I7c6bf5cb081fb943777988c4d9f40b36f9a16efb
2020-02-12 03:13:22 +00:00
Automerger Merge Worker
e49c7caae3 Merge "[SP11] add dumpsys support to dump stats inside providers" am: 2b4a6517bf
Change-Id: I44f69d27b89c6d0463a5b12b98e0cc3cf8297a33
2020-02-12 02:59:21 +00:00
Treehugger Robot
2b4a6517bf Merge "[SP11] add dumpsys support to dump stats inside providers" 2020-02-12 02:45:38 +00:00
junyulai
8016a35c78 [SP10] Add IntDef annotations for system api of NetworkStats
Test: m -j
Bug: 130855321
Change-Id: I8855ec95d5d086fc14e2eb71558bc2dcd9a830e5
2020-02-11 09:47:03 +00:00
Automerger Merge Worker
a8785a5152 [automerger skipped] Merge changes Iaa6f0d65,I68a16b64 am: e486951a92 am: 8abb5a0520 am: a96f068996 -s ours
am skip reason: Change-Id Iaa6f0d65cab556c24b0a9010427de8e6a02836c1 with SHA-1 7092cf164f is in history

Change-Id: I306a831e47c08ac37de93285763500b73a4624ec
2020-01-31 16:47:44 +00:00
Automerger Merge Worker
a96f068996 Merge changes Iaa6f0d65,I68a16b64 am: e486951a92 am: 8abb5a0520
Change-Id: I7e66156659fb88110d2a7f027d488e15499caee2
2020-01-31 16:43:27 +00:00