Adopts new API according to API review feedback. The outcome receiver
can later be removed from most of the ethernet code; in a perfect world,
a result can be generated and an exception captured directly from
EthernetServiceImpl. This will greatly simplify the current
implementation.
Bug: 220017952
Test: atest EthernetServiceTests
Change-Id: Id8fadfed9fcfd22f04f6d7c3460b5956e571e01f
Along with ethernet service is going to be moved into Connectivity
module, this CL contains the corresponding changes as below:
1. deprecate the etherent-service lib and create a new filegroup:
When the ethernet mainline code migration completes, ethernet-service
lib won't be kept any more, instead the ethernet service should be
started from ConnectivityServiceInitializer. So deprecate the current
ethernet-service lib and cleanup the usages on other places later.
Create a new filegroup which includes all ethernet service code, that
will be built into service-connectivity-tiramisu-pre-jarjar.
2. Move the implementation of starting ethernet service:
ConnectivityServiceInitializer should take responsibility to start
ethernet service and EthernetTracker on boot phase. Move this code
to ConnectivityServiceInitializer and remove the current onStart and
onBootPhase implemenation.
3. Move below ethernet service related config resources:
- config_ethernet_tcp_buffers
- config_ethernet_interfaces
- config_ethernet_iface_regex
Move the definition of these resource from frameworks/base/core to
p/m/Connectivity/service/ServiceConnectivityResources, and import the
ServiceConnectivityResources lib to adapt the ethernet update.
4. Update the EthernetServiceTests dependencies and refactor the code
which uses ConnectivityResources instead of internal Resource to make
the tests pass.
Bug: 210586283
Test: m
Test: atest FrameworksNetTests
atest EthernetServiceTests
Change-Id: I0bbecfb64f720213ee2b02417bc8357ccf4725b6
Merged-In: I0bbecfb64f720213ee2b02417bc8357ccf4725b6
The functions does not log but throws an exception instead. Changing the
name to reflect that.
Test: TH
Change-Id: I6207aababaccc9bc553f7f731e3b8a1d26eb16a1
Usage of this API should not be limited to Automotive devices as
TvSettings also needs to update the IpConfiguration.
Test: TH
Change-Id: I838a0a8684e9f944801718a4d688666de45f42fb
Marking NetworkCapabilities as nullable in updateConfiguration and
updating where needed to support this. This will allow callers of
the ethernet network management updateConfiguration API to use it
primarily for setting an ethernet network's IP configuration.
Bug: 222565654
Bug: 220017952
Bug: 210485380
Test: atest EthernetServiceTests
Change-Id: Ifd908639a00470e599fe1a15487cc6383a56b2f5
Updating Ethernet Network Management APIs to allow support for test
interfaces when the caller has the MANAGE_TEST_NETWORKS permission, test
interfaces are being tracked in ethernet and if updating a network's
capabilities, they include the TEST transport.
Bug: 210487893
Test: atest EthernetServiceTests
atest CtsNetTestCasesLatestSdk
:android.net.cts.EthernetManagerTest
Change-Id: I0e0bc9632d9b3d5d61f23e74150586f42c0b5bd2
Removing synchronous validation of whether a particular interface
is tracked or not and instead relying on asynchronous validation and
callbacks. An interface can be in the midst of being provisioned and
checking if it is tracked sychronously before provisioning is complete
will erroneously throw an error for a call that would have been
successful when executed on the ethernet handler thread.
Bug: 210487893
Bug: 210485380
Test: atest EthernetServiceTests
Change-Id: Ib70312a240cab412a54ca7f598893aa9b1e108fd
Updating ethernet classes to use a builder when creating an
EthernetNetworkUpdateRequest and also changing to use
IpConfiguration instead of StaticIpConfiguration for the
UpdateConfiguration API.
Bug: 220017952
Bug: 210487893
Bug: 210485380
Test: atest EthernetServiceTests
Change-Id: I2647115bf867dfaa3f3dadf00e3c875aa7e8d88f
This test is breaking when requesting a network with an
EthernetNetworkSpecifier after aosp/1795391 was submitted (which fixed
another bug that hid this one).
Test: atest EthernetNetworkFactoryTest
Change-Id: I31f10f48cd03cdef29f21bbce790db68add071a8
EthernetManager is moving to the connectivity mainline module
and some of its hidden methods are being exposed as module-lib
APIs. This CL updates the implementation.
1. Rename onAvailabilityChanged to onInterfaceStateChanged in
IEthernetServiceListener.aidl, to match the name of the public
callback method.
2. Add the interface state, role and IpConfiguration to the
callback, so that clients can use this information without
having to call synchronous methods.
3. Call the new callback whenever any of the above parameters
changes, or when a callback is registered.
Also make some package-private methods in EthernetNetworkFactory
protected @VisibleForTesting because otherwise mockito can't
mock them.
Bug: 210586283
Test: m
Test: atest EthernetServiceTests EthernetTetheringTest
Change-Id: Ib27bf119b0d61b78f19b6447a38b4468d8035c78
Merged-In: Ib27bf119b0d61b78f19b6447a38b4468d8035c78
This test is failing at HEAD because the known bug it is
testing for is fixed. Check that IpClient is (correctly) not
started when link is down. In order to ensure that the test is
correct and that not starting IpClient is not caused by some
other setup problem in the test, ensure that IpClient is also
(correctly) started if later on link does come up.
Test: atest EthernetServiceTests
Test: atest --rerun-until-failure 100 EthernetNetworkFactoryTest#testIpClientIsNotStartedWhenLinkIsDown
Change-Id: Id30bc9be1fc3ecf3d10c12d0b23c64814f4dbf9c
Updating Ethernet Service network management APIs to
require the manage ethernet networks permission.
Bug: 210485380
Test: atest EthernetServiceTests
Change-Id: Ibc9b2930fc0069efd7c6f4b833aba7d6c8e93311
Renaming InternalNetwork* files and classes related to ethernet network
management to EthernetNetwork* as ethernet is the only trasnport these
particular files are used with.
Bug: 210485380
Test: atest EthernetServiceTests
Change-Id: I5be8543afd70f2edca76a9366cee4ccf61f0d0e7
Implementation of EthernetService APIs for ConnectNetwork() and
DisconnectNetwork().
Bug: 210485380
Test: atest EthernetServiceTests
Change-Id: I4c3e361d052206cb28b97fc439bfeac8e7e0fec0
Updates so that network management API updates in the ethernet stack can
handle concurrent requests correctly in regards to notifying caller
supplied callbacks.
Bug: 210485380
Test: atest EthernetServiceTests
Change-Id: I8073251b2c63309da031c2b1c98d61614deadfe8
Ethernet service related files are going to be moved into Connectivity
module. NetdService won't be visible to EthernetService. Use asInterface
to get the Netd service instead.
Bug: 210586283
Test: m
Change-Id: I3bf504cd947f74bf5830659915483fe5331ac9eb
This is not any better than the previous code though...
But it should behave the same.
Test: FrameworksNetTests
Change-Id: Ia3d379681cb0f17dd5f86062b7cfe84f1547fadb
If the ipClient is stopped before handling the events in
Handler thread, ethernet network factory might end up
creating a network agent for a network which is already
cleared.
This change fixes the issue by handling the events only
if ipClient is initialized.
Tests:
Builds, Boots, EthernetNetworkFactoryTest.
Ethernet related test scenarios
Bug: 207057937
Change-Id: If7ff7abf5f0dcdb0e94de0502bfdf981f9f20298
EthernetServiceImpl#updateConfiguration API implementation to allow
for dynamically updating the network capability or ip configuration of
an ethernet based interface.
Bug: 210485380
Test: atest EthernetServiceTests
Change-Id: Idd3b7875a24643d245d0f4bb6f2f4c459898116e