Use the passed in executor for getUnusedCount so that the work is
actually handled on the main executor.
Bug: 231931350
Test: bug repro steps
Change-Id: I7c97e1e6d55457662920a3a15a5605324dd7963f
This op gets around the background restrictions on RECORD_AUDIO, when
used for SoundTrigger detection
In addition, moves the precise logic for soundtrigger RECORD_AUDIO
checks out of the soundtrigger system
Fixes: 230430779
Test: manual
Change-Id: I6d63c99e2d31e3f668070ac82afed71ff6672c9e
Merged-In: I6d63c99e2d31e3f668070ac82afed71ff6672c9e
When the set of carrier privileged apps changes on the device, grant the
Carrier Provisioning app POST_NOTIFICATIONS
Fixes: 226201376
Test: atest DefaultPermissionGrantPolicyTest
Change-Id: I5ff732823404bd48eed076c32485331cf6efd797
Adding state to remember if a log for missing activity manager
is already printed or not.
Bug: 202092164
Test: Manual
Change-Id: Ia945a7396d06f7e8a3fc12359583970faed06a72
Per API council feedback, reflect that the first app in an
AttributionSource chain must have UPDATE_APP_OPS_STATS to do a trusted
blame
Fixes: 222094627
Test: build
Change-Id: I63513ca70ddebe0fd5a05d4414f88985bc3fcad4
This fixes a bug where self-revocation didn't work in multi-user
settings. Now the correct context is used throughout the call stack and
the permission for the calling user will be revoked.
Also added a checked IllegalArgumentException (previously unchecked
SecurityException) when trying to revoke a permission that is not
currently granted.
Test: manual using two users and
atest android.permission.cts.RevokeOwnPermissionTest
Bug: 218788609
Change-Id: I3dce34b8b956b4d1eb0ac1e34b6fdbf1795aa269
Clarify the difference between protection and protection flags, which
has been a source of confusion for multiple teams. Also added
documentation about the `internal` protection.
Test: presubmit
Change-Id: I72d1a9b5030eabdabecff3983cf299d469dd9910
After first launch, remember T+ apps which had the review required flag
cleared on launch, until a grant permission request comes in.
Also modifies some behavior of the upgrade code grants.
Bug: 194833441
Test: atest NotificationPermissionTest
Change-Id: Iafef8348e6cdb05fb214382b945cc7886beaff4b
This param controls how long to wait before revoking permission after
every process has been killed.
Deprecate previous API and update all known uses of the deprecated API.
Use updated API for self-revocation feature.
If multiple one-time permission sessions are started for the same
package with different parameters, always use the shortest parameters.
Test: atest android.permission.cts.RevokeOwnPermissionTest,
atest android.permission.cts.OneTimePermissionTest
Bug: 210387494
Change-Id: I0c0e21b3b48dd31f0c267d5c8b89336714835289
Add an API to get a package's eligibility for hibernation for a given
user. A package is either eligible, exempt by the system, or exempt by
the user.
This information can be used to show more accurate UI for hibernation
controls (e.g. disabling the user-controlled exemption toggle if the app
is already exempt by the system)
Bug: 200087723
Test: CTS test in topic
Change-Id: Iea844477184fadb55ea14485dff172ed7be2b715
Test: Manual test using a non-privileged app, atest
android.permission.cts.SelfRevokeRuntimePermissionTest
When calling the API, the permission (along with any other permissions
from the same group) for the current package is downgraded to a one-time
permission, and a one-time permission session is started.
Bug: 210387494
Change-Id: I9f061cbc8c3db720127c96200fe94a644246b6d7
This allows us to check attribution for started ops in tests, and support
starting in system apps
Test: atest CameraMicIndicatorsPermissionTest
Bug: 212434116
Change-Id: Iacdf1d339588cd680c20b3fb55ada9cedb2e70b0
Add the revokePostNotificationPermissionWithoutKillForTest API, which
will allow the shell to revoke the POST_NOTIFICATIONS permission without
killing this app. Gate this permission behind the
REVOKE_POST_NOTIFICATIONS_WITHOUT_KILL permission, which is
signature|privileged, accessible only to the shell.
Ignore-AOSP-First: Contains information about unreleased features
Test: manual
Bug: 194833441
Change-Id: I3177d1aeb338591c1d736aa6b4f073b6db6227e7
Also ensure each chain is attributed to only one op
Test: manual
Fixes: 212434116
Change-Id: I50efc2b305627f8e37eb28842487b911dce5d925
(cherry picked from commit 33c3c1a629)
Merged-In: I50efc2b305627f8e37eb28842487b911dce5d925
Bug: 152453213
Tag: #refactor
This commit prepares PropertyInvalidatedCache to function as a system
api. Specifically, the methods recompute() and bypass() which may be
overridden by clients are now public (instead of protected). This
forces an update to all existing clients, to accommodate the change in
method visibility.
Two small changes have been made as cleanup:
1. The awkwardly named debugCompareQueryResults() is now
resultEquals(), which is more or less consistent with how other
equality tests are named in Android. This name change affects two
clients.
2. PackageManager has changed to use resultEquals() instead of
maybeCheckConsistency(). This provides a simpler and more
consistent use of the APIs. maybeCheckConsistency() has been made
private.
Test: atest PropertyInvalidatedCacheTests
Change-Id: I4110f8e887a4fd8c784141e8892557a9d1b80a94
Add some specific info on checkPermissionForDataDeliveryFromDataSource
javadoc.
Fix: 204179567
Bug: 195144968
Test: build (it's only javadoc)
Change-Id: I6d4e5b9e06bf990b5e40eb727259dc79753d5eef
Action will open the PermissionController screen to review recent
permission decisions. Currently only supported on Auto.
Bug: 194240664
Test: adb shell am start -a android.permission.action.REVIEW_PERMISSION_DECISIONS
Change-Id: Ic37e0b69632d38596b707cd7b1a17fbb89bfa547