Define interfaces that match the signature of the existing
EthernetManager.TetheredInterfaceRequest and TetheredInterfaceCallback
classes and make EthernetManager.TetheredInterfaceRequest and
TetheredInterfaceCallback implement/subinterface these interfaces. The
new bluetooth API could also implement these interfaces to make API surface
consistent.
Test: TH would test the existing tests that use the subclass.
Bug: 190438212
Change-Id: I093972c111cb1d921076782492716d5a046be8fc
Before this change, tethering always report a list of tethered
interfaces and the caller need to use each tethering type's interface
regex to matching tethered list to manual implement the mapping of
tethering type and interface. This change allow caller to get rid of
tethering interface regex.
Bug: 162920185
Bug: 152203943
Test: atest CtsTetheringTest on S
Merged-In: I91bcccd676d109c1b974497ac29bd366a41b8899
Change-Id: I91bcccd676d109c1b974497ac29bd366a41b8899
This is useful for OEMs that want to use RNDIS or NCM as a
local-only link that is directly connected to some other host.
This can be used to implement USB tethering using NCM, which
currently only supports local-only mode.
Bug: 175090447
Test: TetheringIntegrationTests:EthernetTetheringTest#testLocalOnlyTethering
Change-Id: I0ffaa46e4640e5b235340a15d25909106ceb0c07
The names of the individual modules do not quite follow the pattern
that java_sdk_library uses so this temporarily sets the following:
naming_scheme: "frameworks-modules"
That causes java_sdk_library to use a naming scheme that matches the
one used by the individual modules of this. It will be cleaned up
later.
Part of the purpose of the java_sdk_library is to hide the
implementation code and force users of the library to depend on stubs
for a well defined API. Ideally, it would allow access to the
implementation in those cases where it is safe, e.g. from within the
same APEX, or from tests for the implementation. Unfortunately, due to
limitations in the build it does not yet have enough information to
make that decision correctly which means that any code that needs to
compile against the implementation is broken which would prevent us
from converting the module to java_sdk_library.
However, the only way to provide the additional information to allow
the implementation to be correctly exposed is to convert the modules
to java_sdk_library; a cycle.
In order to break that cycle the java_sdk_library creates a special
<module>.impl target which is used directly by tests and any other code
that needs it. Once all the modules have been converted to a
java_sdk_library then we can resolve the limitations in the build and
remove the direct references to <module>.impl.
Test: m update-api
Bug: 155164730
Merged-In: If5c115f482751f9f4b5f047e9e401a18e36799ef
Merged-In: Id1c2e848430c49a2da7402244814cd084f5da77c
Change-Id: Id1c2e848430c49a2da7402244814cd084f5da77c
This adds metalava api tracking generation to the module
stub rules, to make sure we know exactly what API a
particular module stub exports.
Bug: 147768409
Test: m update-api check-api
Exempt-From-Owner-Approval: approved internally
Change-Id: Iaf2ef5b5751eb208d119ddbc74481239366fe581
Merged-In: Iaf2ef5b5751eb208d119ddbc74481239366fe581
(cherry picked from commit e7c52c7e3f)
Per API review:
- @IntDef defined on the type integer parameter
- have getters on each parameter that is set in the
TetheringRequest.Builder
- new added API should not be deprecated
Below APIs is moved from system-current to module-lib-current that only
plafrom code(e.g. ConnectivityManager and Settings) can use them.
TetheringRequest.
onTetherableInterfaceRegexpsChanged, TetheringInterfaceRegexps:
Only platform code can use them because interfaces by regular
expressions are a mechanism which is planning to be deprecated.
Also rename some constants for easier to understand.
Bug: 149858697
Bug: 151243337
Test: m doc-comment-check-docs
atest TetheringTests
Change-Id: Idd041f0fbeca411ea23e49786a50dd7feb77ef45
Application can specify static ipv4 server and client address to setup
tethering and this is one shot configuration. Tethering service would
not save the configuration and the configuration would be reset when
tethering stop or start failure.
When startTethering callback fired, it just mean tethering is requested
successful. Therefore, callers may call startTethering again if
startTethering successful but do not receive following tethering active
notification for a while. Tethering service never actually does anything
synchronously when startTethering is called:
-startProvisioningIfNeeded just posts a message to the handler thread.
-enableTetheringInternal doesn't do anything synchronously, it just
asks the downstreams to get their interfaces ready and waits for
callbacks.
If tethering is already enabled with a different request,
tethering would be disabled and re-enabled.
Bug: 141256482
Test: -build, flash, boot
-atest TetheringTests
-atest CtsTetheringTest
Change-Id: I2b2dd965a673e6f1626738d41b5d443f0f9fbd0e
Merged-In: I0399917e7cefa1547d617e688225544c4fc1a231
(cherry picked from commit 5d6723e24e21154bef3967585a8adc069e007f49)
This adds metalava api tracking generation to the module
stub rules, to make sure we know exactly what API a
particular module stub exports.
Bug: 147768409
Test: m update-api
Exempt-From-Owner-Approval: Approved in master
Change-Id: Iaf2ef5b5751eb208d119ddbc74481239366fe581
Merged-In: Iaf2ef5b5751eb208d119ddbc74481239366fe581