Make some tethering constants @systemApi because tethering
cannot use hide Api.
Bug: 144814607
Test: build, flash, boot
Change-Id: I8b46e2483eec575cddaad392d055551b75ca71ef
In order to let external module report their network stats,
expose necessary APIs to construct NetworkStats object.
Test: atest FrameworksNetTests CtsUsageStatsTestCases
Test: m doc-comment-check-docs
Bug: 130855321
Change-Id: Id3ec8aaff3df67948c25eac2319a74cf33a27979
Replace some ConnectivityManager constants as TetheringManager inside
tethering module. No API change, will have follow up CL to delete
@hide tethering constants in ConnectivityManager and replace caller
to using TetheringManager.
Bug: 144753389
Test: build
Change-Id: Ia1b963669722c32d147375763205ed2f3af52fed
- Using INetd to communicate with netd directly instead of using
NetworkManagementService which is a wrapper of INetd and don't have plan
to be updatable.
- Also replace InterfaceConfiguration by InterfaceController.
- Remove redundant interface flags. Only set interface up/down flag to
netd because netd only use these two flags for INetd#interfaceSetCfg.
- Note that tethering still use NetworkManagementService
to register tethering stats provider and it would also be replaced with
other way in follow up change.
Bug: 136040414
Test: -build, flash, boot
-atest TetheringTests
Change-Id: I4ab0ad387d4bd1773ff94d3b380c1720df07f8d5
Merged-In: I4ab0ad387d4bd1773ff94d3b380c1720df07f8d5
- Using INetd to communicate with netd directly instead of using
NetworkManagementService which is a wrapper of INetd and don't have plan
to be updatable.
- Also replace InterfaceConfiguration by InterfaceController.
- Remove redundant interface flags. Only set interface up/down flag to
netd because netd only use these two flags for INetd#interfaceSetCfg.
- Note that tethering still use NetworkManagementService
to register tethering stats provider and it would also be replaced with
other way in follow up change.
Bug: 136040414
Test: -build, flash, boot
-atest TetheringTests
Change-Id: I4ab0ad387d4bd1773ff94d3b380c1720df07f8d5
Using alternative way to replace some @hide API.
Bug: 144814072
Test: build, flash, boot
atest TetheringTests
Change-Id: I1e12d69db1ad91dff553e142e17c6a70808e1639
Tethering is started after system ready that AMS is ready to deal with
intent broadcast, mProcessesReady is true.
Bug: 143195885
Test: build, flash, boot
Change-Id: Ib9a6008654267b6d0fca78923247c336e90b5534
Previous tethering use NetworkState to encapsulate network states.
But NetworkState is hide API and Tethering just use NetworkState
locally that it don't interact with other module by NetworkState.
To avoid hide API accessing and reduce dependency, replace
NetworkState as UpstreamNetworkState in tethering.
Bug: 144758082
Test: atest TetheringTests
OFF/ON hotspot
Change-Id: Ia1837b6ed983a64c3ed72ecf0e6f46d91b3af7da
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
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
Migrate the resources which are only used by tethering notification
from framework/base/core/res to tethering package resource
folder.
Bug: 122085773
Bug: 139763854
Test: build pass
Change-Id: I832103090d500fd8e2e2efb9dc7151426da3f88d
Merged-In: I832103090d500fd8e2e2efb9dc7151426da3f88d
Migrate the resources which are only used by tethering notification
from framework/base/core/res to tethering package resource
folder.
Bug: 122085773
Bug: 139763854
Test: build pass
Change-Id: I832103090d500fd8e2e2efb9dc7151426da3f88d
To be the unbundled application, tethering can not use UserManagerInternal
method anymore. Replace it by listening user restriction change intent.
Also fix some cleanup from
https://android-review.googlesource.com/c/platform/frameworks/base/+/1131002
Bug: 143195885
Test: -build, flash, boot
-atest TetheringTests
-manual test. Add a trigger point to call
UserManager.setUserRestriction(DISALLOW_CONFIG_TETHERING) from
Settings. Open hotspot -> restrict tethering from new adding trigger
point -> hotspot is OFF and Tethering settings are not available.
Change-Id: I4ed08d20f8b7476b8ecd5d018b75806dd2f22cc1
Merged-In: I4ed08d20f8b7476b8ecd5d018b75806dd2f22cc1
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
To be the unbundled application, tethering can not use UserManagerInternal
method anymore. Replace it by listening user restriction change intent.
Also fix some cleanup from
https://android-review.googlesource.com/c/platform/frameworks/base/+/1131002
Bug: 143195885
Test: -build, flash, boot
-atest TetheringTests
-manual test. Add a trigger point to call
UserManager.setUserRestriction(DISALLOW_CONFIG_TETHERING) from
Settings. Open hotspot -> restrict tethering from new adding trigger
point -> hotspot is OFF and Tethering settings are not available.
Change-Id: I4ed08d20f8b7476b8ecd5d018b75806dd2f22cc1
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
1. getTetherApnRequired API rename to isTetherApnRequired.
2. Expose isTetherApnRequired API as system API.
Bug: 142365448
Test: Build pass.
atest TetheringConfigurationTest (PASS)
Change-Id: Iafb2e4fbddb0251e23673742d990ad098a8ae375
Merged-In: Iafb2e4fbddb0251e23673742d990ad098a8ae375
The tether offload JNI library in this patch still have many dependencies
with internal libraries. Will have follow up changes to cut the
dependencies to let it be a unbundled library.
Bug: 136040414
Test: -build, flash, boot
-atest TetheringTests
-atest FrameworksNetTests
Change-Id: Iacf8e0b94135e35672de3ee77c474ee39a00c591
Add IpServer which is used to serve ip configuration, dhcp, dns proxy
and nat for downstream interface.
Bug: 136040414
Test: -build, flash, boot
-atest TetheringTests
-atest FrameworksNetTests
Change-Id: I23652ae0b9509abe7d38da96d523eb22ab00a343
TetheringConfiguration is a utility class to encapsulate the various
configuration elements.
Bug: 136040414
Test: -build, flash, boot
-atest TetheringTests
Change-Id: I9434ab213bc5e0fca59f14a6c8cea554abefc3a4