Commit Graph

474 Commits

Author SHA1 Message Date
Mark Chien
8efcb8817e Merge "Fix READ_DEVICE_CONFIG permission denied problem in TetheringTests" into rvc-dev am: 1c65357c4b
Change-Id: I7e85c0d8cdcca92943e81f6d08520c8b9e6d6bb3
2020-05-15 00:07:48 +00:00
Treehugger Robot
91b2bda682 Fix READ_DEVICE_CONFIG permission denied problem in TetheringTests
Bug: 156557122
Test: atest TetheringTests

Merged-In: Id9c0397306f3872fc23520d1354f338035a96dc9
Change-Id: Id9c0397306f3872fc23520d1354f338035a96dc9
2020-05-14 17:16:39 +00:00
Mark Chien
b83de9ff49 Merge "Make members final in TetheringService" into rvc-dev am: 73260a5564
Change-Id: I7ec8dbc97ea3ccceac7e2fafc4ab5d53ccd7a630
2020-05-14 05:59:11 +00:00
Mark Chien
73260a5564 Merge "Make members final in TetheringService" into rvc-dev 2020-05-14 05:48:24 +00:00
Nucca Chen
9aba72f7b8 Merge "A minor followup change for BPF offload device option stuff" into rvc-dev am: 8517d037e5
Change-Id: I92b45a1b7d3cb6b05bfb8abd28111d9f0ad3e1a4
2020-05-13 15:19:42 +00:00
Nucca Chen
8517d037e5 Merge "A minor followup change for BPF offload device option stuff" into rvc-dev 2020-05-13 14:58:34 +00:00
Paul Duffin
a6fe2f4797 Merge "Cleanup packages/Tethering/common/TetheringLib" into rvc-dev am: 85f2c79461
Change-Id: I5d84b91a5aa123db4d988beb9ee287e52186e8d8
2020-05-13 14:47:57 +00:00
markchien
c96e106d68 Make members final in TetheringService
1. Move isTetheringSupport logic from TetheringService to Tethering.
2. Small readability improvement in TetheringTest. Also change
config_tether_upstream_automatic from false to true in TetheringTest.
So TetheringTests would default run automatic select upstream flow
instead of selecting by legacy perferred network type list.

Bug: 153609486
Test: atest TetheringTest
Change-Id: I5a82a6347f62d3a7031db5c56e8e0c8530dafd8f
Merged-In: I5a82a6347f62d3a7031db5c56e8e0c8530dafd8f
2020-05-13 22:12:15 +08:00
Paul Duffin
b016744a1a Cleanup packages/Tethering/common/TetheringLib
Merge the otherwise unused tethering-aidl-interfaces into
framework-tethering.

This is in preparation for converting to use java_sdk_library.

Bug: 155164730
Test: m droid
Merged-In: I4583539d11ba69320aa5a0dfcfee072c81affac2
Change-Id: I4583539d11ba69320aa5a0dfcfee072c81affac2
(cherry picked from commit 267dd95c3e93f75c42c3f4e5cf576829b528f6c2)
2020-05-13 13:57:12 +01:00
Mark Chien
ed6b8c51fa Merge "Add test for OffloadHardwareInterface" into rvc-dev am: 5d846418a7
Change-Id: I021c6d8b33c68ac72988233075bce37f61c2c926
2020-05-13 12:30:08 +00:00
Nucca Chen
acc87c875d Merge "Add tether BPF offload config to device config and resource" into rvc-dev am: 224b8bf27e
Change-Id: I93453a575a7d28ba9d5116acc9357afea0f100fe
2020-05-13 10:12:44 +00:00
Maciej Żenczykowski
fd8b4bbe35 A minor followup change for BPF offload device option stuff
- Correct description and spelling in the code and xml files.
- Add a TODO for refactoring the IpServer constructor.
- Refine the if-statement for starting IP neighbor monitor.

Bug: 149997301
Test: atest IpServerTest
Original-Change: https://android-review.googlesource.com/1309273
Merged-In: If9c8bc6f785fa80575db56de4e223292e9807ace
Change-Id: If9c8bc6f785fa80575db56de4e223292e9807ace
2020-05-13 10:06:47 +00:00
Mark Chien
7c23d31127 Add test for OffloadHardwareInterface
Bug: 145490751
Test: atest TetheringTests

Merged-In: Ia402a6caaa0dfaa05d25a02101c515bbd884d33f
Change-Id: Ia402a6caaa0dfaa05d25a02101c515bbd884d33f
2020-05-13 10:06:26 +00:00
Nucca Chen
224b8bf27e Merge "Add tether BPF offload config to device config and resource" into rvc-dev 2020-05-13 09:54:50 +00:00
Nucca Chen
0bbfe12d92 Add tether BPF offload config to device config and resource
The tether bpf offload can be enabled by resource config and
device config. The device config has higher priority and it
could override this config which is set by resource config.

Bug: 149997301
Test: -build, flash, boot
      -atest TetheringConfigurationTest
Original-Change: https://android-review.googlesource.com/1276007

Use device option to control BPF offload features

If BPF offload device config is not enabled:
- Does not add/remove offload forwarding rules through disabling IP
  neighbor monitor.
- Does not apply the RA MTU reduction.

Bug: 149997301
Test: atest IpServerTest
Original-Change: https://android-review.googlesource.com/1284578
Merged-In: I2d6f80f0229f580c4b16243a064e889a6c37f77a
Change-Id: I2d6f80f0229f580c4b16243a064e889a6c37f77a
2020-05-13 09:41:31 +00:00
Jooyung Han
753d22c70b Merge changes I655211e0,Ifaecb49a into rvc-dev am: a89c6163aa
Change-Id: I2491c2702fd2654de5e97073a77183807f41e492
2020-05-13 08:55:56 +00:00
Jooyung Han
d261c58a4a Set min_sdk_version for updatable mainline modules am: 5f9f31c18b
Change-Id: Ib0579b81c28adfbf9ecb54bd33385692d546db7e
2020-05-13 08:55:49 +00:00
Jooyung Han
595adc05e8 InProcessTethering: set min_sdk_version
Modules contributing mainline modules (APK/APEX) should set
min_sdk_version as well as apex_available.

InProcessTethering is a part of com.android.tethering.inprocess,
therefore min_sdk_version is set.

Exempt-From-Owner-Approval: CP from AOSP

Bug: 145796956
Bug: 150999716
Test: m
Merged-In: I655211e0b9aa4bd7cb3718b6f567f0aa1a0176a5
Change-Id: I655211e0b9aa4bd7cb3718b6f567f0aa1a0176a5
(cherry picked from commit ace605ef568fecfe148d2785f4681c9c858487aa)
2020-05-13 08:45:54 +00:00
Jooyung Han
5f9f31c18b Set min_sdk_version for updatable mainline modules
Modules contributing mainline modules (APK/APEX) should set
min_sdk_version as well as apex_available.

For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.

Bug: 145796956
Bug: 150999716
Test: m
Merged-In: Ifaecb49a47a1f43edea3ea06e1cf704a177d1044
Change-Id: Ifaecb49a47a1f43edea3ea06e1cf704a177d1044
(cherry picked from commit 33aa294e96f13906f596e427b96652fe80cf199b)
2020-05-13 16:18:51 +09:00
Mark Chien
440035ae43 Merge "Allow to exempt from entitlement check" into rvc-dev am: 1fe4d26b79
Change-Id: I5936d18a73dffd628075073aeebbf0369370ae1b
2020-05-12 19:40:10 +00:00
Mark Chien
a18a39f8b6 Merge "Address the comment of aosp/1288493" into rvc-dev am: 7c23183b5f
Change-Id: I97ae5e12a900f38e8271455e48e92bdcf0708b34
2020-05-12 18:57:33 +00:00
Mark Chien
662d1a7994 Merge "Refactor the EntitlementManager" into rvc-dev am: 1d02a79a32
Change-Id: I3b09d6077a343df3dbde5dd3b410ba1bd4267146
2020-05-12 18:53:20 +00:00
Bill Yi
c8005575bf Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: I5d700a2f66a5a5e5419c46926034f48a690438ae
2020-05-10 00:00:53 +00:00
markchien
dc3b82db70 Allow to exempt from entitlement check
To exempt from entitlement check, caller need to hold TETHER_PRIVILEGED
permission.

Bug: 141256482
Test: atest TetheringTests

Change-Id: I2eb37f5e92f5f5150a7fb7c25b945e28704d27a0
Merged-In: I2eb37f5e92f5f5150a7fb7c25b945e28704d27a0
2020-05-08 23:13:30 +08:00
Mark Chien
0dafa92b93 Address the comment of aosp/1288493
Bug: 141256482
Test: atest TetheringTests
Merged-In: I0cf337625cee31a47879c59e9b18657ea7624eb4
Change-Id: I0cf337625cee31a47879c59e9b18657ea7624eb4
2020-05-08 11:57:57 +00:00
Mark Chien
1d02a79a32 Merge "Refactor the EntitlementManager" into rvc-dev 2020-05-08 03:03:07 +00:00
Mark Chien
b853a6e5db Merge "Override tethering module APK-in-APEX for Go variant" into rvc-dev am: cca6aad882
Change-Id: I4513b6ad6895b7d2ddeff5405742f578baec700f
2020-05-07 15:31:32 +00:00
Mark Chien
cca6aad882 Merge "Override tethering module APK-in-APEX for Go variant" into rvc-dev 2020-05-07 15:15:59 +00:00
TreeHugger Robot
cb50fc9690 Merge "Use stable networkstack-aidl-interfaces" into rvc-dev am: aa785801da
Change-Id: I621dcbf0c11a3220d996c952639383b4351d67fd
2020-05-07 15:03:01 +00:00
Mark Chien
92afd387fd Refactor the EntitlementManager
1. Change ArraySet usage to BitSet
2. Change mCellularUpstreamPermitted to mLastCellularUpstreamPermitted.

Before this change:
a member variable(mCellularUpstreamPermitted) is
used to check whether cellular upstream is permitted, the code must
ensure to update this variable once entitlement result is changed or the
entitlement check is triggered but does not have a result yet.

In this change:
Instead of storing the information about whether cellular is permitted in
a member variable. The information is recalculated every time when user
call isCellularUpstreamPermitted(). Now isCellularUpstreamPermitted() is
always be used to check whether cellular upstream is permitted no matter
inside or outside EntitlementManager.
This make the code be easier to maintain that we do not need to care
when mCellularUpstreamPermitted need to be updated because the
information would be recalculated every time. And the recalculation is
lock free because this is only used inside tethering while running in
the same thread.

Bug: 141256482
Test: atest TetheringTests

Merged-In: Ic83f42ff4eec38adf039d55d80fcb9b0f16373cc
Change-Id: Ic83f42ff4eec38adf039d55d80fcb9b0f16373cc
2020-05-07 14:46:09 +00:00
Jeongik Cha
1aba7987de Use stable networkstack-aidl-interfaces
Test: m nothing
Bug: 133526962
Original-Change: https://android-review.googlesource.com/1301313
Merged-In: I507f40866d04db5ed3361831e01eaa4dfaf20bed
Change-Id: I507f40866d04db5ed3361831e01eaa4dfaf20bed
2020-05-07 11:48:44 +00:00
Mark Chien
044a749f37 Test tethering log dump am: c96fbe0abe
Change-Id: If48c35a4dde54b4bdd44703f3df6338267b1b542
2020-05-07 08:19:10 +00:00
Mark Chien
c96fbe0abe Test tethering log dump
Bug: 145490751
Test: atest TetheringTests
Merged-In: I01fc6969041711f7a15880144ee5eac591086ecd
Change-Id: I01fc6969041711f7a15880144ee5eac591086ecd
2020-05-07 06:44:43 +00:00
markchien
9548c8580c Override tethering module APK-in-APEX for Go variant
Bug: 155604224
Test: build
Change-Id: I4147173b5f3668491ff9cb7f1f86715b036d6d4b
2020-05-07 14:21:49 +08:00
Anton Hansson
b79d07bb0e Merge "Enable api lint and check_last_api for modules" into rvc-dev am: 3f34b58cee
Change-Id: Iae3492e765d2f1c88b8c587e93b268a4c8aa9907
2020-05-06 09:30:31 +00:00
Anton Hansson
3f34b58cee Merge "Enable api lint and check_last_api for modules" into rvc-dev 2020-05-06 09:28:03 +00:00
Junyu Lai
47285473fe Merge changes from topic "am-99b870448c8c43b2815c42861ac6235c-rvc-dev" into rvc-dev am: df554bb5f8
Change-Id: I80823cfcdd22ece5d59d916addcac74333f22d22
2020-05-06 02:50:23 +00:00
junyulai
f887f54a5c [SP18.5] Create offload controller poll interval to resource am: 2a5f21425a
Change-Id: I7e676c4501b2b4510dfb6566bcd5c30bee6fb154
2020-05-06 02:50:20 +00:00
junyulai
b6ab822c32 [SP18.4] Add unit test for polling network stats in OffloadController am: 14722baf0d
Change-Id: I03775f4efff78e5afc365493408611a863322027
2020-05-06 02:50:15 +00:00
junyulai
8c23b65a4f [SP18.3] Adapt TestableNetworkStatsProviderCbBinder am: b7011d2265
Change-Id: I6dc3600a16dd1379e26e6fe2155f71e841c3c90c
2020-05-06 02:50:13 +00:00
Anton Hansson
5b0be161ad Enable api lint and check_last_api for modules
This adds checking of module api compatibility to the individual module
api rules. Until now, this checking has been done via the monolithic
metalava runs which we are aiming to get rid of.

Now is a good time to do this because we can compare them to the just
finalized version 30 API, which we have no diffs with. Baseline the
existing wifi failures that metalava fails to find in the previous API.

Bug: 144149403
Test: m checkapi
Change-Id: Id222895daa3a769c265965b052a17d5a1ca18462
2020-05-05 19:17:08 +01:00
Junyu Lai
e1a04c04d7 [SP18.6] Make offload controller poll interval configurable
Test: atest TetheringTests
Bug: 149467454

Change-Id: I0b07a0b520dedb479bf863fbfe898ae85b84b0f3
Merged-In: I0b07a0b520dedb479bf863fbfe898ae85b84b0f3
(cherry picked from commit 8371fa281839d5b1a1027936f2f83e59bf5301a3)
2020-05-05 10:50:35 +00:00
junyulai
2a5f21425a [SP18.5] Create offload controller poll interval to resource
Test: atest TetheringConfigurationTest
Bug: 149467454
Change-Id: I8b4ad920a4945504914d3741a9fba5c096fbf452
Merged-In: I8b4ad920a4945504914d3741a9fba5c096fbf452
(cherry-picked from aosp/1299413)
2020-05-05 18:45:53 +08:00
junyulai
14722baf0d [SP18.4] Add unit test for polling network stats in OffloadController
Test: atest OffloadControllerTest
Bug: 149467454
Change-Id: I9b9c9c096a2366aaf383d5c2d567db6682f02dad
Merged-In: I9b9c9c096a2366aaf383d5c2d567db6682f02dad
(cherry-picked from aosp/1295347)
2020-05-05 18:45:42 +08:00
junyulai
b7011d2265 [SP18.3] Adapt TestableNetworkStatsProviderCbBinder
This is a no-op refactoring to adapt new test provider callback.
Also this patch adapts TestLooper to allow better control on
delay messages that will be verified in subsequent tests.

Test: atest OffloadControllerTest
Bug: 149467454
Change-Id: Icfd6ff289d6689ae2d5753d3fe472516c808dc7a
Merged-In: Icfd6ff289d6689ae2d5753d3fe472516c808dc7a
(cherry-picked from aosp/1295346)
2020-05-05 18:45:12 +08:00
Bill Yi
9ab332af75 [automerger skipped] Merge "Import translations. DO NOT MERGE" into rvc-dev am: 43708b4424 -s ours
am skip reason: subject contains skip directive

Change-Id: Ib1c6f5bfb858282b4e0392b7d42c0e311409b652
2020-05-02 04:01:53 +00:00
Bill Yi
43708b4424 Merge "Import translations. DO NOT MERGE" into rvc-dev 2020-05-02 03:52:08 +00:00
Anton Hansson
5dadd627be Merge "Rename module dist files" into rvc-dev am: 7e0949732f
Change-Id: I1b9fa1a580c7340df475cb150fe0373a7191869c
2020-05-01 08:38:34 +00:00
Bill Yi
b4c3fee27f Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: Ib973f0e381ec0c90f5983a266341444cf919bbea
2020-04-30 19:01:25 -07:00
Anton Hansson
03a93bff6d Merge "Fix tethering module lib stub default" into rvc-dev am: f4fe711313
Change-Id: I1d30f0a8603f6d8009e9fea146de5f9481532147
2020-04-30 19:53:34 +00:00