Commit Graph

23058 Commits

Author SHA1 Message Date
Matt Pietal
e7ed33a577 Merge "Use new DevicePolicyManager#logoutUser() methods" into tm-dev 2022-03-22 12:40:54 +00:00
Pablo Gamito
ace23e0e89 Merge "Read custom background when creating ActivityOptions from bundle" into tm-dev 2022-03-22 10:47:56 +00:00
Dave McCloskey
c5a7ed29de Merge "Changes to support reducing noise in active unlock notifications." into tm-dev 2022-03-21 19:15:01 +00:00
TreeHugger Robot
43d732feb3 Merge "Update fields for SecurityLog WiFi events." into tm-dev 2022-03-21 17:45:57 +00:00
Dave McCloskey
6c707a47da Changes to support reducing noise in active unlock notifications.
1. Add additional trigger onUserMayRequestUnlock
  - point existing trigger points from SystemUI to this
2. Argument added to onUserRequestedUnlock to indicate if user wants to
   dismiss keyguard.
3. Callback for result of grantTrust calls.
  - curently only calls back if device was unlocked as a result of the
    call

See design: go/au-noise-reduction

Note: changes made to SystemUI are manually tested and may need
refactoring which is being skipped now to meet the API Freeze deadline.

Bug: 225231929
Test: atest TrustTests
Test: Manual interaction with wake & fingerprint sensor
CTS-Coverage-Bug: 213944235
Change-Id: I8d08229f09c9a1f2295b7eb464d12cad0c6b8303
2022-03-21 09:00:43 -07:00
Charles Chen
8c1fad0d74 Merge "Fix #testChangeFontScaleNoRelaunch flaky" into tm-dev 2022-03-21 08:51:45 +00:00
Antoan Angelov
a443dccaad Merge "Add DevicePolicyManager#getPolicyManagedProfiles system api" into tm-dev 2022-03-20 20:08:50 +00:00
Kholoud Mohamed
a8e9aa390d Merge changes from topic "apiFeedback" into tm-dev
* changes:
  RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
  RESTRICT AUTOMERGE move device policy resource APIs to a separate class
  RESTRICT AUTOMERGE hide device policy resources constants
2022-03-19 06:30:43 +00:00
Sudheer Shanka
4b61ecc716 Merge "Add ACCESS_BROADCAST_RESPONSE_STATS permission." into tm-dev 2022-03-19 05:14:21 +00:00
Nikita Ioffe
3b5de448c2 Merge changes from topics "presubmit-am-1dec1aa04236490e8d2a03998a4272b7", "sdk-sandbox-instr" into tm-dev
* changes:
  Add a way to instrument sdk sandbox processes
  Sdk Sandbox should be able to see it's client app
2022-03-19 02:09:15 +00:00
kholoud mohamed
b7aedc6f3d RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
Bug: 217388602
Bug: 218875965
Test: atest EnterpriseResourcesTests
Test: manual
Change-Id: I8af03136e67057d171e97cb5a43187aa6c7f4fe7
2022-03-19 00:22:17 +00:00
kholoud mohamed
7cb1133b16 RESTRICT AUTOMERGE move device policy resource APIs to a separate class
Bug: 217388602
Test: atest EnterpriseResourcesTests
Change-Id: I83b399f36dfe3ba93d625807659dee59d872097e
2022-03-19 00:22:04 +00:00
Stefan Andonian
71ad90ca9f Add an event type constant for Undismiss events when the user clicks
Undo after dragging a predicted app icon onto the "Do Not Suggest" drop
target.

Bug: b/200841778
Test: Verified that the constant was usable from Launcher project.
Change-Id: I0f7e4f139a7b9012fd55bf72294dd8c1fab38a39
2022-03-18 22:15:09 +00:00
Pablo Gamito
a30daca9ff Merge "Add API to allow apps to update their background color programatically" into tm-dev 2022-03-18 21:41:03 +00:00
kholoud mohamed
6ed9faf5bd RESTRICT AUTOMERGE hide device policy resources constants
Bug: 218875965
Bug: 217388602
Test: atest EnterpriseResourcesTests
Change-Id: Iac71c0d5b451e8ec77c0ca0113e2248ef21cc412
2022-03-18 20:47:12 +00:00
Beth Thibodeau
77472b3e78 Merge "Revert^2 "Use compat framework to gate session actions"" into tm-dev 2022-03-18 19:56:38 +00:00
Jonathan Scott
9bc9a8bdd1 Merge "Add setProfileOwnerOnOrganizationOwnedDevice COPE API." into tm-dev 2022-03-18 17:50:42 +00:00
Sudheer Shanka
0de55a3459 Merge "Add a hidden API to query appstandby constants." into tm-dev 2022-03-18 17:43:26 +00:00
arangelov
69bb632cb8 Add DevicePolicyManager#getPolicyManagedProfiles system api
That way the logic to get a managed profile can be
customizable by OEMs.

Fixes: 214473624
Test: manual
Test: CTS tests to be added in a follow-up CL
Change-Id: Id183e987d2cb04040db028b9913188267d1a9a84
2022-03-18 17:11:26 +00:00
TreeHugger Robot
1b58550351 Merge changes from topics "presubmit-am-859dd3744ae243f9a8cb2f6234a9ef1e", "register_api" into tm-dev
* changes:
  Change parameter order to make it SAM compatible
  Fix a problem that Dialog does not close in new dispatch.
2022-03-18 17:04:05 +00:00
Kholoud Mohamed
3d31e0b93b Merge changes from topic "resetAPIs" into tm-dev
* changes:
  RESTRICT AUTOMERGE add requiresAPI annotation for DPM#getString
  RESTRICT AUTOMERGE Expose getString APIs as public
2022-03-18 16:07:22 +00:00
Nikita Ioffe
99ba880e55 Add a way to instrument sdk sandbox processes
The following restrictions applies to the instrumentation of the sdk
sandbox processes:

* Instrumentation must be signed with the same certificate as the client
  app the instrumented sdk sandbox belongs to.
* If there is a running instance of to-be-instrumented sdk sandbox
  process, then it will be killed before the instrumentation starts.
* While instrumentation is running the client app won't be allowed to
  connect to the instrumented sdk sandbox process.
* The --no-restart instrumentation of the sdk sandbox processes is not
  supported.

Bug: 209061624
Test: atest SdkSandboxInprocessTests
Change-Id: Ia4b145c091bf8da600a77ea82fc9e3cd97757275
2022-03-18 14:50:21 +00:00
Jonathan Scott
95826d61fb Merge "Add finalizeWorkProfileProvisioning." into tm-dev 2022-03-18 14:50:07 +00:00
Pratyush More
7da1954f69 Merge "Move LocaleManagerTests to postsubmit suite." into tm-dev 2022-03-18 14:48:43 +00:00
Antoan Angelov
b7b3316789 Merge "Add extra to inform the role holder of the update attempt result" into tm-dev 2022-03-18 14:29:48 +00:00
Antoan Angelov
8c241a637e Merge "Make config_devicePolicyManagementUpdater readable by tests" into tm-dev 2022-03-18 12:59:26 +00:00
Antoan Angelov
efdd8dba93 Merge "Update javadoc for EXTRA_PROVISIONING_ROLE_HOLDER_CUSTOM_USER_CONSENT_INTENT" into tm-dev 2022-03-18 12:55:56 +00:00
Antoan Angelov
c2b95ea6aa Merge "Add a new result code for the DPMRH updater to signal that the feature is disabled" into tm-dev 2022-03-18 12:51:07 +00:00
Antoan Angelov
9d06c94e7c Merge "Make EXTRA_PROVISIONING_USE_MOBILE_DATA public API" into tm-dev 2022-03-18 12:47:09 +00:00
Jonathan Scott
1355042efd Add finalizeWorkProfileProvisioning.
Test: atest android.devicepolicy.cts.DevicePolicyManagerTest
Bug: 210469972

Change-Id: I8dff5653ac7404c2571c1f2d708f239584208be1
2022-03-18 12:41:36 +00:00
Aleks Todorov
6a9ed66cdd Add setProfileOwnerOnOrganizationOwnedDevice COPE API.
Bug: 198774281
Test: atest cts/tests/devicepolicy/src/android/devicepolicy/cts/DevicePolicyManagerTest.java
Change-Id: I50d5f69709789912af63ebecc33aad4df17bbe5f
2022-03-18 11:22:08 +00:00
Pratyush More
89494d4285 Move LocaleManagerTests to postsubmit suite.
Bug: 225192026
Bug: 225255354
Test: atest CtsLocaleManagerTestCases
Change-Id: I1d44b44f7ff9a09892b7d21095c4378641a39327
2022-03-18 10:32:25 +00:00
Vadim Caen
3686891611 Change parameter order to make it SAM compatible
Move the callback as the last paramter to registerOnBackInvokedCallback

Test: Existing
Bug: 224562951
Change-Id: I8608a03b53baa04bedee81d2e86b2339abd6c594
2022-03-17 22:19:54 +01:00
arangelov
4fe4b2e65d Add extra to inform the role holder of the update attempt result
Role holders can request an update. When that happens, the flow
returns back to platform, platform performs the update and checks
the update result. If update was successful, it restared the role
holder, and if not, it failed provisioning. This CL updates this
so that the role holder is _always_ started, regardless of the
update result. That way the role holder can make a decision
whether to continue provisioning or fail it.

Bug: 224993192
Test: none
Change-Id: Ia7dd61d02c568e8c8ad17af0a61106d127c4869a
2022-03-17 20:26:17 +00:00
arangelov
bcfeecc59a Update javadoc for
EXTRA_PROVISIONING_ROLE_HOLDER_CUSTOM_USER_CONSENT_INTENT

Fixes: 223839434
Test: none
Change-Id: I307f4670b0d908cb1a2f8a0837c7aac8aca702e9
2022-03-17 20:26:17 +00:00
arangelov
88515fa748 Add a new result code for the DPMRH updater to signal that the feature
is disabled

Fixes: 223837008
Test: none
Change-Id: I4949d9def867a9b0d56e75763a6979ffc69d7516
2022-03-17 20:26:17 +00:00
arangelov
0c40f6d80a Make EXTRA_PROVISIONING_USE_MOBILE_DATA public API
Fixes: 138648986
Test: compiled
Change-Id: Iacdebcc3d17fbbdeb3247b04a62a014e12ce280c
2022-03-17 20:26:06 +00:00
Xiaowen Lei
e29c639ea4 Merge "Update javadoc and log message to avoid confusion." into tm-dev 2022-03-17 20:16:49 +00:00
Shan Huang
e5f99e6360 Fix a problem that Dialog does not close in new dispatch.
We can treat Dialog as a standard widget that handles back.
Its dedicated back nav type is not in use and can eventually be removed.

Test: try dismiss dialog in BackTest app.

Change-Id: If89856ccfac8b1fd968aa674628476de02fbf489
(cherry picked from commit 6cb6399008)
2022-03-17 20:05:30 +01:00
Sudheer Shanka
945c56f2ee Merge "Update BroadcastResponseStats javadoc." into tm-dev 2022-03-17 17:23:38 +00:00
Naomi Musgrave
4b563a2d37 Merge "Capture the contents of a single task" into tm-dev 2022-03-17 17:03:48 +00:00
Pratyush More
ef269fabde Merge "Add getSystemLocale public API in response to developer feedback." into tm-dev 2022-03-17 15:08:27 +00:00
Thomas Vannet
ac4406b453 Merge changes from topics "cherrypick-selfrevokemultiuser-emqfc1tlui", "cherrypick-selfrevokerenameself-lcm1yyzp8i", "presubmit-am-8a6e07e400554464bf71e06db20e4f32", "presubmit-am-d66e407983c84f0f90928a76de0d3ef2" into tm-dev
* changes:
  Rename revokeOwnPermissionsOnKill to revokeSelfPermissionsOnKill
  Self-revocation: Call PermissionControllerManager directly from Context
  Synchronously revoke permissions on OTP session end when kill delay is 0
  Do not leak whether package exists in revokeOwnPermissionsOnKill
2022-03-17 14:47:04 +00:00
kholoud mohamed
1d0d9c9cfb RESTRICT AUTOMERGE Expose getString APIs as public
exposed getString APIs as public to make it consistent with the
getDrawable APIs.
Also changed resetStrings/Drawables API to take in a set instead of an
array.

Bug: 218875965
Test: atest EnterpriseResourcesTests
Change-Id: I042636233ea342af62a7e6569c90786d3ef249cb
2022-03-17 14:45:52 +00:00
arangelov
7023214eb2 Make config_devicePolicyManagementUpdater readable by tests
Bug: 222070271
Test: none
Change-Id: I5b481c3e8e2fb414f7e7bf32d570d06b3e2af15d
2022-03-17 14:43:13 +00:00
Matt Pietal
c01499bd24 Use new DevicePolicyManager#logoutUser() methods
This replaces the series of steps (that were easy to get wrong)
required to properly logout and switch users.

Fixes: 215583276
Test: manual
Change-Id: I2d8c34f184a72fdea71dcf549d1a31133a5155ec
2022-03-17 13:43:16 +00:00
Charles Chen
b9db23114a Fix #testChangeFontScaleNoRelaunch flaky
The test failed because we used public config diff to determine if
 Activity#onConfigurationChanged should be dispatched.
However, the public config diff contained the change which wouldn't
make Activity relaunch and also receive the callback.

This CL uses the public diff, which filters the change without
relaunching Activity, to determine if the callback should be
dispatched. This CL also covers the case that the callback is
still dispatched if small changes are handled.

Test: atest ActivityThreadClientTest ConfigChangeTests
Bug: 222067515
Bug: 222223467
Change-Id: I8aa80e9fd70fddc9f88a36e7dc2ffb2163b9ffa6
2022-03-17 10:40:50 +00:00
Alex Johnston
b2eae22673 Merge "dump factory reset protection policy" into tm-dev 2022-03-17 10:27:07 +00:00
Xiaowen Lei
337ec14b4a Update javadoc and log message to avoid confusion.
"visibility" is sometimes used to refer to (showing && !occluded).
Therefore removing the term from the doc and logging.

Bug: 216630470
Test: N/A
Change-Id: I03b36c99f201fbb8be382a81f2046c3fed5fce13
2022-03-17 06:07:03 +00:00
Gabriel Biren
d57f26b644 Update fields for SecurityLog WiFi events.
Bug: 165342942
Test: m
Change-Id: I16445c5e6b8e5571637541ddf55e298ed3b314e7
2022-03-17 02:39:16 +00:00