58095 Commits

Author SHA1 Message Date
Treehugger Robot
8f40ffebae Merge "Fix READ_DEVICE_CONFIG permission denied problem in TetheringTests" 2020-05-14 16:00:27 +00:00
markchien
32e772f9ce Fix READ_DEVICE_CONFIG permission denied problem in TetheringTests
Bug: 156557122
Test: atest TetheringTests

Change-Id: Id9c0397306f3872fc23520d1354f338035a96dc9
2020-05-14 16:42:22 +08:00
Xiao Ma
1e83ce23e1 Merge "Support MirrorLink DHCPDECLINE." 2020-05-14 06:27:16 +00:00
Treehugger Robot
5d36f01873 Merge "Make members final in TetheringService" 2020-05-13 16:04:58 +00:00
Xiao Ma
2b539941ba Support MirrorLink DHCPDECLINE.
Add the specific implementation of onNewPrefixRequest callback
on IpServer side, also refactor some common code.

Bug: 130741856
Test: atest TetheringTests
Change-Id: If2871bf899cb5890bbfee18063a194c92b6f474e
2020-05-13 23:29:49 +09:00
markchien
9ee6a954fd 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 12:25:15 +00:00
Paul Duffin
8adff7229c Merge "Cleanup packages/Tethering/common/TetheringLib" 2020-05-13 10:40:43 +00:00
Paul Duffin
267dd95c3e 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
Change-Id: I4583539d11ba69320aa5a0dfcfee072c81affac2
2020-05-13 09:56:18 +01:00
Mark Chien
f77020b25e Merge "Add test for OffloadHardwareInterface" 2020-05-13 08:39:32 +00:00
markchien
2c5c657ab1 Add test for OffloadHardwareInterface
Bug: 145490751
Test: atest TetheringTests

Change-Id: Ia402a6caaa0dfaa05d25a02101c515bbd884d33f
2020-05-13 14:36:42 +08:00
Inseob Kim
4f2a6a2405 Remove sys.vdso property
This is an experimental property on Q and doesn't need anymore.

Exempt-From-Owner-Approval: cherry-pick

Bug: 154885206
Test: N/A
Change-Id: Ibb09e17703fbc95fe41542d335311b68553502a0
Merged-In: Ibb09e17703fbc95fe41542d335311b68553502a0
(cherry picked from commit dfafe03cb45b249ecdab38cb8015156453820a3c)
2020-05-13 12:06:33 +09:00
Hungming Chen
a4e6f7b68c 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.

Test: atest IpServerTest
Change-Id: If9c8bc6f785fa80575db56de4e223292e9807ace
2020-05-12 19:15:24 +08:00
Nucca Chen
c26ad188b7 Merge changes I2d6f80f0,I9c26852d
* changes:
  Use device option to control BPF offload features
  Add tether BPF offload config to device config and resource
2020-05-12 11:00:04 +00:00
Treehugger Robot
963c11e32d Merge "Add day-night-mode permission to Shell." 2020-05-11 22:36:27 +00:00
Treehugger Robot
1b9f4b926c Merge "Grant ACCESS_SHARED_LIBRARIES permission to Shell for testing." 2020-05-11 22:18:57 +00:00
Hai Zhang
68cc951bf6 Grant ACCESS_SHARED_LIBRARIES permission to Shell for testing.
Bug: 154348597
Test: presubmit
Change-Id: I75f07b88c6eca9d2296d3bcdbcc43ad9ff382023
Merged-In: Ic721288e8f1e1a1f255eca95b2efb7b6e0c7c83b
2020-05-11 21:06:35 +00:00
Kweku Adams
6adfa79de1 Add day-night-mode permission to Shell.
Without the permission "adb shell cmd uimode night <mode>" doesn't work.
Adding the permission to the AndroidManifest file so the shell command
will work.

Bug: 155584597
Test: run `adb shell cmd uimode night <no|yes|auto>`
Change-Id: Ibfb145d762c73bba9de639d4050b9b26e4778cc9
2020-05-11 11:46:34 -07:00
Jooyung Han
ace605ef56 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.

Bug: 145796956
Bug: 150999716
Test: m
Change-Id: I655211e0b9aa4bd7cb3718b6f567f0aa1a0176a5
2020-05-11 13:18:29 +09:00
Mark Chien
7a2b6a8ad2 Merge "Allow to exempt from entitlement check" 2020-05-08 12:28:06 +00:00
Treehugger Robot
c766c8e766 Merge "Override tethering module APK-in-APEX for Go variant" 2020-05-08 12:11:47 +00:00
markchien
7f2ec3593f 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
2020-05-08 18:55:26 +08:00
Mark Chien
9689dd423b Merge "Address the comment of aosp/1288493" 2020-05-08 10:30:49 +00:00
Jooyung Han
c5735d7a53 Merge "Set min_sdk_version for updatable mainline modules" 2020-05-08 08:45:49 +00:00
markchien
8a37bc9406 Address the comment of aosp/1288493
Bug: 141256482
Test: atest TetheringTests
Change-Id: I0cf337625cee31a47879c59e9b18657ea7624eb4
2020-05-08 15:51:52 +08:00
Mark Chien
741e2db5d2 Merge "Refactor the EntitlementManager" 2020-05-07 11:14:40 +00:00
Jeongik Cha
339f9df7d7 Merge "Use stable networkstack-aidl-interfaces" 2020-05-07 10:59:05 +00:00
Jooyung Han
33aa294e96 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
Change-Id: Ifaecb49a47a1f43edea3ea06e1cf704a177d1044
2020-05-07 17:30:00 +09:00
markchien
1440776eb1 Override tethering module APK-in-APEX for Go variant
Bug: 155604224
Test: build
Change-Id: I4147173b5f3668491ff9cb7f1f86715b036d6d4b
Merged-In: I4147173b5f3668491ff9cb7f1f86715b036d6d4b
2020-05-07 06:35:05 +00:00
Mark Chien
7809a5dfa6 Merge "Test tethering log dump" 2020-05-07 03:09:11 +00:00
Bill Yi
4806cccece Merge "Merge android10-qpr2-s3-release to aosp/master - DO NOT MERGE" 2020-05-06 15:59:08 +00:00
markchien
7eabad685f Test tethering log dump
Bug: 145490751
Test: atest TetheringTests
Change-Id: I01fc6969041711f7a15880144ee5eac591086ecd
2020-05-06 17:00:37 +08:00
Bill Yi
b61408add5 Merge android10-qpr2-s3-release to aosp/master - DO NOT MERGE
Change-Id: I7ce0992bd12158655c0f4833fd924c8012386996
Merged-In: I34d1d5f9a751c1d7680a5a5941c39b9fe33a473b
Merged-In: Icd731877c220b0e3b39258812030313cbaba90c0
2020-05-05 20:34:22 +00:00
Anton Hansson
2b4926b52b Merge "Rename module dist files" 2020-05-05 13:45:03 +00:00
Hungming Chen
938859891a 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
Change-Id: I2d6f80f0229f580c4b16243a064e889a6c37f77a
2020-05-05 17:43:50 +08:00
Hungming Chen
8b42d7cedc 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
Change-Id: I9c26852d2c926786e141ece6da53df3801c049b2
2020-05-05 17:37:32 +08:00
junyulai
34073efb57 [SP18.6] Make offload controller poll interval configurable
Test: atest TetheringTests
Bug: 149467454

Change-Id: I0b07a0b520dedb479bf863fbfe898ae85b84b0f3
2020-05-05 11:45:36 +08:00
Junyu Lai
92bb1f4d21 Merge changes from topic "sp18-TestableNetworkStatsProviderCbBinder"
* changes:
  [SP18.5] Create offload controller poll interval to resource
  [SP18.4] Add unit test for polling network stats in OffloadController
  [SP18.3] Adapt TestableNetworkStatsProviderCbBinder
2020-05-05 03:09:58 +00:00
Jeongik Cha
c6553cc0c0 Use stable networkstack-aidl-interfaces
Test: m nothing
Bug: 133526962
Change-Id: I507f40866d04db5ed3361831e01eaa4dfaf20bed
2020-05-04 08:11:26 +00:00
junyulai
d9a4ed3bb3 [SP18.5] Create offload controller poll interval to resource
Test: atest TetheringConfigurationTest
Bug: 149467454
Change-Id: I8b4ad920a4945504914d3741a9fba5c096fbf452
2020-05-04 14:56:37 +08:00
junyulai
99b8f7646e [SP18.4] Add unit test for polling network stats in OffloadController
Test: atest OffloadControllerTest
Bug: 149467454
Change-Id: I9b9c9c096a2366aaf383d5c2d567db6682f02dad
2020-05-04 14:56:37 +08:00
junyulai
fbbf13e1fc [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
2020-05-04 14:56:36 +08:00
Anton Hansson
3d18ab74e4 Merge "Fix tethering module lib stub default" 2020-05-01 08:58:26 +00:00
Treehugger Robot
5f2cebc10a Merge "Import translations. DO NOT MERGE" 2020-04-30 23:54:22 +00:00
Bill Yi
36c35c6511 Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: I3b69996ab87b3c9ddeeb5c6166a1256b77f30c12
2020-04-30 15:32:29 -07:00
Anton Hansson
fe45ab4399 Rename module dist files
This makes the filenames of the disted artifacts (api txts and stubs)
match the module name of the modules they're from. This matches the
naming scheme used by java_sdk_library, which should make the future
transition to this build rule easier.

Bug: 149293194
Test: lunch sdk_phone_armv7 && m sdk dist && find out/dist/apistubs
Change-Id: I076f30931bf2524d57703873cd7de25b3f23b457
Merged-In: I076f30931bf2524d57703873cd7de25b3f23b457
(cherry picked from commit 8bf731c0fcbde688e9f5ffaca297f5b350919b77)
2020-04-30 20:56:11 +01:00
Anton Hansson
674d9e95a8 Fix tethering module lib stub default
It was using the systemapi stub defaults, but should be using the
module_lib default.

Bug: 144149403
Test: m
Change-Id: Iaab154d9d71900284d92d518a086fc1227c00d5c
Merged-In: Iaab154d9d71900284d92d518a086fc1227c00d5c
(cherry picked from commit adce9b5b022a303cd250ca35ab1a902980a58933)
2020-04-30 17:05:01 +01:00
Neil Fuller
26f3511f97 Merge "Fix missing zone strings in some cases" 2020-04-30 09:31:57 +00:00
markchien
981b276310 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

Change-Id: Ic83f42ff4eec38adf039d55d80fcb9b0f16373cc
2020-04-30 14:00:20 +08:00
Treehugger Robot
22a224f951 Merge "[SP18.1] add dependency object to OffloadController" 2020-04-29 12:08:22 +00:00
Junyu Lai
0cc8431af0 Merge "[SP18] Poll network stats in OffloadController to support data warning" 2020-04-29 11:01:56 +00:00