Commit graph android_packages_modules_Co.../tests/unit/java
Message SHA1
Merge "Save appIds permissions for each user" am: 7f85379b07 am: 54a472764a
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2052545

Change-Id: I0fdfcb45c508ae01b87471b1716442755cd76fb0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Natasha Lee   authored and   Automerger Merge Worker   commited 2022-04-13 00:59:49 +00:00
e765e2fbc0
Merge "Save appIds permissions for each user"
Natasha Lee   authored and   Gerrit Code Review   commited 2022-04-12 23:55:06 +00:00
7f85379b07
Save appIds permissions for each user
PermissionMonitor does not store any information regarding
traffic permission. It just checks permission from each package
and sends the result to netd. In addition, bpf can store traffic
permissions for appIds only because of memory limitations.

However, there is a mistaken permission overwriting when
different packages are installed on multi-user. Because
PermissionMonitor updates appIds traffic permissions to netd
from each user, so the permission result will depend on the
latest user state.

To fix the problem, save the traffic permissions by each user and
appId on PermissionMonitor. An appId has a permission if and
only if at least one uid in that appId has that permission.

bug: 224775316
Test: atest FrameworksNetTests CtsNetTestCases \
      CtsNetTestCasesUpdateStatsPermission \
      CtsNetTestCasesInternetPermission
Change-Id: Ieb01fb21f6201a58723eb7e6446b127627be2c0e

paulhu   commited 2022-04-12 11:06:46 +00:00
a501e47e19
Merge "Remove NativeDaemonConnector relevant files" am: 631c2387a6 am: 4eaeac9baa
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2059332

Change-Id: If12e2a9dff214da5541d4002b33d313898aa2b18
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Paul Hu   authored and   Automerger Merge Worker   commited 2022-04-12 08:16:33 +00:00
104c01390a
Merge "Remove NativeDaemonConnector relevant files"
Paul Hu   authored and   Gerrit Code Review   commited 2022-04-12 07:37:16 +00:00
631c2387a6
Remove NativeDaemonConnector relevant files
NsdService is using binder call to communicate with
mdnsresponder, so there is no one to use NativeDaemonConnector
now. Thus, remove NativeDaemonConnector relevant files.

Bug: 209894875
Test: atest FrameworksNetTests
Change-Id: Ic70d9417dc85c04c537e09d8f8586a762ac9a97b

paulhu   authored and   Paul Hu   commited 2022-04-12 07:35:31 +00:00
cee953bd09
Merge changes I2c3242f8,Iaa67d5ae am: b3bf5fedab am: f23da94516
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2050859

Change-Id: I6f851d52045a9539eb2300d137e5f80e56c44412
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Maciej Żenczykowski   authored and   Automerger Merge Worker   commited 2022-04-11 21:26:10 +00:00
c0b2a55ae3
Merge "ClatCoordinator: use Java class TcUtils to attach program" am: 932459748a am: 77487413aa
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2028287

Change-Id: I652d8f315fc4e8193bdddd22387426bb8e6af6bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Maciej Żenczykowski   authored and   Automerger Merge Worker   commited 2022-04-11 21:26:01 +00:00
87463ab17e
Merge changes from topic "access_clat_bpf_map_from_clatcoordinator" am: 7b75c07cda am: b8a2781ad7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2024483

Change-Id: I0da79e64472816b2a0e5da7e76691f77a28abe03
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Maciej Żenczykowski   authored and   Automerger Merge Worker   commited 2022-04-11 21:25:52 +00:00
4f58c8c456
Merge changes I2c3242f8,Iaa67d5ae
* changes:
  Remove unused TcUtils{, Test}, bpfhelper from libclat
  ClatCoordinator: use Java class TcUtils to detach program

Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-04-11 20:47:50 +00:00
b3bf5fedab
Merge "ClatCoordinator: use Java class TcUtils to attach program"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-04-11 20:47:26 +00:00
932459748a
Merge changes from topic "access_clat_bpf_map_from_clatcoordinator"
* changes:
  ClatCoordinator: use Java class BpfMap to remove clat rule
  ClatCoordinator: use Java class BpfMap to add clat rule

Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-04-11 20:46:59 +00:00
7b75c07cda
Merge "Use completeExceptionally instead of second future" am: da294fc886 am: 2f4ad45851
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2054246

Change-Id: I2a6e05de781ab69b667fa8b94c686f0aedd9153f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Patrick Rohr   authored and   Automerger Merge Worker   commited 2022-04-07 12:50:47 +00:00
b22f1369c9
Merge "Use completeExceptionally instead of second future"
Patrick Rohr   authored and   Gerrit Code Review   commited 2022-04-07 12:12:32 +00:00
da294fc886
Merge "Update test for new IkeTunnelConnectionParams field" am: 5850372963 am: 73242c8a0e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1976972

Change-Id: I25cd0a8614b8b1c400026f655b34b67fd5116e3e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Chiachang Wang   authored and   Automerger Merge Worker   commited 2022-04-07 11:37:31 +00:00
5e16c68d00
Merge "Update test for new IkeTunnelConnectionParams field"
Chiachang Wang   authored and   Gerrit Code Review   commited 2022-04-07 10:24:03 +00:00
5850372963
Merge changes from topic "MDns_AIDL" am: 09475308b7 am: 06e59627bb
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2049246

Change-Id: I16b7ec71fbfee1dd0de84b1f64d5e9fbbd62f4e3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Paul Hu   authored and   Automerger Merge Worker   commited 2022-04-07 03:10:55 +00:00
ac780d3bd0
Merge changes from topic "MDns_AIDL"
* changes:
  Use MDns aidl on NsdService
  Add MDnsManager

Paul Hu   authored and   Gerrit Code Review   commited 2022-04-07 02:06:35 +00:00
09475308b7
Use MDns aidl on NsdService
- Use MDns aidl to communicate with mdns service and register
  event listener to receive callback.
- Remove all NDC relevant code on NsdService.
- Use MDns aidl on NsdServiceTest.

Bug: 209894875
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: I65929dee3838fef753396e86c665abd66b6fec81

paulhu   commited 2022-04-04 15:18:27 +00:00
2b9ed95ae5
Use completeExceptionally instead of second future
The onError callback can use the same future as the onResult callback by
calling completeExceptionally.
This change is also removing the test for a specific exception message.
Testing for a specific exception message would mean that tests break if we
ever were to update them. If we decide that there is value to
distinguish between different types of
EthernetNetworkManagementException we should probably subclass it
internally.

Test: atest EthernetNetworkFactoryTest
Change-Id: Ib6f8cf79fc26e0f856c880cbe505b101f12aa187

Patrick Rohr   commited 2022-04-04 14:59:42 +02:00
fd87fb65fb
Merge changes Id533cdb4,I6a9ce3d6,I345bf073 into sc-mainline-prod am: c3315f2560
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/17530925

Change-Id: I9e1375f47ab85db92cf602f0be63bac0160aab78
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2022-04-01 08:29:40 +00:00
9dcc6c676d
Merge EthernetServiceTests into FrameworksNetTests
As per the TODO, merge EthernetServiceTests into the larger
FrameworksNetTests suite.

Similarly to NetworkStats, NSD or IpSec tests, the tests are also marked
as "non-connectivity-module-test", where "module" actually refers to
modules being built for release (from an S-based branch) today. This is
necessary as the tests and associated code cannot build without T APIs.

Also add FrameworksNetTests to presubmit as non-connectivity-module
tests are not run in presubmit without this.

Test: TH
Merged-In: Id533cdb4ac184b963f570af299dea04754ba88e9
Change-Id: I9950fcb49fdc2217134a59e993941cbe5da0b556

Remi NGUYEN VAN   commited 2022-04-01 15:12:18 +09:00
40da62da48
Merge EthernetServiceTests into FrameworksNetTests
As per the TODO, merge EthernetServiceTests into the larger
FrameworksNetTests suite.

Similarly to NetworkStats, NSD or IpSec tests, the tests are also marked
as "non-connectivity-module-test", where "module" actually refers to
modules being built for release (from an S-based branch) today. This is
necessary as the tests and associated code cannot build without T APIs.

Also add FrameworksNetTests to presubmit as non-connectivity-module
tests are not run in presubmit without this.

Test: TH
Ignore-AOSP-First: Merged in topic, will be cherry-picked
Change-Id: Id533cdb4ac184b963f570af299dea04754ba88e9

Remi NGUYEN VAN   commited 2022-04-01 15:08:48 +09:00
6ad9287432
ClatCoordinator: use Java class TcUtils to attach program
This a preparation to replace duplicated native functions with the
existing Java class.

Bug: 221213090
Test: atest FrameworksNetTests
Test: manual test
Steps:
1. Connect to IPv6-only wifi
2. Check tc filter on wlan0 and v4-wlan0

$ adb shell tc filter show dev wlan0 ingress
filter protocol ipv6 pref 4 bpf chain 0
filter protocol ipv6 pref 4 bpf chain 0 handle 0x1 prog_clatd_schedcls_ingress6_clat_ether:[*fsobj] direct-action not_in_hw id 23 tag 40918e0675598c8d

$ adb shell tc filter show dev v4-wlan0 egress
filter protocol ip pref 4 bpf chain 0
filter protocol ip pref 4 bpf chain 0 handle 0x1 prog_clatd_schedcls_egress4_clat_rawip:[*fsobj] direct-action not_in_hw id 26 tag 5d0057eab14480b7

$ adb shell tc filter show dev wlan0 egress
(empty)

$ adb shell tc filter show dev v4-wlan0 ingress
(empty)

Change-Id: Id4edbfd87de8f9c5d2fa483b2024718b484cb044

Hungming Chen   commited 2022-03-31 16:04:42 +08:00
3dc0577ed3
ClatCoordinator: use Java class BpfMap to remove clat rule
This a preparation to replace duplicated native functions with the
existing Java class.

Bug: 221213090
Test: atest FrameworksNetTests
Test: manual check

Steps:
1. Connect wlan and check map content {iface index, v4addr, v6addr, pfx96} manually
after clat started.
$ adb shell dumpsys netd
  ClatdController
    BPF ingress map: iif(iface) nat64Prefix v6Addr -> v4Addr oif(iface)
      47(wlan0) 64:ff9b::/96 2a00:79e1:abc:6f02:2479:2f51:25a9:28f1 -> 192.0.0.4 53(v4-wlan0)
    BPF egress map: iif(iface) v4Addr -> v6Addr nat64Prefix oif(iface)
      53(v4-wlan0) 192.0.0.4 -> 2a00:79e1:abc:6f02:2479:2f51:25a9:28f1 64:ff9b::/96 47(wlan0) ether

2. Disconnect wlan and check the bpf map is removed.
$ adb shell dumpsys netd
  ClatdController
    BPF ingress map: iif(iface) nat64Prefix v6Addr -> v4Addr oif(iface)
    BPF egress map: iif(iface) v4Addr -> v6Addr nat64Prefix oif(iface)

Change-Id: Ia0c90c7104c4a42d34a28a5ddf3cf13a289f8c76

Hungming Chen   commited 2022-03-31 16:04:42 +08:00
bd85f8903e
ClatCoordinator: use Java class TcUtils to detach program
This a preparation to replace duplicated native functions with the
existing Java class.

Bug: 221213090
Test: atest FrameworksNetTests
Test: manual test
Steps:
1. Connect to IPv6-only wifi

2. Check tc filter on wlan0 and v4-wlan0

$ adb shell tc filter show dev wlan0 ingress
filter protocol ipv6 pref 4 bpf chain 0
filter protocol ipv6 pref 4 bpf chain 0 handle 0x1 prog_clatd_schedcls_ingress6_clat_ether:[*fsobj] direct-action not_in_hw id 23 tag 40918e0675598c8d

$ adb shell tc filter show dev v4-wlan0 egress
filter protocol ip pref 4 bpf chain 0
filter protocol ip pref 4 bpf chain 0 handle 0x1 prog_clatd_schedcls_egress4_clat_rawip:[*fsobj] direct-action not_in_hw id 26 tag 5d0057eab14480b7

$ adb shell tc filter show dev wlan0 egress
(empty)

$ adb shell tc filter show dev v4-wlan0 ingress
(empty)

3. Disconnect from wifi

4. Check tc filter on wlan0 and v4-wlan0

$ adb shell tc filter show dev wlan0 ingress
(empty)

$ adb shell tc filter show dev v4-wlan0 egress
(empty)

$ adb shell tc filter show dev wlan0 egress
(empty)

$ adb shell tc filter show dev v4-wlan0 ingress
(empty)

Change-Id: Iaa67d5ae7c867d791d5f92a70a54bf549085053a

Hungming Chen   commited 2022-03-31 16:04:42 +08:00
cddd855f9e
ClatCoordinator: use Java class BpfMap to add clat rule
This a preparation to replace duplicated native functions with the
existing Java class.

Bug: 221213090
Test: atest FrameworksNetTests
Test: check map content {iface index, v4addr, v6addr, pfx96} manually.
The map fileds are the same as "ip addr" and clatd logging.

$ adb shell dumpsys netd
ClatdController
  BPF ingress map: iif(iface) nat64Prefix v6Addr -> v4Addr oif(iface)
    47(wlan0) 64:ff9b::/96 2a00:79e1:abc:6f02:f9e1:8c2d:604e:bc06 -> 192.0.0.4 53(v4-wlan0)
  BPF egress map: iif(iface) v4Addr -> v6Addr nat64Prefix oif(iface)
    53(v4-wlan0) 192.0.0.4 -> 2a00:79e1:abc:6f02:f9e1:8c2d:604e:bc06 64:ff9b::/96 47(wlan0) ether

$ adb shell ip addr
47: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 ..
53: v4-wlan0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1472 ..

03-14 18:35:04.822 30852 30852 I clatd   : Starting clat version 1.5 on wlan0 plat=64:ff9b:: v4=192.0.0.4 v6=2a00:79e1:abc:6f02:f9e1:8c2d:604e:bc06

Change-Id: I91d0cb6e76c4ef7bacf91b996786308ff4918f35

Hungming Chen   commited 2022-03-31 15:53:33 +08:00
07fcf9ca49
Update test for new IkeTunnelConnectionParams field
Bug: 184750836
Test: atest FrameworksNetTests
Change-Id: Iab55eba74b94f295a358c6e8474ebf9230c9b019

Chiachang Wang   commited 2022-03-31 14:45:59 +08:00
69aa988090
Merge "Revert "Use RECEIVER_NOT_EXPORTED in CarrierPrivilegeAuthenticator."" am: 3e712761a4 am: fb709dc8c6
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2037088

Change-Id: I1eba6a8fbba7245f7509c39cfdb9b23d7a930f94
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Michael Groover   authored and   Automerger Merge Worker   commited 2022-03-31 02:16:47 +00:00
796d71ca3c
Merge "Revert "Use RECEIVER_NOT_EXPORTED in CarrierPrivilegeAuthenticator."" am: 3e712761a4
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2037088

Change-Id: Ia528f780a047f6e0807e92fee2761d1adb6c951e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Michael Groover   authored and   Automerger Merge Worker   commited 2022-03-31 02:00:40 +00:00
fb709dc8c6
Merge "Revert "Use RECEIVER_NOT_EXPORTED in CarrierPrivilegeAuthenticator.""
Michael Groover   authored and   Gerrit Code Review   commited 2022-03-31 01:39:28 +00:00
3e712761a4
Merge "Don't throw in FullScore#policyNameOf." am: 644fe232cd am: 35b6c1eeaa
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2041564

Change-Id: I35841a2ebfd1ad184e73af3534f702e1d6b9ac0f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2022-03-29 09:45:38 +00:00
25b7de3902
Merge "Don't throw in FullScore#policyNameOf." am: 644fe232cd
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2041564

Change-Id: I7143d220336b50b106cad79d890f49b77654a51c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2022-03-29 08:46:06 +00:00
35b6c1eeaa
Merge "Don't throw in FullScore#policyNameOf."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2022-03-29 08:38:21 +00:00
644fe232cd
Don't throw in FullScore#policyNameOf.
This code is correct on userdebug builds, but it is dangerous on
user builds because proguard might strip out the POLICY_*
constants and that would lead to crashes.

For now just log a wtf if an invalid policy name is found. A
better solution would be to make MessageUtils robust to this
problem, e.g., by having it store the SparseArray internally and
providing getters that do not throw, instead of the current
behaviour that returns the SparseArray. That is left to a future
CL.

Fix: 227161413
Test: atest FullScoreTest
Change-Id: I68b69ee9dd84773018e62c9a8f43e754ae04c486

Lorenzo Colitti   commited 2022-03-29 08:38:06 +00:00
1727d9f1f2
Merge "Add tests for VPN validation in NetworkMonitor" am: 59e6e2b730 am: a0bcacf630
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1976726

Change-Id: If736e6425fd607ed2ce3a94d3fe20440d87fd8b0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Chiachang Wang   authored and   Automerger Merge Worker   commited 2022-03-28 14:26:14 +00:00
18facb5f86
Merge "Add tests for VPN validation in NetworkMonitor" am: 59e6e2b730
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1976726

Change-Id: Ibe77ebefbfa4d26e51462446d7d475a7212bbd25
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Chiachang Wang   authored and   Automerger Merge Worker   commited 2022-03-28 14:04:36 +00:00
a0bcacf630
Merge "Add tests for VPN validation in NetworkMonitor"
Chiachang Wang   authored and   Gerrit Code Review   commited 2022-03-28 13:51:34 +00:00
59e6e2b730
Use Sources.bp for building
Reference Sources.bp from Android.bp, so that they are used as build
files.

Sources.bp is separate from Android.bp as it was migrated from the
Android.bp files in the old code location. They can be merged into the
main Android.bp file (or removed by removing the filegroups) after the
migration is done.

Also remove references to the AIDL filegroups, as files are now merged
into the common framework/aidl-export directory which is used as include
directory for aidl source generation already, so they do not need to be
referenced separately. framework/aidl-export can contain AIDLs for S-
API classes that became updatable API in T (the contents of
framework-t), as they are the same as any other API class for the
purposes of AIDL code generation: it's OK for any S+ code to reference
S+ API classes.

Finally, fix reference to mByteStream in IpConfigStoreTest. It was
already wrong but did not break the build because the test was not being
built in the old location.

Bug: 222234190
Test: TH
Merged-In: I81893df9f327abb84f1561b2b33027a2d23a4d65
Merged-In: I67c703e3f7aa9d5787f032a79ed62e45412baf4f
Change-Id: I9093f9ae2f9d76e597f20de48680e459891755b4

Remi NGUYEN VAN   commited 2022-03-25 14:58:43 +00:00
0395b70000
Merge history of ConnectivityT
Renamed files/directories:
ConnectivityT/service/Android.bp --> service-t/Sources.bp
ConnectivityT/framework-t/Android.bp --> framework-t/Sources.bp
ConnectivityT/framework-t/aidl-export --> framework/aidl-export
ConnectivityT/service --> service-t
ConnectivityT/framework-t --> framework-t
ConnectivityT/tests --> tests
ConnectivityT/OWNERS --> (removed)

BUG: 222234190
TEST: TH
Ignore-AOSP-First: Move with history done per-branch
Merged-In: I81893df9f327abb84f1561b2b33027a2d23a4d65
Merged-In: I67c703e3f7aa9d5787f032a79ed62e45412baf4f
Change-Id: I27a91f1a94f9d807f92762436f533c4b0d0114d5

Remi NGUYEN VAN   commited 2022-03-25 11:02:45 +00:00
700ffc994f
Use Sources.bp for building
Reference Sources.bp from Android.bp, so that they are used as build
files.

Sources.bp is separate from Android.bp as it was migrated from the
Android.bp files in the old code location. They can be merged into the
main Android.bp file (or removed by removing the filegroups) after the
migration is done.

Also remove references to the AIDL filegroups, as files are now merged
into the common framework/aidl-export directory which is used as include
directory for aidl source generation already, so they do not need to be
referenced separately. framework/aidl-export can contain AIDLs for S-
API classes that became updatable API in T (the contents of
framework-t), as they are the same as any other API class for the
purposes of AIDL code generation: it's OK for any S+ code to reference
S+ API classes.

Finally, fix reference to mByteStream in IpConfigStoreTest. It was
already wrong but did not break the build because the test was not being
built in the old location.

Bug: 222234190
Test: TH
Merged-In: I1fe5091361c7766dc7b6b4fb8c7b62d403e950bb
Change-Id: If738f607be84b3d7e2045a83a4d2976ed0d4e188

Remi NGUYEN VAN   commited 2022-03-25 09:46:39 +00:00
af582a015b
Merge history of ConnectivityT
Renamed files/directories:
ConnectivityT/service/Android.bp --> service-t/Sources.bp
ConnectivityT/framework-t/Android.bp --> framework-t/Sources.bp
ConnectivityT/framework-t/aidl-export --> framework/aidl-export
ConnectivityT/service --> service-t
ConnectivityT/framework-t --> framework-t
ConnectivityT/tests --> tests
ConnectivityT/OWNERS --> (removed)

BUG: 222234190
TEST: TH
Merged-In: I1fe5091361c7766dc7b6b4fb8c7b62d403e950bb
Change-Id: Ib592434ff50c06e25894f6ed7d7e3e8e1e3ea67b

Remi NGUYEN VAN   commited 2022-03-24 14:19:13 +00:00
3464805acc
Add tests for VPN validation in NetworkMonitor
Test: New tests in this patch
      also FrameworksNetTests
Test: atest CtsNetTestCases CtsNetTestCasesLatestSdk
Change-Id: I68aa5201ad94531e5a40999816844faef5531525

Chalard Jean   authored and   Chiachang Wang   commited 2022-03-23 11:19:44 +00:00
2f23fa51d8
Revert "Use RECEIVER_NOT_EXPORTED in CarrierPrivilegeAuthenticator."
This reverts commit 7569d51446.

Reason for revert: ag/17318348 moved the declaration of the protected-broadcasts from the telephony package to the platform's manifest, so a flag is no longer required when registering for these. In addition, ag/17307852 is syncing the behavior of unexported runtime receivers with that of manifest receivers by limiting the UIDs that can broadcast to these receivers to the root and system UIDs; with the RECEIVER_NOT_EXPORTED flag from this commit, these receivers would no longer be able to receive these broadcasts when sent from the telephony UID.

Bug: 225999840
Change-Id: Ifb15506434edabdfacf84c302881d0cf97d3add8

Michael Groover   commited 2022-03-23 02:04:57 +00:00
eef36c8917
Merge "ClatCoordinator: wrap clatd information" am: a59eec920c am: 594085e774
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2028283

Change-Id: Ibac408578db2f9ecceaffe23e9c4d22850e080e8

Nucca Chen   authored and   Automerger Merge Worker   commited 2022-03-22 09:51:28 +00:00
f5549f8a64
Merge "ClatCoordinator: wrap clatd information"
Nucca Chen   authored and   Gerrit Code Review   commited 2022-03-22 08:40:15 +00:00
a59eec920c
ClatCoordinator: wrap clatd information
This is a preparation for accessing BPF program and map from existing
Java class. The new class ClatdTracker stores the clatd information
for forking clatd, accessing BPF maps and attaching BPF programs.
Using an object is easier to pass all required parameters and reuse
known resource.

Also refactor existing function and rename existing variables for this
commit.

Bug: 221213090
Test: atest FrameworksNetTests
Change-Id: I02ea889de89329c52710726fbcf1d2eac61707d7

Hungming Chen   commited 2022-03-22 15:20:17 +08:00
328d15271b
Merge "Allow sending of Administrator UIDs for *NETWORK_STACK" am: 0e75662808 am: e26f8d1bfe
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1761211

Change-Id: I520b6c1bc6b8c1676c50a4d1bffb3df8cdfb18a2

Benedict Wong   authored and   Automerger Merge Worker   commited 2022-03-19 02:04:37 +00:00
b5f372e724
Allow sending of Administrator UIDs for *NETWORK_STACK
This change allows callers with the NETWORK_STACK or
PERMISSION_NETWORK_STACK to receive administrator UIDs. This will be
used by the VCN to ensure that administrator UIDs are accurately
populated, ensuring that the ConnectivityDiagnostics are triggered for
the VCN.

Bug: 193204385
Test: atest ConnectivityServiceTest
Change-Id: I3ecfbef6847dcc78adac05d0229719c97e3a220c

Benedict Wong   commited 2022-03-18 21:52:57 +00:00
a5604ea50f
Merge "Setup permissions for SDK sandbox UIDs." am: b643f2a356 am: f67e7c6352
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2020099

Change-Id: I2149a7fb2dc77b5106091d1401cdcb620f2166ba

Martijn Coenen   authored and   Automerger Merge Worker   commited 2022-03-18 14:12:11 +00:00
e9b000e4a9