Commit Graph

7 Commits

Author SHA1 Message Date
junyulai 15d8bb03fe [SP06.1] Add UPDATE_DEVICE_STATS permission to Tethering
Add corresponding permission to allow tether offload to update
network usage through new API that requires UPDATE_DEVICE_STATS
permission.

This is the minimum permission that required to update network
usage with the new system api.

Test: atest FrameworksNetTests OffloadControllerTest TetheringTest
Bug: 130855321
Change-Id: I9c0c86e20d4797ea3570feed741be3a07f839c7d
2020-01-14 20:14:47 +08:00
markchien 9a0b95d294 Migrate legacy dhcp server config to DeviceConfig
Legacy dhcp server can also be enabled by resource config.

Bug: 144814607
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: I8ae5fa3d5bbd88129bd0890f71be6f8a1bfec0eb
2020-01-13 15:07:03 +00:00
markchien 373e5639aa Give tethering TETHER_PRIVILEGED permission
This fix the crash when perform "Reset Wi-Fi,mobile & Bluetooth"

Bug: 146900199
Test: -build, flash, boot
      -atest TetheringTests
      -atest CtsTetheringTest
      -manual perform "Reset Wi-Fi,mobile & Bluetooth"

Change-Id: I036409358ed15a797bdb751bb66513425350d066
2020-01-10 14:49:24 +08:00
markchien 9d3538260b [Tether13] Move TetheringManager into framework
Move tethering out of ConnectivityService. All client would
use TetheringManager to talk with TetheringService directly.

Bug: 144320246
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
Merged-In: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
2019-12-19 20:53:06 +08:00
markchien 8f831c09e5 Change Tethering package name
".apex" is easy to confuse.
Rename as below:
apex: com.android.tethering.apex -> com.android.tethering
apk: com.android.tethering -> com.android.networkstack.tethering

Bug: 146471733
Test: build

Change-Id: I2c7647abb996539a3af6cfe0e0214a5e8927c0d6
Merged-In: I2c7647abb996539a3af6cfe0e0214a5e8927c0d6
2019-12-19 13:06:50 +08:00
markchien ee6ad37837 [Tether07] Migrate Tethering into module
Now tethering would be run in dedicated service.
TetheringManager is the interface used to communicate with
TetheringService. The new call flow would be: ConnectivityManager
-> ConnectivityService -> TetheringManager -> TetheringService.
Note: the return value of #tether(), #untether() and #setUsbTethering()
APIs would always be no error. Client can use #getLastTetherError()
or #getTetheredIfaces or listen tether state change to check
status of corresponding interface.

Bug: 136040414
Bug: 144742179
Test: -build, flash, boot
      -atest TetheringTests
      -atest FrameworksNetTests

Change-Id: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
Merged-In: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
2019-11-30 10:03:08 +00:00
markchien 932da868a5 [Tether01] Add Tethering App
This is initial patch that don't contain any service for now.

Bug: 136040414
Test: -build, flash, boot
Change-Id: I0b49d7e9c3fcba5af3025163f9cc9eafb0778116
2019-10-24 13:35:41 +08:00