This causes the module to crash on rollback because the current
production code does not consider LOCAL_NETWORK to be a valid
capability.
Change-Id: Idf57d72c384b41b483098c4c302738072ebf7f90
Test: TH
Fix: 313030307
BYPASS_INCLUSIVE_LANGUAGE_REASON=Using public API
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.CSBpfNetMapsTest
(on U and V devices respectively)
Bug: 297836825
Fix: 314858283
Change-Id: Ibeac8cd3a33468c6539234255328affc6b3f8ffe
This reverts commit db884c9a93.
Reason for revert: reason of aosp/2849874 revert is solved by aosp/2854408
Change-Id: Ic5ffddf2f811c0d2c359f292c3b44b833bae5eaa
This reverts commit 1e7c4a494d.
This change is a suspect for causing test breakages, it may or may not be reverted.
Bug: 314087796
Reason for revert: 314087796
Change-Id: If0a1c1e2d0e260319cf64b2d00828638abebb7fe
aosp/2792436 updated NetworkAgent and NetworkAgentTest.
But the NetworkAgent change was not compatible with the old
NetworkAgentTest.
This CL makes NetworkAgent change to compatible with the old
NetworkAgentTest.
aosp/2851330 will update NetworkAgentTest to support NetworkAgent change
done in aosp/2792436.
Once the old cts is EOL, workaround in NetworkAgentTest and NetworkAgent
can be removed.
Bug: 310124646
Test: atest NetworkAgentTest
Change-Id: Ic99b0ab72526a9ba22653f5bb132214ef0814440
framework-connectivity-flagged-apis-droidstubs is used by
jarjar-rules-generator to avoid jarjaring flagged apis.
But, this usage of --show-annotation FlaggedApi in the flag is not
supported.
So this CL removes --show-annotation FlaggedApi.
As far as framework-connectivity-flagged-apis-droidstubs contains
flagged APIs, it's fine that this droidstubs also contains non-flagged
APIs.
Test: TH
Bug: 312408311
Change-Id: I2f1f5624d98873420c0c36ac6e31386102211045
The only version of mdns_aidl_interface supported by Netd is V1. After
that, the entire interface has been deprecated (which is the V2). The
latest stable version is no longer meaningful because no one is supposed
to use V2.
Bug: 298594687
Test: m
Change-Id: I9ac8199312cdc5d829889ea562979cad7d3bf054
This tests that the network providers are subject to appropriate
limitations as to what they can set as allowedUids – both in the
positive (can do) case, and the negative (can't do) case.
Test: this
Change-Id: I115e2a4bc02ddcd03ecf2f35130fcb0378da22bd
Writing data saver status to bpf is supported on Android V or
later devices. Thus, read that from bpf if available.
Test: atest FrameworksNetTests:android.net.connectivity.android.net.BpfNetMapsReaderTest
Test: atest ConnectivityCoverageTests:android.net.connectivity.android.net.ConnectivityManagerTest
Fix: 310801259
Change-Id: Ibd2616328d83f72ee6d2665239c3a44379d1ebf5
Typedef annotations are meant to have SOURCE retention, as they're
only analyzed by metalava to produce a separate file that's actually
consumed by the tools. Update typedefs as such.
Bug: 309971481
Test: m checkapi
Change-Id: Ic603db350af0825c87f4d99cff2ca4f4b7e57215
Add helper functions to help compare if MulticastRoutingConfig
has changed.
Test: atest MulticastRoutingConfigTest
Change-Id: I30ed4796efbaafbcf1a273c12a9231ec02bc36f0
Currently, the signature file elides overrides of a default method,
as they are not essential for the compilation of the stubs.
However, in some scenarios, the overrides of a default method may be
essential for the compilation of the reverse dependency of the stubs.
In the scenario seen below:
```
// API
interface ApiInterface {
public default void bar() {};
}
class ApiClass implements AnotherParentInterface{
public void bar() {}
}
// App depending on the API
interface AppInterface {
public void bar();
}
public class AppClass extends ApiClass implements AppInterface {
}
```
Removal of `ApiClass.bar()` will lead to not overriding an abstract method
`AppInterface.bar()` compilation error in `AppClass`.
Therefore, this change adds the overrides of a default method to the
signature files.
Test: checkapi
Bug: 299366704
Change-Id: Ie11dbeafc39efec06f605e306c92155e834a6685
FlaggedAPI annotated SystemAPI/ModuleAPI should be able to reference
the SystemAPI/ModuleAPI without FlaggedAPI annotation.
framework-connectivity-flagged-apis-droidstubs was failing to build in
this case. This CL fixes this issue.
After this CL, flagged apis droidstubs build even if the
FlaggedAPI annotated SystemAPI references the public API.
But this is caught by other targets and this should not be the issue.
Test: m framework-connectivity-flagged-apis-droidstubs
Change-Id: I0e0b5213c8e9b757e1b25c2a40b15b2c820ddd59
This doesn't actually expose the classes but prepares the
files for everything the linter says about it and the
API guidelines, as well as add documentation.
Test: CSLocalAgentsTest
Change-Id: I38c699d627eb91f19ab1628992ae0afde4673e89
A new firewall chain is needed to configure background network
restrictions for apps.
This change only adds the API stubs and traffic controller constants to
make the chain work. Policy changes using this chain will follow in
the framework code.
Test: atest CtsNetTestCases:ConnectivityManagerTest
Test: atest ConnectivityServiceTest
NO_IFTTT=The Lint rule along with the relevant code in Common.h is
being deleted in aosp/2819759
Bug: 304347838
Change-Id: I33e2db6671431f7c576fc931d9f96e684fc1e78a
Also add some toString() methods that were useful in debugging.
Test: new test in CSLocalAgentTests
Change-Id: Ife95815e39d92bbef84b1c5ea75a151882590d09
java_sdk_library has previously internally disabled a few legitimate
issues. As this is being un-done for modules, add baselines for the
pre-existing issues.
Bug: 306806877
Test: m checkapi
Merged-In: Ie764d33196675e1482f30ecfd3d6d22b7fa25c27
Change-Id: Ie764d33196675e1482f30ecfd3d6d22b7fa25c27
This can be used from S. There is no point in having a
release name in the name of this class.
Test: builds
Change-Id: I301bf032f856dd4c30554e06013f31ee57208c4e
FlaggedAPI will be ignored in udc-mainline-prod.
This makes CtsThreadNetworkTestCases build fail.
This CL updates CtsThreadNetworkTestCases to build against FlaggedAPI
and also updates framework-connectivity-jarjar-rules not to jarjar
FlaggedAPI.
Test: TH
Test: m CtsThreadNetworkTestCases
Change-Id: Ida8872b3bf61b7a59733f5fcec9e7d250efd3e58
The OffloadServiceInfo is already became API. It is not necessary to
keep it in jarjar exclusion anymore.
Test: TH
Change-Id: I81020553dfab4d7d8c88a67959058a99beb3b803
This change adds a DataSaverStatusTracker, which is a helper
class to continuously track data saver status through NPMS
public API and intents. ConnectivityManager#isUidNetworkingBlocked
would use this cached information along with bpf maps to decide
whether networking of an uid is blocked.
Test: atest FrameworksNetTests:android.net.connectivity.android.net.BpfNetMapsReaderTest
Test: atest ConnectivityCoverageTests:android.net.connectivity.android.net.ConnectivityManagerTest
Bug: 297836825
Change-Id: I7e13191759430f3ea1f4dec7facc02f16be7146d
This is needed for data stall detection mechanism in NetworkStack
to get the information about whether the network is blocked for
a given uid and conditions. Because the API will be called
frequently from NetworkStack to resolve all status for all uids
on the device, the API cannot call into the service which
creates IPC. Instead, the API need to directly access bpf maps
in the user process to retrieve the status. In this case the
user process is the network stack, the access control is provided
by linux file permission and selinux.
Test: atest FrameworksNetTests:android.net.connectivity.android.net.BpfNetMapsReaderTest
Test: atest FrameworksNetTests:android.net.connectivity.android.net.ConnectivityManagerTest
NO_IFTTT=Refactor only change for firewall chains definitions
Bug: 297836825
Change-Id: Iaf983b71ec98cbfe5152dcfade8a3120f938f135