Commit Graph

850 Commits

Author SHA1 Message Date
Nucca Chen
b463014633 Merge "Move BPF offload program from netd to mainline" am: c26848e7bd am: a0d6f9712b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1424189

Change-Id: Ic90ce1bc5a5abd1eb515e5392b2980cdd001dc9f
2020-09-18 04:56:57 +00:00
Nucca Chen
a0d6f9712b Merge "Move BPF offload program from netd to mainline" am: c26848e7bd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1424189

Change-Id: Ia0b8a185f44dac7db365fcb9fc865a82bd552d62
2020-09-18 04:27:28 +00:00
Hungming Chen
56c632caed Move BPF offload program from netd to mainline
Test: as the follows.
$ adb shell ls sys/fs/bpf | grep offload
map_offload_tether_ingress_map
map_offload_tether_limit_map
map_offload_tether_stats_map
prog_offload_schedcls_ingress_tether_ether
prog_offload_schedcls_ingress_tether_rawip

$ adb shell dumpsys netd --short
  TetherController
    BPF ingress map: iif(iface) v6addr -> oif(iface) srcmac ..
      13(rmnet_data3) 2401:e180:8842:6e3:bc6a:2e45:c30:f418 -> ..
    BPF stats (downlink): iif(iface) -> packets bytes errors
      13(rmnet_data3) -> 7 488 0
    BPF limit: iif(iface) -> bytes
      13(rmnet_data3) -> 9223372036854775807

Log:
bpfloader: Loaded object: /apex/com.android.tethering/etc/bpf/offload.o

Change-Id: I71b7efb1f4bd6eb1cd469a0e1e4a56342dc6e579
2020-09-16 20:38:14 +08:00
Bill Yi
8780ad918d Merge mainline-release 6664920 to stage-aosp-master - DO NOT MERGE
Merged-In: I8f9b41ca6388fdeeda287e7919ef05e56f9da1a6
Change-Id: If78e130888b8d4653ef128d747e18cc46844d732
2020-09-13 07:58:42 -07:00
Anton Hansson
6ab81ec60a Merge "Simplify module visibility post build refactor" into stage-aosp-master am: f94c8eb54f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12513172

Change-Id: Iff37388324c3fb1e838c3c7ffc803b96d6e61197
2020-09-07 08:22:05 +00:00
Anton Hansson
9aed13818c Simplify module visibility post build refactor
//visibility:override is no longer needed for impl_library_visibility
to override visibility.

Removing this allows the defaults module to specify better defaults.

- Stub libraries are made publicly visible, via `visibility`
- Impl libraries are private by default, but visibility is extended
  by the modules

Bug: 165017290
Test: m
Exempt-From-Owner-Approval: build refactor
Change-Id: Ibf35bfac5c99a21125f89ba10945f3364217b90f
2020-09-07 07:54:50 +00:00
Bill Yi
ac8f65a544 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I946ba0e5ca40f934bdc7588eb244969103813c4c
2020-09-03 08:32:04 +00:00
Xin Li
82a71b8f72 Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
Mark Chien
36fd800cb1 Merge "Add usesCleartextTraffic to Tethering" am: 3aee2ac91a am: 1ed9e74716
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1402629

Change-Id: If1ea472e2b7e715ab97851394dc8980ad269b7a1
2020-08-18 09:28:57 +00:00
Mark Chien
3aee2ac91a Merge "Add usesCleartextTraffic to Tethering" 2020-08-18 09:04:59 +00:00
markchien
c12b03a935 Add usesCleartextTraffic to Tethering
usesCleartextTraffic needs to be true for the networkstack process so
that the NetworkStack module can use no-encrypted probes to detect
captive portals.

When loaded in the networkstack process, all packages in process must
set usesCleartextTraffic=true, otherwise there may be races causing
the flag not to be set for the process.

Bug: 161860610
Test: CtsTetheringTest, TetheringTests
Change-Id: Ife03ee0c7096ea242eb701b297a69b471e15b436
2020-08-18 09:00:58 +00:00
Chalard Jean
09fdd9236d Merge "Rename Kotlin util files to not include the Kt suffix" am: b1a3247ab4 am: c5d748e694
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1350084

Change-Id: I6362695120ea8669e1da84bb686e886b85efd6a3
2020-08-13 04:26:11 +00:00
Chalard Jean
96924bf201 Rename Kotlin util files to not include the Kt suffix
Callers don't care what language the utilities are written in

Test: builds
Change-Id: Ie212144f36c50db223c05f3fcb6bad745842cb5e
2020-08-12 10:02:50 +09:00
Paul Hu
0ee374a02c Merge "Verify pending intent flags" am: 346a361e93 am: 9caa751767
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1325696

Change-Id: Id37713388c0c2245e708ca1ca81e78d288168dfd
2020-08-10 02:04:40 +00:00
Paul Hu
346a361e93 Merge "Verify pending intent flags" 2020-08-10 01:32:12 +00:00
Chalard Jean
8818498877 Merge changes I33b70b0a,I1074eedb
* changes:
  Remove the services.net-module-wifi module target.
  Revert "Revert "Move Inet[4]AddressUtils to libs/net""
2020-08-07 06:45:15 +00:00
Chalard Jean
78701646dd Revert "Revert "Move Inet[4]AddressUtils to libs/net""
This patch is still needed and should go in now that the
error is fixed.
The patch was submitted into rvc-dev and is already in
rvc-dev-plus-aosp (patch in in ag/11923559, revert
skipped in ag/12072199). A follow-up will remove the
unused services.net-module-wifi target.

Test: originally tested in aosp/1324109
Test: m; manual: flashed, wifi and telephony working
Test: atest NetworkStackCoverageTests
Change-Id: I1074eedb0b0f156a1135e11210ec102de15ea674
Merged-In: Icd141a992c46290c74929785e261a1cd57bc001b
2020-08-07 03:31:04 +00:00
Mark Chien
04720e79b0 Merge "Allow wifi p2p to use legacy dedicated address" am: d2af4d9e2a am: b537c25685
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382398

Change-Id: Ica17499f82135bc96b87ca4071b603bb8cc23053
2020-08-05 06:36:36 +00:00
Mark Chien
d2af4d9e2a Merge "Allow wifi p2p to use legacy dedicated address" 2020-08-05 06:01:37 +00:00
markchien
eb8fec2111 Allow wifi p2p to use legacy dedicated address
Some exsting applications may expect wifi p2p use legacy
"192.168.49.1/24" address. Have a configuration for wifi p2p to
decide whether to use legacy dedicated address or random address.

Bug: 161520826
Test: atest TetheringTests
Change-Id: If79973416a6780ee19ee785c65772b1a2dc1fbf7
2020-08-05 11:03:46 +08:00
paulhu
f603ed5fb8 Verify pending intent flags
All PendingIntent included activity and broadcast should set
FLAG_IMMUTABLE flag.

Bug: 156353008
Test: atest TetheringTests
Change-Id: I4592e914b67ecb8865d7de47797423f27e9ff840
2020-08-04 11:24:33 +08:00
Chalard Jean
493f8b7b69 Merge "Move utils from network stack to libs." am: f97ac209c2 am: d96c683595
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1350083

Change-Id: Ia163bc416e16ce56fc96855c1111a9905b712843
2020-07-31 01:09:46 +00:00
Chalard Jean
f97ac209c2 Merge "Move utils from network stack to libs." 2020-07-31 00:44:46 +00:00
Chiachang Wang
d3a216ae4f Merge "Update language to comply with Android's inclusive language guidance" am: e66098036f am: d85403cc70
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1375618

Change-Id: I8426e89337e60c48ad20677e835d36622d41ed91
2020-07-30 03:17:44 +00:00
Chiachang Wang
e66098036f Merge "Update language to comply with Android's inclusive language guidance" 2020-07-30 02:49:44 +00:00
Chalard Jean
bdcca9246e Move utils from network stack to libs.
This package is using some common utilities from
a library that used to live in the network stack.
A better home for these utilities is frameworks/libs,
so this topic moves the files ther and also changes
the package of some utilities.

See aosp/1350222 and aosp/1350182 for a detailed
description of the specific files that moved.

Test: checkbuild
Change-Id: I76a9b7790f3997e3e6b3c2f75ba6308286457cde
2020-07-29 21:15:48 +09:00
Mark Chien
17cfe5d843 Merge "Always stop dhcp server even it is obsolete" am: 0ae446b50d am: 4f671f3834
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1370217

Change-Id: Ibb1c96fce2435fec3f678d89531ed10a6ddc784f
2020-07-29 04:56:10 +00:00
Chiachang Wang
14aaefcb12 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code
for reference.

Test: m ; atest TetheringTests
Bug: 161896447
Change-Id: Idc58697c72fb00896bee00185fefc50c1a24dd35
2020-07-29 12:05:04 +08:00
markchien
af2670f427 Always stop dhcp server even it is obsolete
If dhcp server is obsolete, explicitly stop it to shut down its thread.

Bug: 161418295
Test: atest CtsTetheringTest
Change-Id: Ic5b876bd23711ec8d832879a7baee0495246b218
2020-07-29 09:55:29 +08:00
Mark Chien
c882e8c995 Merge "Add tethering privileged test" am: af9ec640c9 am: adda81e88f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1345361

Change-Id: Id673131e628856ea57475384160baeac5e10de1b
2020-07-16 04:41:20 +00:00
Mark Chien
af9ec640c9 Merge "Add tethering privileged test" 2020-07-16 04:12:58 +00:00
markchien
88f0428056 Add tethering privileged test
Create TetheringPrivilegedTests which have MAINLINE_NETWORK_STACK
permission, the test can perform various network-related operations
which need CAP_NET_RAW and CAP_NET_ADMIN capabilities.

Bug: 145490751
Test: make TetheringPrivilegedTests
Change-Id: Ic205e5183e066766377c63336d9c5171d4875c6a
2020-07-16 04:12:01 +00:00
Makoto Onuki
aefd8b4e25 Merge "Proper API hierarchy between MODULE_LIBS and PRIV_APPS system APIs" am: df5d88796b am: e39fdf0a5f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1360884

Change-Id: Ie45f32b2d46c8ac989a4a9242017eb4c2b73484b
2020-07-15 16:00:22 +00:00
Makoto Onuki
d682ebc33c Proper API hierarchy between MODULE_LIBS and PRIV_APPS system APIs
Test: build / treehugger
Bug: 146727827
Exempt-From-Owner-Approval: Cherry-picking from goog/master to aosp/master
Merged-in: Ie1ad6711c490c679ebcfacd97154380a8810ba1c
Change-Id: Ie1ad6711c490c679ebcfacd97154380a8810ba1c
2020-07-15 01:36:38 +00:00
Treehugger Robot
218040ca26 Merge "Fix EthernetTetheringTest failure if tethering is not supported" am: dace79b0ac am: 8b74fe1c8b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1352244

Change-Id: I6763589a3af8cd78efc53e0637ff4f9d6ebcef88
2020-07-13 09:35:07 +00:00
Treehugger Robot
dace79b0ac Merge "Fix EthernetTetheringTest failure if tethering is not supported" 2020-07-13 09:05:00 +00:00
markchien
45fb1aae66 Fix EthernetTetheringTest failure if tethering is not supported
Do not run ethernet tethering tests if tethering is not supported
because Tethering APIs would fail. Also skip the test if
EthernetManager is not avaliable. EthernetManager would be null if
there are no FEATURE_ETHERNET and FEATURE_USB_HOST.

Bug: 159869957
Test: atest CtsTetheringTest
Change-Id: I2b9be6799c6edeefc8cd74897a8704dbe80dd061
2020-07-13 15:24:45 +08:00
android-build-team Robot
8e291dea63 Make change and version bump to r_aml_300900700 for mainline module file: packages/Tethering/apex/manifest.json
Change-Id: Ieed62e845451de7c90a0f71a21289003e5ea8b72
2020-07-09 03:16:41 +00:00
Mark Chien
95482b5580 Merge "Skip testPhysicalEthernet if the test run adb over network" into rvc-dev am: a973bf1a56
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12105761

Change-Id: Idd2f94df2e477b33db887d5d7c0d4aebf507cb86
2020-07-09 00:39:52 +00:00
Treehugger Robot
6faf861994 Skip testPhysicalEthernet if the test run adb over network
If the test run adb over network and ethernet is available, it is likely
that adb may run over ethernet. Then the test would fail because adb
would break when ethernet is switching from client mode to server mode.

Bug: 160389275
Test: atest CtsTetheringTest

Merged-In: I57d365d33316881c50c3bf7fd1c98926d10842d3
Change-Id: I57d365d33316881c50c3bf7fd1c98926d10842d3
2020-07-08 05:40:52 +00:00
Treehugger Robot
c8f45d6350 Merge "Skip testPhysicalEthernet if the test run adb over network" am: b68d322521 am: 10daa1daae
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1354445

Change-Id: I5e91a05d90f5f05cdbe7e7b30945d80832759bd2
2020-07-08 05:06:20 +00:00
Treehugger Robot
b68d322521 Merge "Skip testPhysicalEthernet if the test run adb over network" 2020-07-08 04:41:34 +00:00
android-build-team Robot
0076305369 Make change and version bump to r_aml_300900600 for mainline module file: packages/Tethering/apex/manifest.json
Change-Id: Idac701bf872c3e7d5b854c6a19ca0da5d01d6699
2020-07-08 03:17:08 +00:00
android-build-team Robot
ce11e33b62 Make change and version bump to r_aml_300900500 for mainline module file: packages/Tethering/apex/manifest.json
Change-Id: I7daf3a7b2989105022a05e6b3c7d3fdbe165baed
2020-07-07 03:16:56 +00:00
android-build-team Robot
37718b7db0 Make change and version bump to r_aml_300900400 for mainline module file: packages/Tethering/apex/manifest.json
Change-Id: I538efbc8e379b929f50ad1762bdf759ca31cdbb8
2020-07-06 03:16:59 +00:00
android-build-team Robot
806c971702 Make change and version bump to r_aml_300900300 for mainline module file: packages/Tethering/apex/manifest.json
Change-Id: Ic95844fa021e178f665d3cc74e795e510cee29db
2020-07-04 03:16:40 +00:00
android-build-team Robot
5761320c2f Make change and version bump to r_aml_300900200 for mainline module file: packages/Tethering/apex/manifest.json
Change-Id: Ic32f7f6c83b8bc61d3ef93c03857ea205c6b0dbe
2020-07-03 03:17:10 +00:00
Chalard Jean
6b66d70ba1 Revert "Move Inet[4]AddressUtils to libs/net"
This reverts commit cf86031c12.

Reason for revert: Breaks the build b/160390899

Merged-In: Icd141a992c46290c74929785e261a1cd57bc001b
Change-Id: Ie10e66f61393602f17fbb61bf17230b176bf1f44
2020-07-02 23:47:35 +00:00
markchien
37ad92e058 Skip testPhysicalEthernet if the test run adb over network
If the test run adb over network and ethernet is available, it is likely
that adb may run over ethernet. Then the test would fail because adb
would break when ethernet is switching from client mode to server mode.

Bug: 160389275
Test: atest CtsTetheringTest

Change-Id: I57d365d33316881c50c3bf7fd1c98926d10842d3
2020-07-02 23:26:46 +08:00
android-build-team Robot
1a727e2525 Make change and version bump to r_aml_300900100 for mainline module file: packages/Tethering/apex/manifest.json
Change-Id: I182d7ddf35e0684e7b6cb54fed43662a26a9d3dd
2020-07-02 03:16:45 +00:00