(this is safe because on pre-T none of these maps and programs are mainlined
and thus safe to access from mainline code anyway)
Test: TreeHugger, manual
Bug: 218408035
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I23e565d665247f33e084978890a1ee8ffe0fe568
The legacy ethernet config resource check isn't required any more
when the legacy resource cleanup in outside callers finishes, just
read the resource config from Connectivity module, but the value
still can be overlaid with pre-built RRO.
Bug: 214348333
Test: atest FrameworksNetTests
Change-Id: I86f6229343f9d48f0bd822e8086bdc880b81135f
NsdService is using binder call to communicate with
mdnsresponder, so there is no one to use NativeDaemonConnector
now. Thus, remove NativeDaemonConnector relevant files.
Bug: 209894875
Test: atest FrameworksNetTests
Change-Id: Ic70d9417dc85c04c537e09d8f8586a762ac9a97b
- NsdService isn't using NativeDaemonConnector to connect to
mdnsresponder after aosp/2049246, so NsdService#create
won't throw InterruptedException.
- Also no need to catch InterruptedException in
ConnectivityServiceInitializer.
Bug: 209894875
Test: atest FrameworksNetTests CtsNetTestCases
Merged-In: I1d0b973f9dac0f1d4f9d4d03faef66f05edde3fc
Change-Id: I1d0b973f9dac0f1d4f9d4d03faef66f05edde3fc
It is not used anywhere, as the sources are included via filegroup
in other libraries.
Test: m
Bug: 222234190
Change-Id: I23efe1382892a5493b8819cf05b5852305018d70
When test interface are no longer tracked in ethernet, clear out
associated data. Besides polluting the dumpsys and taking up
memory, unexpected results could happen if other CTS tests or
the like were to use a test interface which happened to have an
existing configuration for it (i.e., the tests could fail). This is more
problematic since IP configuration data is written to disc, therefore
test data was being persisted across reboots.
Bug: 210485380
Bug: 210487893
Test: atest EthernetServiceTests
atest CtsNetTestCases
Change-Id: If85c625ebbf8da27b226d9ae3651c4fb83a9a8da
- Use MDns aidl to communicate with mdns service and register
event listener to receive callback.
- Remove all NDC relevant code on NsdService.
- Use MDns aidl on NsdServiceTest.
Bug: 209894875
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: I65929dee3838fef753396e86c665abd66b6fec81
connectivity-tiramisu-sources filegroup in the framework-t and service
folder is useless after moving all source files to updatable-sources
filegroup, delete them from f/b/packages/connectivityT.
Bug: 210586283
Test: m
Change-Id: I22e9a70a04929144488380d1530cd7baa78ce056
As per the TODO, merge EthernetServiceTests into the larger
FrameworksNetTests suite.
Similarly to NetworkStats, NSD or IpSec tests, the tests are also marked
as "non-connectivity-module-test", where "module" actually refers to
modules being built for release (from an S-based branch) today. This is
necessary as the tests and associated code cannot build without T APIs.
Also add FrameworksNetTests to presubmit as non-connectivity-module
tests are not run in presubmit without this.
Test: TH
Merged-In: Id533cdb4ac184b963f570af299dea04754ba88e9
Change-Id: I9950fcb49fdc2217134a59e993941cbe5da0b556
The filegroup is now unnecessary as files are all in the service-t/src
directory.
This change allows building all sources including ethernet by
referencing src/**. This is done by using a general filegroup
service-connectivity-tiramisu-sources, so that branches that cannot
build the T+ code can change its contents without introducing merge
conflicts in the rest of the build rules.
Also change visibility rules to allow building the moved ethernet code,
and add a filegroup to allow building its tests.
Bug: 222234190
Test: TH
Merged-In: I770bf8db3f4c18467934eb2184f5dc2408fc28ec
Merged-In: I3e5df1bd44defbb9dd0c382c625a21e176368f2a
Change-Id: I8f23a45800b1086cc5a765fd24d734ca82c339a8
New Connectivity Service exposed to vendor for
restricting certain ports for use only in vendor.
Bug: 179733303
Change-Id: Iad9aff6924498ede5a08cfa5482082f094c0a90b
Reference Sources.bp from Android.bp, so that they are used as build
files.
Sources.bp is separate from Android.bp as it was migrated from the
Android.bp files in the old code location. They can be merged into the
main Android.bp file (or removed by removing the filegroups) after the
migration is done.
Also remove references to the AIDL filegroups, as files are now merged
into the common framework/aidl-export directory which is used as include
directory for aidl source generation already, so they do not need to be
referenced separately. framework/aidl-export can contain AIDLs for S-
API classes that became updatable API in T (the contents of
framework-t), as they are the same as any other API class for the
purposes of AIDL code generation: it's OK for any S+ code to reference
S+ API classes.
Finally, fix reference to mByteStream in IpConfigStoreTest. It was
already wrong but did not break the build because the test was not being
built in the old location.
Bug: 222234190
Test: TH
Merged-In: I81893df9f327abb84f1561b2b33027a2d23a4d65
Merged-In: I67c703e3f7aa9d5787f032a79ed62e45412baf4f
Change-Id: I9093f9ae2f9d76e597f20de48680e459891755b4
Provide a new API to enable or disable ethernet. Also have a listener
for call to check whether enable state is sucessful.
Bug: 171872016
Test: atest EthernetServiceTests
Change-Id: Iee4b48511ff668a2a7df90fd9bfe563d7ff23940
Merged-In: Iee4b48511ff668a2a7df90fd9bfe563d7ff23940
IP client callbacks could be executed updating the state of an
ethernet interface even if they were no longer the callbacks for the
currently active interface. This can happen as IP client callbacks
were being called from a thread separate from ethernet.
Bug: 224890356
Test: atest EthernetServiceTests
atest CtsNetTestCasesLatestSdk
:android.net.cts.EthernetManagerTest --iterations 30
Change-Id: I238cb75caa01472bccc79db5bafa82bccdaeba52
Revert submission 2030087-revert-2028203-ethernet-outcomereceiver-WFKWDORBPY
Reason for revert: Reinstate changes
Reverted Changes:
Ibd1d70ac3:Revert "Change Ethernet API to use OutcomeReceiver...
I45af594f7:Revert "Change Ethernet API to use OutcomeReceiver...
I45ba68452:Revert "Change network management listener to outc...
Merged-In: Id8fadfed9fcfd22f04f6d7c3460b5956e571e01f
Change-Id: If3854c1c3a39aa6de84807c6bde267cf88f3d277
Revert submission 2028203-ethernet-outcomereceiver
Reason for revert: BuildMonitor investigating b/225169800
Reverted Changes:
I4c204a848:Change Ethernet API to use OutcomeReceiver
I7c46545a4:Change Ethernet API to use OutcomeReceiver
Id8fadfed9:Change network management listener to outcome rece...
Change-Id: I45ba68452b9dccedf72b68fdea6e31c07b86546d
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
Divide the NetworkPolicyManager API
notifyStatsProviderWarningOrLimitReached into the following two APIs:
1. notifyStatsProviderWarningReached()
2. notifyStatsProviderLimitReached()
Bug: 216474563
Test: atest NetworkStatsServiceTest NetworkPolicyManagerTest
NetworkPolicyManagerServiceTest OffloadControllerTest
Change-Id: Ic413eb532b5e24d4a7e2afabdcf643ab6607b1ed
Ethernet framework and service source code is going to be moved to
Connectivity mainline module, this CL contains below corresponding
changes to adapt the migration in f/b side:
1. Split out ethernet module-lib APIs to Connectivity module.
Add the ethernet resource filegroup to tiramisu-updatable-sources
filegroup as well, build them together. Also update the module-lib
and system api txt to reflect the APIs change. Remove the hidden
APIs which are moved to Connectivity module. This removal fixes the
api inconsistent issue with Tethering/apex/hidden/.
2. Remove EthernetService from SystemServer which will be registered
from ConnectivityServiceInitializer.
3. Replace the BackgroundThread class(imported from f/b/core/java)
with the one in the modules-utils-backgroundthread lib, which is
visible to Connectivity module.
Bug: 210586283
Test: m
Test: atest FrameworksNetTests EthernetServiceTests
Change-Id: I3e13cb9c0e348333af295c2537d459aa6700ff17
Merged-In: I1956848d3248cc56e9841d221e5e4c160bed65a4
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
This patch addresses API review about the naming of
NetworkStatsManager#setUidForeground and it would be
more appropriate to rename it to noteUidForeground.
Bug: 222291301
Test: atest FrameworksNetTests
Change-Id: I952762872850889609c9808aa6e3cdfc04317806
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
The try/catch allows using a stub NearbyService on branches that do not
support it yet.
Also update Context.NEARBY_SERVICE to ConstantsShim to be compatible
with all branches.
Bug: 189355156
Test: boots
Change-Id: I7db0035b0d9ada79f00d6ef1ac5b54b2e98489d0
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