Commit Graph

7 Commits

Author SHA1 Message Date
Lorenzo Colitti
6c032e53a0 Fix grammar nit in comment.
Test: None
Change-Id: I60cb2478615efce13f1904092abe5c21bdf0dc9a
2022-02-11 18:50:04 +09:00
Xiao Ma
7f9ac50065 Expose EthernetManager state and control APIs.
This CL exposes EthernetManager APIs that settings and other
system components can use to modify and monitor Ethernet state.
The new APIs are similar to the existing @hide methods but
pass on more information and meet API guidelines:

1. Add an InterfaceStateListener interface, and
   addInterfaceStateListener and removeInterfaceStateListener
   methods that meet API guidelines (e.g., take Executor, take
   SAM parameter last, etc.) This new listener passes interface
   state (absent, up, down), role (client or server) and IP
   configuration.
2. Implement the legacy Listener type as a subinterface of the
   new interface. Hopefully existing callers should be able to
   use it unchanged.
3. Expose setIncludeTestInterfaces as module-lib api instead of
   TestApi, since modules cannot expose TestApi methods.

Bug: 210586283
Test: m
Test: atest EthernetServiceTests
Test: atest EthernetTetheringTest
Change-Id: I88240a546ab51d128ed83775499f2bcabab74db0
Merged-In: I88240a546ab51d128ed83775499f2bcabab74db0
2022-02-11 18:50:04 +09:00
James Mattis
28547370d4 Marking eth network management APIs @SystemApi
Annotating ethernet network management APIs in EthernetManager
with @SystemApi.

Bug: 210485380
Test: atest EthernetServiceTests
atest CtsNetTestCasesLatestSdk

Change-Id: I10429441fd4d7b9bcaa7437b844420a43a415d72
Merged-In: I10429441fd4d7b9bcaa7437b844420a43a415d72
2022-02-04 17:09:34 -08:00
James Mattis
07550b5354 Adding permission for Ethernet Network Management
Adding MANAGE_ETHERNET_NETWORKS as a signature level permission
to allow an application to dynamically change ethernet network values.

Bug: 210485380
Test: atest EthernetServiceTests
Change-Id: Icf9c2accc86735cc981adc0d5a24802e0616ffaf
Merged-In: Icf9c2accc86735cc981adc0d5a24802e0616ffaf
2022-02-02 16:34:46 -08:00
James Mattis
1ecadfa763 Renaming Ethernet Network Management Classes
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: Ieb3915c032ef5fcd6b36eb09878119de7668bb4b
2022-02-01 21:02:10 -08:00
James Mattis
407ea1dfc3 eth manager updates for network management APIs
Private methods added to EthernetManager for network management to be
made public when ready.

Bug: 210485380
Test: make, flash and boot
Change-Id: I7f484d373e05225c98bf0e6111afdc12be31764f
2021-12-22 11:11:01 -08:00
Xiao Ma
202317df53 Move Ethernet related files to f/b/packages/ConnectivityT.
ethernet-service is going to be moved into Connectivity mainline module.
Move all ethernet related files in f/b/ to f/b/packages/ConnectivityT so
that it's easier to migrate these files to Connectivity module finally
after clearing the hidden API usages. Below files to be moved:

Ethernet framework related files:
    - EthernetManager.java
    - EthernetNetworkSpecifier.java
    - IEthernetManager.aidl
    - IEthernetServiceListener.aidl
    - ITetheredInterfaceCallback.aidl

Ethernet service related files:
    - IpConfigStore.java(EthernetConfigStore has dependency on the class)

For the ethernet-service related files, keep it as-is temproraliy and
fix the hiden API dependencies in f/opt/net/ethernet/. After this work
is done, then migrating the whole of ethernet folder to Connectivity
module completely.

This CL also fixes some minor errors of code style format to pass the
code style check.

Bug: 210586283
Test: build pass
      atest FrameworksNetTests
      atest EthernetServiceTests
Change-Id: Ib359d29d5221105f648bc4194c6d6dbe4cc6e3e5
2021-12-16 06:59:08 +00:00