These constants will now be including all the reasons for why an
uid's network access can be blocked, instead of only the
restrictions that could be imposed by NPMS.
Bug: 183473548
Test: atest ./tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Merged-In: I4c544415e12adf442fd2415c371b1b70a39c3aa4
Change-Id: I6dcea43fbefa9eac8b5a971b822a5be5422a54b4
This change ensures that carrier privileges for the right packages are
always checked.
Bug: 183465199
Test: atest FrameworksVcnTests
Change-Id: If46c660e54870529868a7b4b1e271c9009b81d45
Reading the DeviceConfig with the gmscore call id will result in a
security exception.
Also clear the caller identity when before calling into locksettings
to armRebootEscrow. This is inline with the other usage for RoR
preparation.
Bug: 183475757
Test: trigger RoR from gmscore
Change-Id: Ifc65625fc7aba05d016c127cf6672922a5ffb000
Keep ServiceState#getDataRegState hide. Apps can get the same
info from telephony provider without loation permission.
Bug: 182601774
Test: atest com.android.phone.ServiceStateProviderTest
Change-Id: I1ba72a5b767761d2f7bd1b52459a0c9d101061a2
ServiceState#getDuplexMode is a public API. Expose the same
info through telephony provider to let applications retreive
it without location permission.
Bug: 182601774
Test: atest com.android.phone.ServiceStateProviderTest
Change-Id: I19128c938993f351533aca9a8e1a1356e21eb30e
During OTAPreopt we don't have compilation stats due to the way we
compile things. Don't attempt to report stats in this case since it
will cause an NPE.
Test: manual OTA on a blueline
Bug: 181182967
Bug: 177694884
Change-Id: Ie2eb4d7e2ab562d4436a605bcbdd2ea17517dfc3
Merged-In: Ie2eb4d7e2ab562d4436a605bcbdd2ea17517dfc3
NotificationManagerServiceTest fails (10 failures) when launched
with different user as 0 (e.g. Automotive platform).
Test could be launched with "--user 0" to fix these test or test
can be adapted not to hardcode user id launching these test.
This CL makes the test adapative to the user id launching unit test.
Bug: 178032672
Test: adb shell am instrument -w -e class com.android.server.notification.NotificationManagerServiceTest com.android.frameworks.tests.uiservices
Signed-off-by: Francois Gaffie <francois.gaffie@renault.com>
Change-Id: I1f124deafd50d257683667ef986b88df1e4b8a75
Merged-in: I1f124deafd50d257683667ef986b88df1e4b8a75
-Permission granted for a given package using shell cmd (user system)
are not sufficient due to a check of notification uid vs packagepreference uid.
-If the packagepreference is deleted then restored, the channel preference
are not taken into account.
Bug: 178032672
Test: CTS/AudioManagerTest
Signed-off-by: Francois Gaffie <francois.gaffie@renault.com>
Change-Id: Ia26467f27b31bc048bdb141beac7d764fcb27f51
Merged-in: Ia26467f27b31bc048bdb141beac7d764fcb27f51
ConnectivityManager will be a part of mainline module, so its
hidden API cannot be called by external caller.
Replace ConnectivityManager#isNetworkSupported() with
checking FEATURE_TELEPHONY.
Bug: 182963397
Test: m
Change-Id: I457459554e5e6fe0874b8db81c6547035a6603b8
Merged-In: I457459554e5e6fe0874b8db81c6547035a6603b8
setOwnerUid() and setAdministratorUids() should run in R+.
Previous logic will skip them in S+. Correct the logic to
what it should be.
Bug: 172183305
Test: atest android.net.NetworkCapabilitiesTest
Change-Id: Ic983aa00f930fb26350469ef093bcba2990433a4
Constructor of JobStatus may update the network request in the
JobInfo parameter. NetworkRequest is moving into the incoming
connectivity module. The hidden methods and members usage will
not allowed anymore, so it requires to rebuild the network
request for any update in the network request. Expose a new
Builder constructor as a helper method to construct from an
existing JobInfo instance which will helpful for such cases
that need to clone the JobInfo and update only specific items.
Also, JobStatus which is inside the platform could not refer
to the hidden members or methods of classes in the connectivity
mainline module. Callers who want to construct a network
request should use the formal NetworkRequest.Builder. Update
the usage accordingly to resolve the hidden usage.
Bug: 172183305
Test: atest JobInfoTest
Test: atest com.android.server.job.controllers.JobStatusTest
Change-Id: Ifb74d44e29e13f0e3b995be638c5bfe435a09106
Merged-In: Ifb74d44e29e13f0e3b995be638c5bfe435a09106
Provide a formal way to construct a new NetworkRequest from an
existing instance. The network capabilities inside the
NetworkRequest is hidden. There is no way to pass a
NetworkRequest and update its capabilities. Add
NetworkRequest.Builder creating from an existing instance to
allow to clone the network capabilities.
Bug: 172183305
Test: make update-api
Change-Id: I068462b2a1410daf67b0c95f2b643d396f079531
Merged-In: I068462b2a1410daf67b0c95f2b643d396f079531
* changes:
Expose registerDefaultNetworkCallbackAsUid.
Support calling registerDefaultNetworkCallback for another UID.
Store the effective UID in NetworkRequestInfo.