The onError callback can use the same future as the onResult callback by
calling completeExceptionally.
This change is also removing the test for a specific exception message.
Testing for a specific exception message would mean that tests break if we
ever were to update them. If we decide that there is value to
distinguish between different types of
EthernetNetworkManagementException we should probably subclass it
internally.
Test: atest EthernetNetworkFactoryTest
Change-Id: Ib6f8cf79fc26e0f856c880cbe505b101f12aa187
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
also remove the redundant constructor definition in
test key/value class builder.
Test: atest TetheringCoverageTests
Change-Id: Icf93d4f196846c82c3a1c2b2b8697f4a5156ea92
In instant mode, the test doesn't have permission to bind socket.
Add @AppModeFull to stop them running in the instant mode.
Bug: 225937472
Test: atest --instant CtsNetTestCases:NetworkAgentTest
Change-Id: Iccd3f3b1c8e8173eead12e4d0c6e3a9189d3746a
This code is correct on userdebug builds, but it is dangerous on
user builds because proguard might strip out the POLICY_*
constants and that would lead to crashes.
For now just log a wtf if an invalid policy name is found. A
better solution would be to make MessageUtils robust to this
problem, e.g., by having it store the SparseArray internally and
providing getters that do not throw, instead of the current
behaviour that returns the SparseArray. That is left to a future
CL.
Fix: 227161413
Test: atest FullScoreTest
Change-Id: I68b69ee9dd84773018e62c9a8f43e754ae04c486
Add a constructor for QosSocketInfo using DatagramSocket.
Bug: 203146631
Test: atest & verified on LTE test equipment
Change-Id: I85c091a65610a96d721e4f0b07631867cda4db8a
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
As requested by API council.
Also fix lint errors in the test.
Fix: 217366078
Test: existing tests modified in this CL
Change-Id: I8f7cd0e78bf29aeb52ec6a08a5d635d25fa2205d
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
Test: New tests in this patch
also FrameworksNetTests
Test: atest CtsNetTestCases CtsNetTestCasesLatestSdk
Change-Id: I68aa5201ad94531e5a40999816844faef5531525
This reverts commit 7569d51446.
Reason for revert: ag/17318348 moved the declaration of the protected-broadcasts from the telephony package to the platform's manifest, so a flag is no longer required when registering for these. In addition, ag/17307852 is syncing the behavior of unexported runtime receivers with that of manifest receivers by limiting the UIDs that can broadcast to these receivers to the root and system UIDs; with the RECEIVER_NOT_EXPORTED flag from this commit, these receivers would no longer be able to receive these broadcasts when sent from the telephony UID.
Bug: 225999840
Change-Id: Ifb15506434edabdfacf84c302881d0cf97d3add8
Having a combined catch block causes the code to be "optimized" by R8 to
just throw a NullPointerException, with smali code:
const/4 p0, 0x0
throw p0
Workaround the issue by having separate catch blocks instead.
Bug: 217391956
Bug: 226127213
Test: atest ConnectivityManagerTest
Change-Id: Ib51fc66c44e1c2baa1f7ba4d1b0c2d1c94c3591d