565859 Commits

Author SHA1 Message Date
Sudheer Shanka
d533fa78b1 Move BLOCKED_REASON_* constants from NPMS into ConnectivityManager.
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
2021-03-25 01:33:26 +09:00
Treehugger Robot
8c9b5df98a Merge "Don't try to report non-existent stats" 2021-03-24 16:12:45 +00:00
Charles Chen
4eca6d0c5c Merge "Add OWNERS for ComponentCallbacksController" 2021-03-24 10:05:52 +00:00
Lucas Lin
ac06b167f9 Merge "Replace CM#isNetworkSupported() with checking FEATURE_TELEPHONY" 2021-03-24 04:02:56 +00:00
Chiachang Wang
b2d5ab569c Merge "Remove the hidden NetworkRequest usage" 2021-03-24 02:41:27 +00:00
Rambo Wang
c289c9b0a2 Merge changes from topics "ServiceState#dataRegState", "ServiceState#duplexMode"
* changes:
  Export ServiceState#DataRegState into telephony provider
  Public ServiceState#duplexMode in telephony provider
2021-03-24 01:22:51 +00:00
Benedict Wong
f1a81b04b1 Merge "Check carrier privilege permissions with package name" 2021-03-24 01:19:35 +00:00
Benedict Wong
d68c1f6cb2 Check carrier privilege permissions with package name
This change ensures that carrier privileges for the right packages are
always checked.

Bug: 183465199
Test: atest FrameworksVcnTests
Change-Id: If46c660e54870529868a7b4b1e271c9009b81d45
2021-03-23 17:42:12 -07:00
Jordan Liu
d7858116ca Merge "Add resource to disable cb" 2021-03-23 22:23:19 +00:00
Tianjie Xu
d0fe0c721d Merge "Clear caller id when reading device config" 2021-03-23 22:10:38 +00:00
Treehugger Robot
abffe558e3 Merge changes from topic "audiomanagertest_cts_dnd"
* changes:
  [Notification] Fix NotificationManagerServiceTest
  [Notification] Fix Notification channel Dnd bypass for multiusers
2021-03-23 20:48:21 +00:00
John Reck
66fc99d578 Merge "Fix thread-shared field evades lock acquisition reported by Coverity" 2021-03-23 19:55:30 +00:00
Tianjie
18fb750cc5 Clear caller id when reading device config
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
2021-03-23 12:36:14 -07:00
Janis Danisevskis
faabd1a836 Merge "Keystore 2.0: Add @IntDef for Keystore namespaces." 2021-03-23 19:35:00 +00:00
James Lin
fe4b99ee22 Merge "UCE OPTIONS APIs updated" 2021-03-23 18:47:44 +00:00
Zongheng Wang
ab2c1e5777 Merge "Replace createSmsSubmitPdu with createFromNativeSmsSubmitPdu" 2021-03-23 18:47:36 +00:00
Jack He
b4d4127efb Merge "ScanFilter.setDeviceAddress: Should send deviceAddress instead of mDeviceAddress to the next level" 2021-03-23 18:02:22 +00:00
Chen Chen
feab55912c ScanFilter.setDeviceAddress: Should send deviceAddress instead of mDeviceAddress to the next level
Bug: 183409081
Test: build and run

Change-Id: I2d25d21b0f143fc7362679e0094455c9132fda9d
2021-03-23 17:43:36 +00:00
Cody Kesting
46c10cbc4d Merge changes from topic "vcn-status-changed"
* changes:
  Rename VcnStatusCallback#onVcnStatusChanged.
  Reevaluate VcnGatewayConnections on receiving new configs.
2021-03-23 17:10:51 +00:00
Jordan Liu
61c1f3c415 Add resource to disable cb
Bug: 176557108
Test: manual
Change-Id: I060836c10b60638e4155670e16cf6475e6740665
Merged-In: I060836c10b60638e4155670e16cf6475e6740665
2021-03-23 09:54:23 -07:00
Rambo Wang
cff9760e07 Export ServiceState#DataRegState into telephony provider
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
2021-03-23 09:33:21 -07:00
Rambo Wang
4481b5181e Public ServiceState#duplexMode in telephony provider
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
2021-03-23 09:27:42 -07:00
Alex Light
6b3d3b38ba Don't try to report non-existent stats
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
2021-03-23 15:50:45 +00:00
Francois Gaffie
978bb8f810 [Notification] Fix NotificationManagerServiceTest
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
2021-03-23 15:27:56 +00:00
Francois Gaffie
92a9f5fc1d [Notification] Fix Notification channel Dnd bypass for multiusers
-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
2021-03-23 15:27:24 +00:00
Rambo Wang
9446a5239f Merge "Expose ServiceState#getDataNetworkType in telephony provider" 2021-03-23 14:26:52 +00:00
Junyu Lai
4e6166801e Merge "Remove the reference of new Network(int) in Vpn.java" 2021-03-23 14:00:35 +00:00
Jack Nudelman
fdad0e26a7 Merge "Require calling package to be allowlisted for thermal mitigation." 2021-03-23 12:53:08 +00:00
Junyu Lai
5b477acbbe Merge "Fix cannot find removeUnwantedCapability on R device" 2021-03-23 12:16:18 +00:00
Chiachang Wang
457f91decf Merge "Correct the logic in NetworkCapabilitiesTest" 2021-03-23 11:46:31 +00:00
Paul Duffin
82cd5382b7 Merge "Remove unnecessary dependency on libcore-platform-compat-config" 2021-03-23 11:17:06 +00:00
junyulai
7472deb59b Remove the reference of new Network(int) in Vpn.java
Test: atest FrameworksNetTests
Bug: 182963397
Merged-In: I4176dd1298ad8d8e8407eb95b2e6cbb8faf4bc17
Change-Id: I4176dd1298ad8d8e8407eb95b2e6cbb8faf4bc17
  (cherry-picked from ag/13959430)
2021-03-23 10:51:48 +00:00
Chiachang Wang
9327a57876 Merge "Add NetworkRequest.Builder creating from an existing instance" 2021-03-23 10:46:20 +00:00
Treehugger Robot
3972f1c61c Merge "Replace hidden API usages of NetworkCapabilities" 2021-03-23 10:07:46 +00:00
lucaslin
4ca36d5cf3 Replace CM#isNetworkSupported() with checking FEATURE_TELEPHONY
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
2021-03-23 18:07:24 +08:00
junyulai
c9afd3fa08 Fix cannot find removeUnwantedCapability on R device
Test: atest CtsNetTestCasesLatestSdk:android.net.NetworkCapabilitiesTest
Fix: 183473863
Merged-In: Icf2cda325795acee22a6c634e8d978f64c5ac3cb
Change-Id: Icf2cda325795acee22a6c634e8d978f64c5ac3cb
  (cherry-picked from ag/13966708)
2021-03-23 17:40:55 +08:00
Rhed Jao
e1b9b92816 Merge "Adds OWNERS for servicestests/utils-mockito" 2021-03-23 08:11:59 +00:00
Chiachang Wang
5a06d5b958 Correct the logic in NetworkCapabilitiesTest
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
2021-03-23 15:16:39 +08:00
Treehugger Robot
43a464cb70 Merge "Emulator cleanup in ClipboardService.java (closePipe)" 2021-03-23 07:04:40 +00:00
Chiachang Wang
686d828989 Remove the hidden NetworkRequest usage
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
2021-03-23 14:51:04 +08:00
Chiachang Wang
a2bc287e46 Add NetworkRequest.Builder creating from an existing instance
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
2021-03-23 14:50:03 +08:00
Tianjie Xu
fb5d22ffea Merge changes Ieeb0ebef,I1f33a8c6,I07168a7b
* changes:
  Add a specific error code for keystore failure
  Add a specific error code for provider mismatches
  Report the true value of more RoR metrics
2021-03-23 05:22:41 +00:00
Junyu Lai
f38268cd56 Merge "[VCN15] expose addUnwantedCapability and related APIs" 2021-03-23 05:02:22 +00:00
Lorenzo Colitti
14f7c0273f Merge "Have a new method in NetworkAgentConfig.Builder to set allowBypass" 2021-03-23 04:40:50 +00:00
Zongheng Wang
7b8f79b641 Replace createSmsSubmitPdu with createFromNativeSmsSubmitPdu
Test: atest bluetooth_test_common
Test: atest CtsTelephonyTestCases
Bug: 183051612
Change-Id: If15d31eb699e2c5d3e371628dba8adbaa9bbebfa
2021-03-22 21:31:58 -07:00
Jeff Sharkey
82ac7c4eeb Merge "Add OWNERS file for content tests." 2021-03-23 04:24:54 +00:00
Varun Shah
8125250075 Add OWNERS file for content tests.
Bug: n/a
Test: n/a
Change-Id: Ic346a36bb15498cf0a60b91c378b1f5cad198f64
2021-03-23 04:11:21 +00:00
Rajeev Kumar
6d7c90717a Merge "Move disk reads to background" 2021-03-23 01:54:30 +00:00
Lorenzo Colitti
892589c514 Merge changes I638ed5cd,I29f15571,I21a22ed1
* changes:
  Expose registerDefaultNetworkCallbackAsUid.
  Support calling registerDefaultNetworkCallback for another UID.
  Store the effective UID in NetworkRequestInfo.
2021-03-23 01:27:58 +00:00
Cody Kesting
7510bf5e99 Merge "Cache correct calling UID for VcnStatusCallbacks." 2021-03-23 01:08:32 +00:00