The notifyTaskSnapshotChanged may not be always called after
Binder.clearCallingIdentity. And because there was commit
67b0902 that avoids keeping unnecessary buffer in remote
processes, it may mis-close the buffer in system server if
the calling pid isn't cleared on binder thread.
e.g. there are several suspects from ActivityTaskManagerInternal
Though it might be the responsibility of the caller to clear
binder identity before calling internal interfaces.
Instead of adding clearCallingIdentity every where:
1. Explicitly set the listener as local to skip closing the buffer
so it is independent of which thread is calling.
2. Protect the persister when using the buffer.
Bug: 192143094
Bug: 220659717
Bug: 223950159
Bug: 225794452
Test: atest TaskSnapshotPersisterLoaderTest
Change-Id: I94e8e706e56a73fffe8189023bcef5efd797a24c
When we know that an app moved to a procstate that is considered
an interaction event, the app will not be in idle state. So, avoid
calling into UsageStatsService for idle state in this case.
Bug: 209338078
Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: I5648db595d2fd10a151da13e472fd905bcafe182
In remote bugreport collection, Shell sends REMOTE_BUGREPORT_DISPATCH to
DevicePolicyManagerService which in turn notifies Device Owners that a
bug report is ready for collection. There existed a threat where a
malicous user could spoof the REMOTE_BUGREPORT_DISPATCH broadcast via
ADB to send a crafted bugreport to the Device Owner. Securing
REMOTE_BUGREPORT_DISPATCH is not as easy as it appears: putting a
permission on REMOTE_BUGREPORT_DISPATCH does not work since both the
legitimate sender and the malicious user are UID_SHELL. Instead, we
introduces a nonce which was sent from DPMS to Shell when bugreport is
triggered, and DPM will only accept REMOTE_BUGREPORT_DISPATCH when
a matching nonce is seen.
Ignore-AOSP-First: security fix
Bug: 171495100
Test: atest DeviceOwnerTest#testRemoteBugreportWithTwoUsers
Test: atest DeviceOwnerTest#testAdminActionBookkeeping
Test: atest BugreportManagerTest
Change-Id: I7649b4f22b74647d152d76bb46d5ca70bfa3617d
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
* 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
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
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
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
Move the callback as the last paramter to registerOnBackInvokedCallback
Test: Existing
Bug: 224562951
Change-Id: I8608a03b53baa04bedee81d2e86b2339abd6c594
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
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)
* 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
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