Commit Graph

6486 Commits

Author SHA1 Message Date
Chenbo Feng
fea374cf05 Merge "[automerger skipped] Merge "Move NetworkStatsFactory into service directory" am: d82ae27bca am: deebc4f16b -s ours
am: 3427f091e0 -s ours
am skip reason: change_id Ifcfe4df81caf8ede2e4e66a76552cb3200378fa8 with SHA1 0b1e7e9243 is in history

Change-Id: Ica19aba40268a7e4facbc35cb108ab9fdc1c1ada
2019-04-08 14:11:16 -07:00
Chenbo Feng
c01600fffb [automerger skipped] Merge "Move NetworkStatsFactory into service directory" am: d82ae27bca
am: deebc4f16b -s ours
am skip reason: change_id Ifcfe4df81caf8ede2e4e66a76552cb3200378fa8 with SHA1 0b1e7e9243 is in history

Change-Id: I419ae9923a510c9691c8c88911ac45fe76846166
2019-04-08 12:06:35 -07:00
Remi NGUYEN VAN
98236605a9 [automerger skipped] Merge "Move attach*Filter() and addArpEntry() methods to NetworkStack" into qt-dev am: 7d4a9b5b26
am: f1d0b3b6b0 -s ours
am skip reason: change_id I66d7b3e4fbfa32bb0bc853e8cf9399031daff8a9 with SHA1 4bc52348e7 is in history

Change-Id: I7c96e3a278b0b7b6ffe3d923af05e896c024903f
2019-04-08 01:55:16 -07:00
Remi NGUYEN VAN
f1d0b3b6b0 Merge "Move attach*Filter() and addArpEntry() methods to NetworkStack" into qt-dev
am: 7d4a9b5b26

Change-Id: I2ba0d7efdce68bea09e877827573cfcb13334b6e
2019-04-08 01:46:02 -07:00
Remi NGUYEN VAN
90a169ab37 Move attach*Filter() and addArpEntry() methods to NetworkStack
The SocketUtils.attach*Filter and SocketUtils.addArpEntry methods
were added there because they could not be added as JNI inside
the NetworkStack. This was not possible because on Go devices,
the NetworkStack was a jar library. But now, Go also uses an APK.
Hence, move these methods to the NetworkStack.

Fixes: 129433183
Merged-In: I66d7b3e4fbfa32bb0bc853e8cf9399031daff8a9
(cherry picked from commit 4bc52348e7)

Change-Id: Ice433a41469e784385f19498c154345d7b9c69b5
2019-04-08 01:41:39 +00:00
Chenbo Feng
deebc4f16b Merge "Move NetworkStatsFactory into service directory"
am: d82ae27bca

Change-Id: If92f556cbf3badcb057a3b6e43bb3ef74d0c9ac0
2019-04-05 13:26:28 -07:00
Treehugger Robot
d82ae27bca Merge "Move NetworkStatsFactory into service directory" 2019-04-05 19:27:22 +00:00
Remi NGUYEN VAN
4bc52348e7 Merge "Merge "Move attach*Filter() and addArpEntry() methods to NetworkStack" am: 4249e2957a am: 94b35b5e96" into qt-dev-plus-aosp
am: d77d95df7a

Change-Id: I66d7b3e4fbfa32bb0bc853e8cf9399031daff8a9
2019-04-05 04:44:45 -07:00
Remi NGUYEN VAN
59a9aa3978 Merge "Merge "Call clearCallingIdentity before notifyDnsResponse" am: 9b1d33aecb am: f3821efd4d" into qt-dev-plus-aosp
am: 55f9b6eaca

Change-Id: I2b1dfae776ecd4f5d68c1a8c5a63b3fa12230729
2019-04-05 04:23:40 -07:00
Remi NGUYEN VAN
3e5408b1b5 Merge "Move attach*Filter() and addArpEntry() methods to NetworkStack" am: 4249e2957a
am: 94b35b5e96

Change-Id: If5c236c85585a440bfb645cff9d3cb0bb4e11102
2019-04-05 03:31:36 -07:00
Remi NGUYEN VAN
4b231dd390 Merge "Call clearCallingIdentity before notifyDnsResponse" am: 9b1d33aecb
am: f3821efd4d

Change-Id: I5e3d6aacbeaba7346e014875a457a0ac52977ead
2019-04-05 03:22:16 -07:00
Remi NGUYEN VAN
94b35b5e96 Merge "Move attach*Filter() and addArpEntry() methods to NetworkStack"
am: 4249e2957a

Change-Id: I1d6a490a42f68d01e3d0649035cd0015cb522da3
2019-04-04 23:50:27 -07:00
Remi NGUYEN VAN
4249e2957a Merge "Move attach*Filter() and addArpEntry() methods to NetworkStack" 2019-04-05 06:38:08 +00:00
Remi NGUYEN VAN
f3821efd4d Merge "Call clearCallingIdentity before notifyDnsResponse"
am: 9b1d33aecb

Change-Id: I21d52314f332a12bdd96d8f20e68a3eb38f70d6b
2019-04-04 19:02:18 -07:00
Remi NGUYEN VAN
9b1d33aecb Merge "Call clearCallingIdentity before notifyDnsResponse" 2019-04-05 01:54:08 +00:00
Remi NGUYEN VAN
1dd32bfb43 Merge "Add common tests for FrameworksBaseTests and CTS" am: 1203eebc1b am: 9e81a98dcb
am: 55fe731afd

Change-Id: Ic78ff947250871fa773252c924f1dee9395c6074
2019-04-04 09:47:10 -07:00
Lorenzo Colitti
dfee1bb21a Merge "Fix flaky UdpEncapsulationSocket test" am: e807af1b0a am: da072e124a
am: a06b814245

Change-Id: Iad9aea4b42cd8b31a5a2659bb9cb54dd1c64e8b7
2019-04-04 09:29:35 -07:00
Remi NGUYEN VAN
55fe731afd Merge "Add common tests for FrameworksBaseTests and CTS" am: 1203eebc1b
am: 9e81a98dcb

Change-Id: I863ffea6358a353986cee7b1c76622c434310bba
2019-04-04 09:25:22 -07:00
Lorenzo Colitti
a06b814245 Merge "Fix flaky UdpEncapsulationSocket test" am: e807af1b0a
am: da072e124a

Change-Id: Idf040a67e53d9b9ec6e6c647ce24f8ada501d355
2019-04-04 09:18:29 -07:00
Remi NGUYEN VAN
9e81a98dcb Merge "Add common tests for FrameworksBaseTests and CTS"
am: 1203eebc1b

Change-Id: I1616831ad8f143298b80ebce9af205f8e50de1f8
2019-04-04 05:42:21 -07:00
Treehugger Robot
1203eebc1b Merge "Add common tests for FrameworksBaseTests and CTS" 2019-04-04 12:29:44 +00:00
paulhu
997cdf5be2 Merge "Fix ConnectivityServiceTest fail." am: 4116929c12 am: 3527957a9f
am: 716a9412cd

Change-Id: Ic77ef73841266da487401ffd657ef63562b6fc1e
2019-04-04 01:53:31 -07:00
Lorenzo Colitti
da072e124a Merge "Fix flaky UdpEncapsulationSocket test"
am: e807af1b0a

Change-Id: I4d6cc85fcd539a38674fc3daff1af57fa1bdd2f7
2019-04-04 01:38:02 -07:00
Lorenzo Colitti
e807af1b0a Merge "Fix flaky UdpEncapsulationSocket test" 2019-04-04 08:09:06 +00:00
paulhu
716a9412cd Merge "Fix ConnectivityServiceTest fail." am: 4116929c12
am: 3527957a9f

Change-Id: I7f185e731db91c30a9b0f14aefbdbb067942190e
2019-04-04 00:57:26 -07:00
paulhu
ed89a27bca Merge "Fix ConnectivityServiceTest fail." am: 4116929c12 am: 3527957a9f
am: e77aa6c76b

Change-Id: I0230ea353a91283328c8df06ca5a89af99c40468
2019-04-03 18:47:51 -07:00
paulhu
e77aa6c76b Merge "Fix ConnectivityServiceTest fail." am: 4116929c12
am: 3527957a9f

Change-Id: I7896f6c47478df6f4b70b68da98694f4b0e1563f
2019-04-03 17:57:14 -07:00
Benedict Wong
ce3b747a3d Fix flaky UdpEncapsulationSocket test
This commit reduces the flakiness of the
testOpenAndCloseUdpEncapsulationSocket by retrying up to three times.
Unfortunately, testing port-selected socket creation is racy against
other applications. This helps to handle the same race condition as done
in IpSecService#bindToRandomPort

Bug: 128024100
Test: 200x runs of testOpenAndCloseUdpEncapsulationSocket
Change-Id: I7e036ce821019dbac6c50899bd0894e89d2fe82a
2019-04-03 17:52:03 -07:00
Bill Rassieur
753f1c2b34 Merge master@5428150 into git_qt-dev-plus-aosp.
am: 5bf9057c82

Change-Id: I49b4a82ccabbcdd0b2b2be3abf95d796414666c6
2019-04-03 17:50:35 -07:00
paulhu
3527957a9f Merge "Fix ConnectivityServiceTest fail."
am: 4116929c12

Change-Id: If3f7a3cbf2ed1a180a3b09872512a5f91bddd89c
2019-04-03 17:24:39 -07:00
Treehugger Robot
4116929c12 Merge "Fix ConnectivityServiceTest fail." 2019-04-03 23:54:38 +00:00
TreeHugger Robot
63052bfe30 Merge "Move NetworkStatsFactory into service directory" 2019-04-03 23:44:26 +00:00
Bill Rassieur
8324718255 Merge master@5406228 into git_qt-dev-plus-aosp.
am: d831a04b97

Change-Id: I684e995988f5a8ef330fbbf55da7ae9230f0cfc2
2019-04-03 16:41:27 -07:00
Chenbo Feng
0b1e7e9243 Move NetworkStatsFactory into service directory
In order to notify netd to swap eBPF maps before pulling the
networkStats from eBPF maps, NetworkStatsFactory need to use the
NetdServices to issue binder calls. So it need to be moved from
framework/base/core to framework/base/service since object in
framework/base/core cannot get any system services. This change is also
necessary for setting up a lock inside NetworkStatsFactory to prevent
racing between two netstats caller since the lock need to be hold before
netd trigger the map swap.

Also fix the compile problem caused by moving the NetworkStatsFactory
and the related tests. Rename the packages and the jni functions to a
more proper name.

Bug: 124764595
Bug: 128900919
Test: NetworkStatsFactoryTest
      android.app.usage.cts.NetworkUsageStatsTest
      android.net.cts.TrafficStatsTest

Change-Id: Ifcfe4df81caf8ede2e4e66a76552cb3200378fa8
2019-04-03 14:28:41 -07:00
Chalard Jean
5aac3d3b42 Merge "Straighten AIDL interface for the memory store" 2019-04-03 19:58:46 +00:00
Chenbo Feng
204b9003a5 Move NetworkStatsFactory into service directory
In order to notify netd to swap eBPF maps before pulling the
networkStats from eBPF maps, NetworkStatsFactory need to use the
NetdServices to issue binder calls. So it need to be moved from
framework/base/core to framework/base/service since object in
framework/base/core cannot get any system services. This change is also
necessary for setting up a lock inside NetworkStatsFactory to prevent
racing between two netstats caller since the lock need to be hold before
netd trigger the map swap.

Also fix the compile problem caused by moving the NetworkStatsFactory
and the related tests. Rename the packages and the jni functions to a
more proper name.

Bug: 124764595
Bug: 128900919
Test: NetworkStatsFactoryTest
      android.app.usage.cts.NetworkUsageStatsTest
      android.net.cts.TrafficStatsTest

Merged-In: Ifcfe4df81caf8ede2e4e66a76552cb3200378fa8
Change-Id: Ifcfe4df81caf8ede2e4e66a76552cb3200378fa8
2019-04-03 11:33:40 -07:00
Chenbo Feng
0c53fbe58f Merge "Clean up permissions when uids are no longer used" am: aa949eeae0 am: 26f1e2dbb1
am: 0bb39c6870

Change-Id: I7773132d11d6225eac91ab2fee1043159c295d83
2019-04-03 11:03:32 -07:00
Chenbo Feng
0bb39c6870 Merge "Clean up permissions when uids are no longer used" am: aa949eeae0
am: 26f1e2dbb1

Change-Id: I256ca6f16ea1fcd240a1b7cd2b3199d4504e6c33
2019-04-03 10:50:39 -07:00
Chenbo Feng
26f1e2dbb1 Merge "Clean up permissions when uids are no longer used"
am: aa949eeae0

Change-Id: I3c06a36368abb9a1e7885d281ea1155fce857eea
2019-04-03 10:38:57 -07:00
Treehugger Robot
aa949eeae0 Merge "Clean up permissions when uids are no longer used" 2019-04-03 17:15:48 +00:00
paulhu
94f580a6f2 Fix ConnectivityServiceTest fail.
NetdService#getInstance() will get null object in
WrappedConnectivityService constructor. Then pass this null
INetd object to PermissionMonitor will case NPE in
PermissionMonitor#sendPackagePermissionsToNetd()

Bug: None
Test: atest FrameworksNetTests
Change-Id: Ia1c80f9600a19c4aaf3f3c1b497b355d96c49c8e
2019-04-04 00:07:40 +08:00
lucaslin
a024949a69 Merge "Fix NetworkMonitor won't do private dns resolution" am: 3c5b0fd9db am: cacb33bbe9
am: 3b8eb0b360

Change-Id: I2785e0aedd229aba6c1d8e8df09ee5c7a209b74c
2019-04-03 04:35:21 -07:00
lucaslin
3b8eb0b360 Merge "Fix NetworkMonitor won't do private dns resolution" am: 3c5b0fd9db
am: cacb33bbe9

Change-Id: I5ec0cb096f2704e21e0c0f296d5cf81ab8808627
2019-04-03 04:25:18 -07:00
lucaslin
cacb33bbe9 Merge "Fix NetworkMonitor won't do private dns resolution"
am: 3c5b0fd9db

Change-Id: I7c7a573bef77ba952219e6f6f56ab11f0211e0a7
2019-04-03 04:13:48 -07:00
Mark Chien
de9d6db457 Merge "Some cleanups for Tethering" am: 3f3d4bcb82 am: df676cf2d7
am: de38107021

Change-Id: I0f5c8f33f13dfa2366992a2b2e0ada7667b90e2f
2019-04-03 03:54:42 -07:00
Treehugger Robot
3c5b0fd9db Merge "Fix NetworkMonitor won't do private dns resolution" 2019-04-03 10:50:09 +00:00
Mark Chien
de38107021 Merge "Some cleanups for Tethering" am: 3f3d4bcb82
am: df676cf2d7

Change-Id: I0e00187f9a5eee9e55f961ce0458c9b91af19fb7
2019-04-03 03:45:05 -07:00
Mark Chien
df676cf2d7 Merge "Some cleanups for Tethering"
am: 3f3d4bcb82

Change-Id: Ifb60c76855a2bea5a1cccf26034e6c582ad16021
2019-04-03 03:35:42 -07:00
Mark Chien
3f3d4bcb82 Merge "Some cleanups for Tethering" 2019-04-03 10:16:25 +00:00
Remi NGUYEN VAN
4a2659dd0f Add common tests for FrameworksBaseTests and CTS
The common package covers tests that should be included both in CTS and
unit tests.

Test: atest FrameworksBaseTests
Bug: 129199908
Change-Id: I9c138d49ce010edde095e4bd3c47e36ca301634a
2019-04-03 18:53:04 +09:00