Commit Graph

19824 Commits

Author SHA1 Message Date
TreeHugger Robot
77e33e1a9e Merge "Limit UI context verification to UI related APIs" 2021-01-18 07:21:14 +00:00
Charles Chen
9ca5f902ca Limit UI context verification to UI related APIs
This CL relaxed the UI context checks to only apply on UI related
APIs in WallpaperManager.

Test: build & run
Bug: 176958992

Change-Id: I390e865e31fde48bad6bbddb4203e4c997a1400a
2021-01-18 12:37:06 +08:00
Hyunyoung Song
16db752947 Merge "Fix SearchAction parceling error" 2021-01-17 06:05:03 +00:00
arangelov
f446e9fc1d Add EXTRA_PROVISIONING_RETURN_BEFORE_POLICY_COMPLIANCE extra
This extra allows the provisioning initiator to determine
whether provisioning should be split into two (provisioning
part and DPC setup part) or be a single flow.

If set to true, it is the responsibility of the provisioning
initiator to resume provisioning. This is basically the
setup wizard.

Fixes: 177330679
Test: this extra will be testsed in ManagedProvisioning code
Change-Id: If8b301ef676bb8b15d974ddc898420978de08f84
2021-01-16 01:47:54 +00:00
TreeHugger Robot
b8ee494bc9 Merge "Add extra to skip the ownership info screen" 2021-01-16 01:27:27 +00:00
arangelov
f4667ef2d0 Add extra to skip the ownership info screen
This boolean extra will be used to determine whether to skip
the ownership info screen in the provisioning flow.

Setting it to true makes the provisioning initiator responsible
for showing the ownership info.

Bug: 175622930
Test: Tests will be provided in the ManagedProvisioning code
Change-Id: I505d34fbb78cc065376035ee59993f8f5cad68dc
2021-01-16 01:27:10 +00:00
TreeHugger Robot
7c7300b24e Merge "Revert^2 "Expose role API for Settings on RoleManager."" 2021-01-16 00:20:17 +00:00
Hyunyoung Song
558c605944 Merge "Add OWNERS file to SearchUi related projects" am: 3e4b74520b am: 1f0eb2327a am: 3bbcad312a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1552394

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I36d598aece29035d9d040eb2f03a9b9cdc723ff6
2021-01-15 22:17:13 +00:00
Hai Zhang
f2fc3e30e9 Revert^2 "Expose role API for Settings on RoleManager."
ec6ebc3a1e

Also made the APIs test API instead of system API, to be turned into
system API later during the actual move into module.

Bug: 158736025
Test: atest RcsProvisioningMonitorTest
Change-Id: I74ce1b8352b6e3afc595d8d0f08db28b8c2f29c3
2021-01-15 14:13:43 -08:00
TreeHugger Robot
3ae05939b4 Merge "More DevicePolicyManager operations with safety checker for device management" 2021-01-15 22:09:16 +00:00
Hyunyoung Song
3bbcad312a Merge "Add OWNERS file to SearchUi related projects" am: 3e4b74520b am: 1f0eb2327a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1552394

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia9ef5f6dd064f82849e8e2446348a7d618bfe14e
2021-01-15 21:57:01 +00:00
TreeHugger Robot
82200af0ab Merge "Add missing permission annotation" 2021-01-15 19:03:03 +00:00
Evan Rosky
c7bd598702 Merge "Add support for remote transition playback in shell transitions" 2021-01-15 18:23:09 +00:00
Hyunyoung Song
12d7faedf0 Add OWNERS file to SearchUi related projects
Test: not needed as this is a meta file change

Change-Id: I4900664d11374f2b82247a73445e0deea0e70cbc
2021-01-15 10:00:29 -08:00
Hyunyoung Song
da919eff00 Fix SearchAction parceling error
Bug: 177549812

Test: atest CtsSearchUiServiceTestCases
Change-Id: I931085086b29d4549e1b5fc82f88fd4d07e33ed1
2021-01-15 00:56:44 -08:00
Joanne Chung
756e3a56ca Merge "Get ApplicationInfo using usr id" into rvc-qpr-dev am: 19e9f00346
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13274693

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8e65f3622eec6e15ea5266b81092de6be862038d
2021-01-15 08:40:21 +00:00
Joanne Chung
19e9f00346 Merge "Get ApplicationInfo using usr id" into rvc-qpr-dev 2021-01-15 07:56:55 +00:00
Yan Zhu
bb10ad2225 More DevicePolicyManager operations with safety checker for device management
Bug: 175245108
Test: m update-api
atest \
CtsDevicePolicyManagerTestCases:DeviceOwnerTest#testDevicePolicySafetyCheckerIntegration \
CtsDevicePolicyManagerTestCases:ProfileOwnerTest#testDevicePolicySafetyCheckerIntegration

Change-Id: I861364041dabca7a76492f98a387548846da92d9
2021-01-15 06:16:49 +00:00
Joanne Chung
d96bcfcdf2 Get ApplicationInfo using usr id
Use ApplicationInfoAsUser() to get the application information by
user id to make sure we have correct permission, othewise we will
get the SecurityException due to lack of INTERACT_ACROSS_USERS.

Bug: 176313819
Test: atest CtsVoiceRecognitionTestCases
Test: manual.
      1.create profile user
      2.Install sample recognizer app
      3.Function works fine and no security exception occurred after
      apply the change

Change-Id: I6958dbf661373606fb9dba55e386aaea4399a146
Merged-In: Iaf485537b8082d2109d2134ff987dc7244e31218
2021-01-15 12:25:06 +08:00
Hui Yu
5b9e74452e Merge "tempWhitelistForPendingIntent() can specify temp allowlist type." 2021-01-15 03:40:08 +00:00
TreeHugger Robot
40e252620a Merge "Added profile-owner and device-owner on cmd user list." 2021-01-15 00:44:48 +00:00
Evan Rosky
30f3544f65 Add support for remote transition playback in shell transitions
This adds IRemoteTransition interface for other processes (like
launcher) to register for playing transition animations.

Then there are 2 supported ways to "register":

1. Is to attach an IRemoteTransition to ActivityOptions. To
   support this pathway, requestStartTransition now takes a
   TransitionRequest object which can contain whatever info
   is needed at the time. One piece of that is the passed-in
   IRemoteTransition.

2. Is to register directly with shell (via systemuiproxy for
   now) with a TransitionFilter. This filter allows shell
   transitions to dispatch a transition to a remote without
   need to make queries over binder.

This also hooks up launcher animations by converting the new
transition info to the old RemoteAnimationTargetCompat stuff.

Bug: 169035082
Test: launch app from launcher and observe the icon animation.
      atest ShellTransitionTests
Change-Id: I8014a6f46cffda3a48a1a4ae101e2643078f4a14
2021-01-14 14:50:51 -08:00
Neil Fuller
bb14575fde Merge "Introduce a shell command to obtain MLS" 2021-01-14 19:37:50 +00:00
Neil Fuller
8b9717c418 Introduce a shell command to obtain MLS
Introduce a shell command to obtain MLS, and remove the equivalent from
TimeZoneDetector.

Bug: 172934905
Test: atest CtsLocationTimeZoneManagerHostTest
Change-Id: I75f2a12ba435f6c297dcada061fad90915f12c26
2021-01-14 16:47:56 +00:00
TreeHugger Robot
316dbd3b08 Merge "Prevent use of Enrollment-specific Id on parent" 2021-01-14 14:44:14 +00:00
Eran Messeri
afcd70ee95 Prevent use of Enrollment-specific Id on parent
Throw if the caller is trying to call methods related to
Enrollment-specific ID on the parent DevicePolicyManager instance.

This fixes ManagedProfileTest#testParentProfileApiDisabled

Bug: 177439350
Bug: 168627890
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.ManagedProfileTest#testParentProfileApiDisabled
Change-Id: I06610249021639f9319835d28c681bc0cb3d3887
2021-01-14 11:45:48 +00:00
TreeHugger Robot
d03ee56a05 Merge "ESID access for Delegated Cert Installer" 2021-01-14 11:42:37 +00:00
TreeHugger Robot
85cab1fa8b Merge "Use API for binding service with custom user and executor." 2021-01-14 10:36:55 +00:00
Eran Messeri
0360f4ec18 Merge "COPE: Allow use of password quality API" 2021-01-14 08:18:40 +00:00
Hui Yu
b3853a23fa tempWhitelistForPendingIntent() can specify temp allowlist type.
The supported temp allowlist types are
TEMPORARY_WHITELIST_TYPE_FOREGROUND_SERVICE_ALLOWED and
TEMPORARY_WHITELIST_TYPE_FOREGROUND_SERVICE_NOT_ALLOWED.

Bug: 175244558, 171305836
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java

Change-Id: I6b1e7782d54c6934453a0e2b529af96a19a45c4f
2021-01-13 22:53:12 -08:00
Lucas Dupin
366542b94e Add missing permission annotation
Methods that read the wallpaper need READ_EXTERNAL_STORAGE permission.
For some reason we forgot to annotate this method when getFastDrawable()
and getWallpaperFile() were annotated.

Test: make
Fixes: 136457450
Change-Id: I8dec025f35446f4a27b1c43dc249a8078478eeef
2021-01-13 18:03:12 -08:00
Hai Zhang
a95881f6ca Use API for binding service with custom user and executor.
There is actually already a public API overload for
Context.bindService() which allows binding the service with the user
of Context.getUser() and a custom Executor.

We can construct an Executor from our Handler, but this executor is
required to remain the same instance for different calls to
bindService() for the same ServiceConnection by the API, so we should
keep the Executor instance, as well as the Handler instance, instead
of calling getJobHandler() every time. In fact getJobHandler() is
already required to return the same instance, or bindServiceAsUser()
would have thrown the same exception for different Handlers.

Also removed a check in ContextImpl.bindService() to allow mainline
modules to use the bindService() API with Context multi-user.

Bug: 158736025
Test: presubmit
Change-Id: I95717a4a74267dff4fbe1898a82cdfa7f195cc06
2021-01-13 15:00:37 -08:00
Eran Messeri
0be80ff965 COPE: Allow use of password quality API
Allow the Device Policy Client of a company-owned, personally-enabled
device to device-wide set password requirements using the
deprecated password quality API.

DPC of a work profile on a personal device still cannot use the
deprecated API device-wide.

Bug: 165573442
Test: atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testDevicePolicyManagerParentSupport
Change-Id: Icac0cc9028e760d8470e03f3e91386f667646c7f
2021-01-13 21:30:21 +00:00
Eran Messeri
a1485a6980 ESID access for Delegated Cert Installer
Let the delegated cert installer read the Enrollment-specific ID, as
certificate management is tied to specific devices/enrollments.

Bug: 168627890
Test: atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testDelegatedCertInstaller
Change-Id: I6fd301d42342b8b6c94b27846dd859c507057d9e
2021-01-13 18:12:33 +00:00
Ashwini Oruganti
40449d8182 Merge "Bulk apply PendingIntent.FLAG_MUTABLE_UNAUDITED." 2021-01-13 16:08:07 +00:00
Joanne Chung
92cf2ee67a Merge "Get ApplicationInfo using usr id" 2021-01-13 14:19:06 +00:00
Mathew Inwood
f3793ebcc9 Merge "Derestrict some non-SDK APIs." am: 29bf6e8443 am: 9e27f89092 am: 982e50f2c6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1541669

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iab20c244c8ff5b04f3236cfccb453a4fbe5a8705
2021-01-13 10:34:26 +00:00
Mathew Inwood
982e50f2c6 Merge "Derestrict some non-SDK APIs." am: 29bf6e8443 am: 9e27f89092
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1541669

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4eeffeb0d9ab509e2f436435bf2079558e2d1c7d
2021-01-13 10:12:53 +00:00
Mathew Inwood
29bf6e8443 Merge "Derestrict some non-SDK APIs." 2021-01-13 09:38:35 +00:00
Louis Chang
3275f07a82 Merge "Rename Stack to Task related terms (5/n)" 2021-01-13 07:56:43 +00:00
Hui Yu
8102d73d57 Merge "Allow BG-FGS-launch for profile owner UID." 2021-01-13 06:36:51 +00:00
Adam He
aaeac91a58 Merge "Register translation service." 2021-01-12 23:35:18 +00:00
Ashwini Oruganti
f8191e8996 Bulk apply PendingIntent.FLAG_MUTABLE_UNAUDITED.
We've been working hard to require PendingIntents explicitly declare
if they allow their contents to be mutated or not, and to finish
landing that work this change applies the new FLAG_MUTABLE_UNAUDITED
flag to all remaining code locations until they can be manually
inspected.

Bug: 160794467
Test: manual
Change-Id: I8d7ec64ac89755c14b5959bb6ef0bce203c92bf0
2021-01-12 15:07:43 -08:00
Adam Bookatz
185089663b Merge "Add User* OWNERS file (part 2)" am: da79da08f0 am: b9b73d26db am: 9ac98ffa59
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1543926

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3fc005c69350f13002ceea055c7b97b8486eb484
2021-01-12 21:04:55 +00:00
Adam Bookatz
9ac98ffa59 Merge "Add User* OWNERS file (part 2)" am: da79da08f0 am: b9b73d26db
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1543926

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I87bc14c52e4aa4ed42f73496e104f0f3182c613b
2021-01-12 20:55:13 +00:00
TreeHugger Robot
14b4729450 Merge "Defined workflow to notify new users when the device is managed." 2021-01-12 20:50:42 +00:00
Hui Yu
9578316c3c Allow BG-FGS-launch for profile owner UID.
Bug: 171305836
Test: Create a profile owner app, start FGS from background.
Change-Id: I6a237c238dea9851a7126a5cbf7275db02f536ec
2021-01-12 12:46:05 -08:00
Joanne Chung
aa1949639a Register translation service.
Bug: 173243538
Test: manual. Make sure device can boot to home and we can get
the TranslationManager successfully.

Change-Id: Ib0e733d6b8f3792431d71f9791b5b2e43a029a7b
2021-01-12 12:19:49 -08:00
TreeHugger Robot
7c6e169d82 Merge "DPM: Prevent mixing password quality and complexity" 2021-01-12 18:35:49 +00:00
Hui Yu
b898264ff2 Merge "BG-FGS-start is allowed for companion apps." 2021-01-12 17:50:39 +00:00