NetworkRequest#networkCapabilities is an implementation detail (not part
of the NetworkRequest API); NetworkRequest has getters that return the
same information.
Bug: 174436414
Bug: 142281756
Test: m
Merged-In: I47e7ab1b887b2fe2dddef223bd7c66bdd290fc56
Change-Id: I47e7ab1b887b2fe2dddef223bd7c66bdd290fc56
Cleaning up tests, so I can easily add more for restricted networking
mode.
I merged the NetworkManagementInternalTests with the
NetworkManagementServiceTests.
Test: atest NetworkManagementServiceTest
Change-Id: If8c3cc1883cfb2524eeb78e23165fc868130f0e7
This reverts commit efec091bcb01c0148dd48da6ef29d0d397ffa109.
Reason for revert: aosp/1513473 fixed the underlying issue That make this revert necessary.
Change-Id: Ic99a6d080b4b1140924cb89d44b1f650f283a28d
This reverts commit 9e569671a3752c4edd95367f483355ad31fac8d4.
Reason for revert: atoms and associated protos have been migrated. Removing migration block.
Change-Id: Ia1e4a73001ebc9509b8550c7957135172ce8938d
BUG: 167962588
Test: TH
StorageManagerService#onVolumeStateChanged passes on a mutable
object to onVolumeStateChangedLocked and onVolumeStateChangedAsync.
This causes a race since the state of the object being passed can
be updated while onVolumeStateChangedAsync is processing it.
To fix this, a clone of the object is passed instead.
Bug: 174056195
Test: atest AdoptableHostTest
Test: atest com.android.tests.fused.host.FuseDaemonHostTest
Change-Id: I4de32279ae740544bd3abe33d788ebdbef1eab00
This follows other TYPE_* constants like TYPE_WIFI_P2P that are
@SystemApi or public.
TYPE_PROXY has a use-case for the system to set network policies based
on proxy network templates. Although network types are deprecated, that
use-case needs to be supported and significant amounts of network
management would need to be rewritten to stop using network types.
The constant needs to be API as ConnectivityManager is planned to move
out of framework.jar, so only its formal API will be available to the
system server.
Bug: 174436414
Test: m
Change-Id: I266ed6bc59f5eb72302afe14472c93933733c8f8
The code is unused, and based on ConnectivityManager#startNattKeepalive,
which is deprecated.
Bug: 174436414
Test: atest FrameworksNetTests
Change-Id: I08c6c1baec668a304d971bb6f2328891a5611e6a
Instead of sharing the constant from LinkProperties, use the already
defined constant in the NetworkConstants class.
This allows Ikev2VpnProfile to allow depending on non-public
LinkProperties APIs, as LinkProperties is planned to move to
framework-connectivity.
Bug: 174436414
Test: m
Change-Id: I594bb7e81bc7681799c16eff621a5ffd1b29624c
On top of being a cleanup this is useful for the S Network
Selection project that will need to enrich the Network
Agent API, and as such should not have to support legacy
agents.
Test: FrameworksNetTests NetworkStackTests
Bug: 167544279
Change-Id: Id3e5f6e19829c64074cd6a52c5f950cee56b860b
Connectivity service module uses Slog which is @hide so
migrate to Log, which is public, to remove hidden API usage.
Bug: 172050541
Test: FrameworksNetTests
check log is moved from system buffer to main buffer.
Change-Id: I0dcc0e169b892cc872ed4510f699642cb81b633a
Context may be needed to obtain extra information.
Also fix bug where exception is thrown when
MediaKeyDispatcher#getOverriddenKeyEvents is not overridden in the
custom MediaKeyDispatcher class.
Bug: 168579449
Test: build and manually check that custom classes are being
instantiated through reflection.
Change-Id: Iadc1e7cbeb0f5349e1b7dfde711f53947ea04a05
ConnectivityService may not be available in a NetworkProvider
constructor, if it is created (but still unused) before
ConnectivityService starts.
As ConnectivityManager is only necessary in
declareNetworkRequestUnfulfillable, which should not be called often,
just query ConnectivityManager at that point.
This is necessary for VcnManagementService, which is started before
ConnectivityService and creates its NetworkProvider in its constructor.
Fortunately VcnManagementService does not call
declareNetworkRequestUnfulfillable at this point.
ConnectivityManager may be migrated to classic service getters that
cache "null" when the service was not available the first time it is
queried, so no system service must query it before it starts.
Bug: 171540887
Test: atest FrameworksNetTests:NetworkProviderTest
Change-Id: I8dadcd0e1360a9464192f330493e13aa69dd9fe2
The class-level @IgnoreUpTo annotation only applies with that runner.
Change-Id: I065618f2345c1d91de2fa1f2f558e5ed5b066f3e
Fixes: 174268969
Bug: 171505922
Test: atest FrameworksNetTests:android.net.OemNetworkPreferencesTest
The data type long to indicate that how long the request can be retried again.
Bug: 173175176
Test: build pass
Change-Id: I22275e8259950a3efd247b3c906392a41d0ca2f1
Before, it used DC.getStackCount() to loop TDA stacks, which caused
issue when there are multiple TDAs.
Bug: 173823058
Test: manual
Change-Id: I60bcf72c37b2f90fc655566022a107a75b49966a
* Add method name to all Slog.wtf() calls
* Do not Slog.wtf in shouldLogUserspaceRebootEvent method
* Also added OWNERS for UserspaceRebootLogger.java
Test: device boots
Test: no UserspaceRebootLogger logs in logcat
Test: atest CtsUserspaceRebootHostSideTestCases
Change-Id: Ifc2a13957157838dade3701f0b35dad51d26ec45
Prepare to make time detection more configurable. This change introduces
an idea of origin ordering ("priority") so that different partners and
form factors can modify the previously hardcoded ordering of "telephony
(NITZ) first then network (NTP)".
This commit also modifies the name of the method used to trigger a time
detection cycle after a config change. It's possible partners may want
to make the priority originate from a setting rather than static config
(i.e. so the partner can pick between origins or origin orders). This
would involve more work than currently planned, but it is easy to make
the method name less specific.
Bug: 172230856
Test: treehugger
Test: atest TimeDetectorStrategyImplTest
Merged-In: Id1652be174b7503618e0b802dc7da4d00df4f248
Change-Id: Id1652be174b7503618e0b802dc7da4d00df4f248