Add DPM.setApplicationExemptions API along with exemption constants.
Add DPM.getApplicationExemptions API
Add corresponding methods in DPMS along with map of DPM exemptions
constants to app-ops.
Add permission to AndroidManifest to expose to CTS tests.
Bug: 246330879
Test: atest ApplicationExemptionsTest
Change-Id: I1271db694af4091ead951d0167edac55ace92f47
unless it has the privileged permission KILL_ALL_BACKGROUND_PROCESSES.
Bug: 239423414
Test: atest CtsAppTestCases:ActivityManagerTest
Change-Id: I35d20539ffac055a6d61260445620f45584bd9c5
In updatePermissionFlags, we're calling clearCallingIdentity. And,
just after doing so, we're calling
enforceCallingOrSelfPermission(ADJUST_RUNTIME_PERMISSIONS_POLICY).
But, these two things don't really make sense together, because the
former nullifies the latter.
We could either:
1. Remove clearCallingIdentity but keep enforceCallingOrSelfPermission,
or
2. Remove both
For security, this CL goes with the first option. But, doing so means
updatePermissionFlags now enforces ADJUST_RUNTIME_PERMISSIONS_POLICY.
And this breaks some CTS tests. To address this, we have to add
ADJUST_RUNTIME_PERMISSIONS_POLICY to the shell identity.
Bug: 190694761
Test: atest ActivityPermissionRationaleTest
Change-Id: I7031aebf69d9ec919334573b99eb6b7cb8be31d0
Grant FULL_ACCESS_CELL_BROADCAST_HISTORY permissions to the shell identity for use within CellBroadcast MTS tests.
Bug: 236217191
Bug: 227422973
Test: atest com.android.cellbroadcastreceiver.compliancetests.CellBroadcastConfigTest
Change-Id: Ief5a4c168968b4dc8c9cf7cc071618d41c23d220
This API can be used from calls outside applications to create a virtual
display for mirroring. The permission checks in system server are still
in place so the caller must have CAPTURE_VIDEO_OUTPUT permission. This
class is intented to be used by systems that to stream device content,
but not from an application. In most cases, this will be called from
Shell or a system application.
Test: MediaProjectGlobalTest
Bug: 237664947
Change-Id: I43f79c83db7c82c0b682ef174fb1a5ab83795489
The API will be available in CTS so that we can use it directly instead
of calling it from other system components.
Bug: 240602359
Test: Build & call the API from CTS
Change-Id: I8aa6ee85adb62cda67479c7213d2bc022acd0eec
IInputMethodManager#isInputMethodPickerShownForTest() was introduced
in Android P (API 28) to verify IME picker visibility in CTS [1].
To make it clear that that IPC method must be available only for
special testing purpose, this CL introduces an @hide permission
android.permission.TEST_INPUT_METHOD
and requires it in
InputMethodManagerService#isInputMethodPickerShownForTest().
This CL grants that permission to the shell process hence CTS tests
can still access to the corresponding test API by using
UiAutomation#adoptShellPermissionIdentity().
[1]: I4e21625c32a0ca1abc740229efb3c7fcd97141cc
eb5706183f
Bug: 237317525
Test: atest CtsInputMethodTestCases
Test: Manually verified as follows.
1. adb logcat -b events | grep 237317525
2. atest CtsInputMethodTestCases:InputMethodManagerTest#testIsInputMethodPickerShownProtection
Ignore-AOSP-First: For a security fix
Change-Id: Ie79a3e9d41ce22605ae083594d639c37d08b7def
Add a Y2038 check into the time_detector and add infrastructure to allow
command-line testing to confirm it works.
This is before removing a Y2038 check from NITZ parsing code in the
telephony process. After this change, Androdi will consistently block
>= Y2038 suggestions, not just time signals that come in via telephony.
The initial checks attempt to limit the restriction to devices with
32-bit ABIs, since the main issue we're aware of is that time_t is a
32-bit signed int under bionic, hence there could be issues with that
type in 32-bit processes on 32-bit / mixed 32/64-bit devices.
Bug: 204193177
Test: adb shell cmd time_detector suggest_network_time --reference_time 2480587 --unix_epoch_time 1646473966056
Test: Run with 32-bit + 64-bit only builds, inspect adb shell dumpsys time_detector
Merged-In: Ib9d6472f5ca7a62d59b3224f1845846f99a0b52d
Change-Id: Ib9d6472f5ca7a62d59b3224f1845846f99a0b52d
Add a Y2038 check into the time_detector and add infrastructure to allow
command-line testing to confirm it works.
This is before removing a Y2038 check from NITZ parsing code in the
telephony process. After this change, Androdi will consistently block
>= Y2038 suggestions, not just time signals that come in via telephony.
The initial checks attempt to limit the restriction to devices with
32-bit ABIs, since the main issue we're aware of is that time_t is a
32-bit signed int under bionic, hence there could be issues with that
type in 32-bit processes on 32-bit / mixed 32/64-bit devices.
Bug: 204193177
Test: adb shell cmd time_detector suggest_network_time --reference_time 2480587 --unix_epoch_time 1646473966056
Test: Run with 32-bit + 64-bit only builds, inspect adb shell dumpsys time_detector
Ignore-AOSP-First: The change will be cherry-picked upstream
Change-Id: Ib9d6472f5ca7a62d59b3224f1845846f99a0b52d
The permission allows a package to create a protected VM with custom
config. It's used by MicrodroidHostTestCases.
Bug: 207769805
Test: atest MicrodroidHostTestCases
Change-Id: If049d26c0ef97695098979c4a36fe1f7f607af5a
This permission will eventually replace the sepolicy that we have now,
making it possible to test unique id attestation, which is no longer
possible due to the deprecation of shared uids.
Skipping automerger because the framework manifest has diverged too
much across aosp and tm-dev to allow for clean auto merges, and
presubmits block.
Test: KeyAttestationTest
Bug: 216778747
Ignore-AOSP-First: "do not merge" blocked automerging -- pick to master
Merged-In: Iecde35b9a79456b293118d8089dd2a3b0905f5f3
Change-Id: Iecde35b9a79456b293118d8089dd2a3b0905f5f3
Bug: 217224856
Test: atest android.devicepolicy.cts.NearbyAppStreamingPolicyTest && atest android.devicepolicy.cts.NearbyNotificationStreamingPolicyTest
Ignore-AOSP-First: This new permission is part of a T-targeting feature
Change-Id: I303549d4f9fcf639da3d4981a8887c3ba55434fc
This permission will eventually replace the sepolicy that we have now,
making it possible to test unique id attestation, which is no longer
possible due to the deprecation of shared uids.
Skipping automerger because the framework manifest has diverged too
much across aosp and tm-dev to allow for clean auto merges, and
presubmits block.
Test: KeyAttestationTest
Bug: 216778747
Merged-In: Iecde35b9a79456b293118d8089dd2a3b0905f5f3
Change-Id: Iecde35b9a79456b293118d8089dd2a3b0905f5f3
Add ACCESS_FPS_COUNTER to Shell in order to run CTS properly.
Ignore-AOSP-First: permission doesn't exist in AOSP yet.
Bug: b/220029298
Test: atest TaskFpsCallbackCtsTest
Test: atest TaskFpsCallbackCtsTest --instant
Change-Id: Ica37bafff368f4a0027f9549de6a31ce3254c986
Add android.permission.SUGGEST_TELEPHONY_TIME_AND_ZONE to the shell
process to enable command-line injection of time zone suggestions to the
time_zone_detector service.
Shell already has permissions like SET_TIME_ZONE that allow the time
zone to be set directly, so this is not a security regression.
Bug: 227337462
Test: adb shell cmd time_zone_detector suggest_telephony_time_zone --slot_index 0 --zone_id Europe/London --quality single --match_type country
Merged-In: I377cab85a1b39ef2887b452d1ffcdc5b00a8d5ab
Change-Id: I377cab85a1b39ef2887b452d1ffcdc5b00a8d5ab
Add android.permission.SUGGEST_TELEPHONY_TIME_AND_ZONE to the shell
process to enable command-line injection of time zone suggestions to the
time_zone_detector service.
Shell already has permissions like SET_TIME_ZONE that allow the time
zone to be set directly, so this is not a security regression.
Bug: 227337462
Test: adb shell cmd time_zone_detector suggest_telephony_time_zone --slot_index 0 --zone_id Europe/London --quality single --match_type country
Ignore-AOSP-First: Merge conflict, AOSP cherry-pick will land after
Change-Id: I377cab85a1b39ef2887b452d1ffcdc5b00a8d5ab
This permission will eventually replace the sepolicy that we have now,
making it possible to test unique id attestation, which is no longer
possible due to the deprecation of shared uids.
Skipping automerger because the framework manifest has diverged too
much across aosp and tm-dev to allow for clean auto merges, and
presubmits block.
Test: KeyAttestationTest
Bug: 216778747
Change-Id: Iecde35b9a79456b293118d8089dd2a3b0905f5f3
Changes:
* Use TRIGGER_LOST_MODE permission to gate the
DevicePolicyManager API sendLostModeLocationUpdate
Bug: 223148704
Test: atest android.devicepolicy.cts.LostModeLocationTest
Change-Id: If15388a377c75b7581c9c2a35b3d9828f78e13fc
Merged-In: If15388a377c75b7581c9c2a35b3d9828f78e13fc
- Expose api via TestApi
- Add ASSOCIATE_INPUT_DEVICE_TO_DISPLAY permission to Shell
- Add port for uinput command
Bug: 215631144
Test: atest CtsInputTestCases
Ignore-AOSP-First: Permission that should be kept internal until T releases
Change-Id: I55f2141aabceb71475f5e7f7d590b2f95e05c5aa