Commit Graph

314 Commits

Author SHA1 Message Date
Suprabh Shukla
502baa4117 Merge "Adding some permissions to Shell to enable testing" 2021-03-31 21:08:54 +00:00
Suprabh Shukla
50c85cbe58 Adding some permissions to Shell to enable testing
Test: Builds, boots.

Bug: 183661625
Change-Id: I983b0d9d7a5ab417e74feae9dadf4d472d277b20
Merged-In: I60e745c4ff32cbf8f8ff8b5d016555a25a065f39
Merged-In: I6adc84856f1fe9c33e0ad8470e7248a20587a1e9
Merged-In: I983b0d9d7a5ab417e74feae9dadf4d472d277b20
2021-03-30 23:47:49 -07:00
kholoud mohamed
cf21de27a8 Create new permission SET_AND_VERIFY_LOCKSCREEN_CREDENTIALS
Created a new permission to allow setting and verifying lock screen
credentials.

Test: N/A
Bug: 182260585
Merged-In: I3cf624f063ba582bc8d3b6aeeb11a46a2ab37636
Change-Id: I3cf624f063ba582bc8d3b6aeeb11a46a2ab37636
2021-03-25 15:15:58 +00:00
kholoud mohamed
b78cc199cd Remove no longer needed QUERY_USERS permission
Bug: 178695365
Test: atest PermissionPolicyTest#platformPermissionPolicyIsUnaltered
Merged-In: I4e050d6ea7df08ba789021fd06e8c4cf8936dfe9
Change-Id: I4e050d6ea7df08ba789021fd06e8c4cf8936dfe9
2021-03-25 10:09:35 +00:00
kholoud mohamed
b071084a3f Create new permission QUERY_AUDIO_STATE
Created a new permission to allow access to device audio
state and granted it to shell.

Test: N/A
Bug: 182260585
Merged-In: If1bfcb1341402717fec74cc704caa7e1eb18fa2e
Change-Id: If1bfcb1341402717fec74cc704caa7e1eb18fa2e
2021-03-24 21:01:50 +00:00
kholoud mohamed
fc40a4a777 created FORCE_DEVICE_POLICY_MANAGER_LOG and CLEAR_FREEZE_PERIOD
Created the following new permissions and granted it to shell:
* FORCE_DEVICE_POLICY_MANAGER_LOG: will be used to expose
DPM#forceNetworkLogs and DPM#forceSecurityLogs as TestAPIs.
* CLEAR_FREEZE_PERIOD: will be used to expose
DPM#clearSystemUpdatePolicyFreezePeriodRecord as a TestAPI.

Bug: 180500227
Test: atest PermissionPolicyTest#platformPermissionPolicyIsUnaltered
Merged-In: I8a2a49aa45704d8991e9cf3689b5259442fb1db3
Change-Id: I8a2a49aa45704d8991e9cf3689b5259442fb1db3
2021-03-24 18:12:31 +00:00
Kevin Han
152e389bae Add MANAGE_APP_HIBERNATION permission
Add permission for app hibernation state manipulation.

Bug: 183058954
Test: run hibernation job and confirm the API works for
PermissionController

(cherrypick of ag/13909632)

Merged-In: Id57ee57f49710d0b8a49a4ec561800db43089f87
Change-Id: Id57ee57f49710d0b8a49a4ec561800db43089f87
2021-03-19 10:37:05 -07:00
Sergey Volnov
aa212a0109 Merge "Allow shell to temporary change speech recognition service" 2021-03-09 15:24:32 +00:00
Nicholas Ambur
85b00aa8f4 Merge "remove BIND_VOICE_INTERACTION perm from shell user" 2021-03-08 17:13:38 +00:00
Nicholas Ambur
b2e65af564 remove BIND_VOICE_INTERACTION perm from shell user
BIND_VOICE_INTERACTION permission was added for GTS test code usage.
The GTS test cases relying on this permission previously have been
refactored to not require the permision any longer.

Bug: 178984748
Test: gts-tradefed run gts -m GtsAssistIntentTestCases
Change-Id: I6811b929d65400af39e17c75c638bc2c1fd9ef7e
2021-03-02 19:41:19 -08:00
Brad Ebinger
29dfa1cd76 Define new permission to perform IMS RCS Reg actions and integrate ACCESS_IMS_SINGLE_REGISTRATION into APIS
Move from MODIFY_PHONE_STATE to ACCESS_IMS_SINGLE_REGISTRATION
as per design doc.

Bug: 149426399
Bug: 173652571
Bug: 168923956
Test: atest CtsTelephonyTestCases
Merged-In: I6d4ae879d9d2b347f6576ea20f9e42454b39936b
Merged-In: Idabfda6853ec2a24544da5253ad0e43c47a6cc69
Change-Id: Ie0e1198c8b9cfa0bab90407c8d35273159f63302
2021-03-02 11:39:02 +08:00
James.cf Lin
8916536822 [RCS UCE] Define a new ACCESS_RCS_USER_CAPABILITY_EXCHANGE permission for associated RCS UCE APIs
Define a new ACCESS_RCS_USER_CAPABILITY_EXCHANGE permission and move from MODIFY_PHONE_STATE to ACCESS_RCS_USER_CAPABILITY_EXCHANGE permission for associated APIs.

Bug: 174861641
Bug: 154764486
Test: atest -c CtsTelephonyTestCases:android.telephony.ims.cts.RcsUceAdapterTest
Merged-In: I863f2e6e1afffce5e8ea103790cf368c59734029
Merged-In: I978161a230ce23e17d3b16cc92c3e82ea1cbb407
Change-Id: I3b524158b81dc4437812e7b57fb3adcd17c02c71
2021-02-25 03:49:24 +08:00
Sergey Volnov
6cbb673dbf Allow shell to temporary change speech recognition service
This is needed to write tests for speech recognition API.

Bug: 177915986
Test: patched and verified on internal master
Change-Id: Ia89584a23ad4c073bf0dea888972faf3fe6d3e76
2021-02-24 00:32:11 +00:00
Kholoud Mohamed
141033c6cc Merge "Add new permission KEEP_UNINSTALLED_PACKAGES" 2021-02-10 21:35:03 +00:00
kholoud mohamed
9b6b3d9445 Add new permission KEEP_UNINSTALLED_PACKAGES
Created a new permission KEEP_UNINSTALLED_PACKAGES and
granted it to shell, this new permission will be used to expose
PM#setKeepUninstalledPackages as a testAPI, this is needed
to enable the new testing infrastructure to reinstall
removed packages between test runs as part of the state resetting.

Bug: 179682115
Test: atest PermissionPolicyTest#platformPermissionPolicyIsUnaltered
Merged-In: I2b262f3694478631d657cdbf088b6511072d4ff3
Change-Id: I2b262f3694478631d657cdbf088b6511072d4ff3
2021-02-10 17:58:50 +00:00
Tianjie
6a0d50dd2e Add shell command to set package
Adds an override to set the resume on reboot service provider. This
is needed to run CTS test with fake implementation. Note we won't
change the implementation provider once the resume on reboot flow
starts.

Bug: 178014912
Test: adb shell cmd lock_settings set-resume-on-reboot-provider-package com.android.cts.encryptionap;
      check the implementation is found correctly

Change-Id: I4ed6d4f25f30b5c3db4e8776f6fe4a0cd1a2793c
2021-02-09 20:24:49 -08:00
Kholoud Mohamed
19b39a8fc3 Grant shell QUERY_USERS and MODIFY_QUIET_MODE
Added a new permission QUERY_USERS, granted the
new permission and MODIFY_USERS to shell.
These permissions are required to enable CTS
tests to access the following APIs:
* UserManager#getUsers and any other API that depend on it
* UserManager#getProfileParent
* UserManager#requestQuietModeEnabled

Test: Confirmed that a CTS test can call these APIs
Bug: 178695365
Merged-In: Ifa14d24ee1873161e3986e8d0669fd47a7bcaa7a
Change-Id: Ifa14d24ee1873161e3986e8d0669fd47a7bcaa7a
2021-02-04 23:03:52 +00:00
Treehugger Robot
193dfa0a19 Merge "add shell user permissions for Asistant GTS tests" 2021-01-30 01:53:58 +00:00
Nicholas Ambur
57969acf86 add shell user permissions for Asistant GTS tests
Bug: 177271291
Test: gts-tradefed run gts -m GtsAssistIntentTestCases
Change-Id: I6c6134a9912a73039556a4d700bbb0bb97b6b3d4
Merged-In: I293d66811f8a27170f2bc4cb74b7d4c9ec55fac8
2021-01-29 16:28:19 -08:00
Etan Cohen
f357a045b3 Revert "Grant shell permissions for Airplane Mode to Shell to support CTS"
This reverts commit ddb4902597.

Change-Id: I7d5433bf676661ede208f840c27a71abbe663195
2021-01-21 19:55:12 -08:00
Etan Cohen
d8d9e9c041 Grant shell permissions for restart WiFi subsystem to Shell to support CTS
New permission is needed to allow CTS to trigger the new WiFi subsystem
restart API.

Bug: 175084231
Bug: 178125790
Test: atest android.net.wifi.cts.WifiManagerTest#testRestartWifiSubsystem
Change-Id: I0eb0362e6421480c10ba64f923a9069d1258d4ca
2021-01-21 19:54:05 -08:00
Treehugger Robot
3a0640daea Merge "Add MANAGE_SENSOR_PRIVACY to shell permissions" 2021-01-15 18:30:12 +00:00
Shashwat Razdan
751ea3c10e Add new MANAGE_SMARTSPACE permission for the cts test
Bug: 176851064
Test: cts test runs only with this CL
Change-Id: I6466bd3871ff3ad0e5178451d18bacf52be0f491
2021-01-14 20:23:00 +00:00
Evan Severson
dc4bf14bf7 Add MANAGE_SENSOR_PRIVACY to shell permissions
Test: test shell commands
Bug: 162549680
Change-Id: I8a56b70c928b7ddd3904c2e9533578b531d81757
Merged-In: I8a56b70c928b7ddd3904c2e9533578b531d81757
2021-01-13 16:32:20 -08:00
Treehugger Robot
945be59043 Merge "Grant shell MANAGE_PROFILE_AND_DEVICE_OWNERS permission" 2021-01-08 12:00:36 +00:00
Quang Luong
c7dfd602ee Merge "Add wifi coex permissions to Shell for CTS tests" 2021-01-06 19:08:24 +00:00
Etan Cohen
ddb4902597 Grant shell permissions for Airplane Mode to Shell to support CTS
New permission is needed to allow CTS to trigger the new WiFi subsystem
restart API.

Bug: 175084231
Test: atest android.net.wifi.cts.WifiManagerTest#testRestartWifiSubsystem
Change-Id: Id844fb799c61f65580e686d1da7ec38a62dd01d0
2021-01-02 22:34:50 -08:00
Quang Luong
7597d0839c Add wifi coex permissions to Shell for CTS tests
Bug: 153651001
Test: CTS tests pass
Change-Id: I7c73bba692ade59731c1881b12f026e3a41891ca
2020-12-18 12:16:17 -08:00
Colin Cross
6601d43a23 Revert "Add coex permissions to Shell for CTS tests"
This reverts commit 9f956ccf41.

Reason for revert: b/175198007

Change-Id: Ie35dca0500734ff35781c7344dcc70953f29d174
2020-12-18 12:10:34 -08:00
Quang Luong
9f956ccf41 Add coex permissions to Shell for CTS tests
Bug: 153651001
Test: CTS tests pass
Change-Id: I697171d98a9c381e609638d926907c49572e0919
2020-12-17 02:53:29 +00:00
Treehugger Robot
63340382e0 Merge "Grant HDMI_CEC permission to Shell" 2020-12-16 14:59:53 +00:00
Kholoud Mohamed
0a11a92c0d Grant shell MANAGE_PROFILE_AND_DEVICE_OWNERS permission
CTS tests will now need to call some provisioning
APIs that require MANAGE_PROFILE_AND_DEVICE_OWNERS,
this was previously avoided because CTS tests were
starting Managed Proviosing using a hacky way
to provision devices, we are now getting rid of this
as it was causing a lot of flakines. This is
part of bigger a plan to improve our testing
infrastructure.

Test: atest android.devicepolicy.cts.DevicePolicyManagerTest
Bug: 175392542
Change-Id: Id2e2f98f1d3785e45d8b94569bf9b30ae8c9f808
2020-12-15 15:50:07 +00:00
Hyunyoung Song
547b770d43 Add new MANAGE_SEARCH_UI permission for the cts test
Bug: 162234997
Test: cts test runs only with this CL
Change-Id: I42b3456fc655851c052115b888617213be629c61
2020-12-14 08:47:37 -08:00
Marvin Ramin
d6c4631862 Grant HDMI_CEC permission to Shell
Needed for HDMI_CEC CTS tests to call HdmiControlManager.

Bug: 169914520
Test: atest CtsHdmiCecHostTestCases with changes to tests
Change-Id: Ia997f3910ab4ca3a149b2cbd3b1d3d7e9f7202f2
Merged-In: Ia997f3910ab4ca3a149b2cbd3b1d3d7e9f7202f2
2020-12-09 17:02:56 +01:00
Nick Moukhine
a06b55ee9e Allow shell to invoke music recognition api
Needed to allow MusicRecognitionManagerTest in cts to exercise the api.

Bug: 158194857
Test: patched and verified on internal master
Change-Id: Ia1b250de28c492c4058c7dd8f6573a0f0a178505
2020-12-07 10:04:32 +01:00
Ioana Stefan
2ad02a383b Add permission for protecting UI tracing
The new permission will protect the UI traces, allowing only wanted
development tools to start the tracing. At the moment, the permission is
planned to be used for WindowManager and InputMethod traces.

Bug: 172444310
Test: N/A
Change-Id: Ibdeb38dc9a066cb8ed2904adcdac29014b166526
2020-11-19 11:59:50 +00:00
Neil Fuller
770f5ab2db Add a new permission in AOSP
This adds a new permission in AOSP, so it can be referenced by the Shell
command, which presubmit suggests has to be maintained in AOSP.

Bug: 159891384
Test: build only
Exempt-From-Owner-Approval: jsharkey@ approved but it appears to have reset...?
Change-Id: Ic7d403e20731e9d6bd82d5b2e2758cc61989cc59
2020-09-30 08:39:25 +00:00
Marin Shalamanov
8f2f6d1465 Add permission to override display mode requests
This permission will be used for testing purposes
to override the display mode requests in DisplayModeDirector.

Bug: 159113268
Bug: 158316271
Test: m
Change-Id: Ibcafc50badcda929c3c3b446b6d0d9045c2a5b6d
Merged-In: I257636ae2a6ed74044e71e49a99024682c3a92c5
2020-09-21 14:04:48 +02:00
Sergey Nikolaienkov
ec82033d3e Merge "Add GET_INTENT_SENDER_INTENT permission to Shell" am: 104d2f92b3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1385856

Change-Id: Ice3e441cc9c0df8d0a6acc016bb74375e081bd67
2020-09-09 07:23:52 +00:00
Xin Li
628590d7ec Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
Nikolas Havrikov
0179047fef Add GET_INTENT_SENDER_INTENT permission to Shell
This is needed for a CTS test for picture-in-picture on TV.

As per go/privapp-permission:
1. This is the exact permission that guards specifically the
`PendingIntent::getIntent` method which is used in the test.

2. Two alternatives were considered:
a) Create another permisison and `@hide` it. However, this offers no
security benefit at the cost of maintenance overhead.
b) Do not create the test in the first place.

Bug: 153435517
Test: atest CtsSystemUiTestCases:PipNotificationTests
Change-Id: I04a5c82334a676351828fb82f2ac5886c888a0bc
2020-08-17 09:51:26 +00:00
Treehugger Robot
a5a04bbb4e Merge "Adding LOADER_USAGE_STATS permission to shell" 2020-07-23 22:45:36 +00:00
Nikolas Havrikov
74941c20ed Make Shell require permission for a new CTS test
The permission RESET_APP_ERRORS is required for UnsupportedErrorDialogTests

Bug: 159443507
Test: built locally
Change-Id: I4d110278eb48799caf29f0582536a4dca10f10c1
2020-07-08 12:09:27 +00:00
Joshua Duong
b47d1e6100 Merge changes from topic "adbwifi-cts" into rvc-dev am: 5ab3aa0c7b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12000446

Change-Id: I27c6493f075ace2e9c12f9b7f359f42ccbb1406f
2020-06-30 00:57:37 +00:00
Joshua Duong
f2e03b393f Add shell permissions for CTS test (AdbManagerTest).
Bug: 159936209

Test: atest CtsAdbManagerTests
Change-Id: I896b53df582cceb7d1b0d6694d00064b0fb57b94
2020-06-25 15:03:19 -07:00
Nathan Harold
c1197612dd Merge "Allow Background Location Access for Shell" into rvc-dev am: 811cf5d8f5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11914608

Change-Id: Ic22846e6f3337b2ebe7a6448829616a8a29056b3
2020-06-19 19:05:29 +00:00
Nathan Harold
1242fac1ae Allow Background Location Access for Shell
The shell has COARSE and FINE permission, but it
needs background access to support CTS test cases
that must be run with elevated permissions from
the shell.

Bug: 159236070
Test: atest PhoneStateListenerTest#testBarringInfo

Merged-In: Iba3fcb3a43c5df3c30dadf6b7733eaee03d1d0e3
Change-Id: Iba3fcb3a43c5df3c30dadf6b7733eaee03d1d0e3
(cherry picked from commit 89796d4936)
2020-06-19 09:09:37 -07:00
Nathan Harold
89796d4936 Allow Background Location Access for Shell
The shell has COARSE and FINE permission, but it
needs background access to support CTS test cases
that must be run with elevated permissions from
the shell.

Bug: 159236070
Test: atest PhoneStateListenerTest#testBarringInfo

Change-Id: Iba3fcb3a43c5df3c30dadf6b7733eaee03d1d0e3
2020-06-19 09:03:29 -07:00
Dimuthu Gamage
daa941fab0 Adding LOADER_USAGE_STATS permission to shell
This is expected to be used with adoptShellPermission in the Incremental CTS tests.

Test: atest android.content.pm.cts.PackageManagerShellCommandTest
(There will be future tests relying on this)

Bug: 158024822
Change-Id: I4f146337429679edddba698aa88bb9b2cb883ab9
Merged-In: I4f146337429679edddba698aa88bb9b2cb883ab9
2020-06-08 14:16:23 -07:00
Xin Li
d7785982ac Merge "Merge QQ3A.200605.002 into master" 2020-06-06 01:41:11 +00:00