Commit Graph

357 Commits

Author SHA1 Message Date
Joanne Chung
7e3f7d1061 Merge "Add shell commands and dump information for Translation" into sc-dev 2021-03-02 11:39:07 +00:00
Joanne Chung
3a907ab1eb Add shell commands and dump information for Translation
1. Add shell command to allow a temporary override of the
TranslationService that helps e2e CTS tests.
2. Add permission to allow the shell call the UiTranslationManager
APIs for the tests.
3. Dump translation systemservice and activity translation related
information to help debugging

We don't want to leak translation feature now, so we submit the
change about Shell in internal branch.

Bug: 179047265
Test: manual.
1. Switch to temp TranslationService by "adb shell cmd transformer set
<myTranslationService> 12000" and make sure only the same app can
access the APIs when switching to the temp service.
2. adb shell dumpsys transformer
3. adb shell dumpsys activity <myactivity> --translation
(We set "transformer" now to prevent feature leak, the final value is
translation)

Change-Id: I2573b7ea226bd805a951f8346d5370d9c9776364
2021-02-26 11:13:39 +00:00
Alex Buynytskyy
a1ec6ad5e2 Merge "Remove INSTALLER_V2 permission since the API is finalized in S." into sc-dev 2021-02-26 09:50:23 +00:00
Alex Buynytskyy
28d0b7b712 Remove INSTALLER_V2 permission since the API is finalized in S.
Bug: 152310230
Fixes: 152310230
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I624eb44a455ba65f156064c57787af5903567d96
2021-02-25 19:50:42 -08:00
Evan Severson
445abca30e Merge "Expose SensorPrivacy as SystemApi" into sc-dev 2021-02-25 18:29:43 +00:00
Kholoud Mohamed
9657d5d777 Merge "created FORCE_DEVICE_POLICY_MANAGER_LOG and CLEAR_FREEZE_PERIOD" into sc-dev 2021-02-25 10:22:38 +00:00
Evan Severson
0f9d5aea50 Expose SensorPrivacy as SystemApi
Rename the apis to be more consistent.
Also expose to test api.
Have the aosp mark that it supports the toggle features by default.

Test: atest CtsSensorPrivacyTestCases
Bug: 162549680

Change-Id: Ib38c16adfc5cec931347e1a1891618983d78248b
2021-02-24 15:39:19 -08:00
kholoud mohamed
5e7b121444 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
Change-Id: I8a2a49aa45704d8991e9cf3689b5259442fb1db3
2021-02-24 10:49:35 +00:00
Alex Buynytskyy
1d7d40e90c Add a new permission to allow usage of system dataloaders.
Shell delegation only delegates permissions/appops.
Need to add the permission instead of checking UIDs.

Bug: 168508924
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: If31980b698cdfef251ffdca400d641a79948019f
Merged-In: If31980b698cdfef251ffdca400d641a79948019f
2021-02-23 00:51:17 +00:00
Brad Ebinger
57cc71204f Merge "Define new ACCESS_RCS_USER_CAPABILITY_EXCHANGE permission" into sc-dev 2021-02-17 18:49:36 +00:00
Flavio Fiszman
d243c60e63 Creates PeopleManager API isConversation
Change-Id: I075cd72363ba0ea0e84bb57fe017fce20e051862
Test: atest DataManagerTest
Bug: 180122164
2021-02-17 10:51:12 +00:00
Brad Ebinger
215c5e9115 Define new ACCESS_RCS_USER_CAPABILITY_EXCHANGE permission
Defines a new ACCESS_RCS_USER_CAPABILITY_EXCHANGE permission and
integrate it into role manager to be granted to system apps
holding the SMS, Dialer, and (newly defined) contacts role.

Adds permissions to new shell role for CTS testing.

Bug: 174861641
Bug: 154764486
Test: set TestRcsApp as each role and ensure the permission is granted
Change-Id: I863f2e6e1afffce5e8ea103790cf368c59734029
2021-02-17 02:23:38 +00:00
Kweku Adams
9f730a8307 Introduce BATTERY_PREDICTION permission.
DEVICE_POWER is very powerful, so introduce the BATTERY_PREDICTION
permission to allow privileged apps with the permission to provide the
system with battery predictions.

Bug: 139413884
Test: atest android.os.cts.PowerManagerTest
Test: atest android.permission.cts.PowerManagerServicePermissionTest
Test: atest CtsPermission2TestCases
Test: atest SettingsProviderTest
Change-Id: Ib52f20b5145785a5fc363601757ad9c57f40e254
2021-02-16 09:09:08 -08:00
Gavin Corkery
946dfb5e81 Merge "Add SIGNAL_REBOOT_READINESS permission" into sc-dev 2021-02-15 08:30:27 +00:00
Gavin Corkery
7e1cd22f57 Add SIGNAL_REBOOT_READINESS permission
Adds a new permission (privileged or signature) which will
allow the holder to register callbacks with the
RebootReadinessManager. Also grants this permission to the
shell for testing purposes.

Test: atest CtsRebootReadinessTestCases
Bug: 161353402
Change-Id: Ide2ec7a0c2b905b4986031f2b6448182b45bb07a
2021-02-11 21:58:39 +00:00
Tianjie Xu
d75fa5ca59 Merge "Add shell command to set package" am: 11b13adfb7 am: 44593bf4ac am: a3f211f409
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1560109

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie583803f257ba68fea5fa9abeaccf8a0484280ae
2021-02-10 23:12:54 +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
5d1a7b1464 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
Change-Id: I2b262f3694478631d657cdbf088b6511072d4ff3
2021-02-09 11:45:08 +00: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
Kholoud Mohamed
c60281bd21 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
Change-Id: Ifa14d24ee1873161e3986e8d0669fd47a7bcaa7a
2021-02-04 20:43:19 +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
d8a9174f85 Merge "Revert "Grant shell permissions for Airplane Mode to Shell to support CTS"" am: ec8ebce98e am: af364469e5 am: 59f5bcf834
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556331

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6752b057e8fd540a88b494a5c5e86a5902b8b147
2021-01-29 23:39:48 +00:00
Etan Cohen
258ae119c9 Merge changes I0eb0362e,Iec9b579d am: 6c0e8ad627 am: 1e9a56a83f am: 59b4925437
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556330

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4ed7e75d5d51ddb7d3f18917eedddc292d83cf5f
2021-01-28 06:49:16 +00:00
Nicholas Ambur
8308b4026a add shell user permissions for Asistant GTS tests
Bug: 177271291
Test: gts-tradefed run gts -m GtsAssistIntentTestCases
Change-Id: I293d66811f8a27170f2bc4cb74b7d4c9ec55fac8
2021-01-25 12:20:10 -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
Hall Liu
bf1c45fea5 Merge "Add new columns in CallLog" 2021-01-20 18:32:26 +00:00
Hall Liu
6b7885f153 Add new columns in CallLog
Add new column definitions in the call log db to support storing the new
call composer elements in the call log. Also refactor addCall to use a
builder pattern, and add READ_VOICEMAIL for shell in order to support
new CTS tests

Test: atest CallLogTest
Bug: 174798736
Change-Id: I00e127510c382d9ff0ffc70f4c5ad7179ac7319a
2021-01-19 16:06:13 -08:00
Alex Johnston
f273e8e318 Merge "Add KeyChain Test API for the credential manager" 2021-01-18 13:48:31 +00:00
Treehugger Robot
3a0640daea Merge "Add MANAGE_SENSOR_PRIVACY to shell permissions" 2021-01-15 18:30:12 +00:00
Treehugger Robot
b8decb4c2b Merge "Add new MANAGE_SMARTSPACE permission for the cts test" am: 7bba23015b am: 59962122dc am: cbef06bb5a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1549366

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4fcc63fe7779567049f0d9d0de6ad652533023c0
2021-01-15 14:05:17 +00:00
TreeHugger Robot
b62a9139ab Merge changes I8a56b70c,I0f159034
* changes:
  Add MANAGE_SENSOR_PRIVACY to shell permissions
  Make the sensor privacy calls testable
2021-01-15 02:03:04 +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
Linus Tufvesson
8e713dbd58 Merge "Add SYSTEM_APPLICATION_OVERLAY" 2021-01-14 14:59:43 +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
Evan Severson
9340d25cbb Add MANAGE_SENSOR_PRIVACY to shell permissions
Test: test shell commands
Bug: 162549680
Change-Id: I8a56b70c928b7ddd3904c2e9533578b531d81757
2021-01-13 16:28:16 -08:00
Alex Johnston
ad53ef61e7 Add KeyChain Test API for the credential manager
* Add setCredentialManagementApp and
  removeCredentialManagementApp
  to KeyChain
* Add permission to manage credential
  management app, which is to be used in
  CTS tests

Bug: 165641221
Test: atest android.devicepolicy.cts.CredentialManagementAppTest
Change-Id: I8487ebc13758a31639d55c8e380faa51d1cfd843
2021-01-12 14:26:56 +00:00
Linus Tufvesson
68e0831b03 Add SYSTEM_APPLICATION_OVERLAY
.. which allows the holder to create privileged application overlays
that won't be hidden by Window#hideOverlayWindows

Bug: 159616727
Bug: 171177581
Test: atest CtsWindowManagerDeviceTestCases:HideOverlayWindowsTest
Change-Id: I1a8c08047ca51b12067fa68bea61843013940643
2021-01-12 12:57:33 +00:00
Jan Tomljanovic
db3a0b4926 Merge "Switch to controling if toast rate limiting is enabled using TestApi." 2021-01-11 18:00:51 +00:00
Jan Tomljanovic
5bf3a60eff Switch to controling if toast rate limiting is enabled using TestApi.
We tried to use compat changeid to turn rate limiting on/off in CTS
tests but it doesn't work on user builds (see bug). We're therefore
migrating to using a new TestApi guarded by a new permission that we
give to the shell.

Test: atest android.widget.cts.ToastTest
Bug: 175720818
Change-Id: I2ef147ed6449333fc6b4273eca82bce533cb13f3
2021-01-08 17:11:24 +00:00
Treehugger Robot
db7bdef41a Merge "Grant shell MANAGE_PROFILE_AND_DEVICE_OWNERS permission" am: 945be59043 am: e88250ddfa am: 639e6eb5cf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1530318

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I11214c97d046087e37129585f71d147e41a7b70e
2021-01-08 13:25:39 +00:00
Treehugger Robot
945be59043 Merge "Grant shell MANAGE_PROFILE_AND_DEVICE_OWNERS permission" 2021-01-08 12:00:36 +00:00
Quang Luong
f4b607ca69 Merge "Add wifi coex permissions to Shell for CTS tests" am: c7dfd602ee am: 50b86c5fb3 am: 21b3306247
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1532972

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I65d6ea9dde2429efc8a8ba1eb90a3a7a36c80bee
2021-01-06 20:17:32 +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
f3c551f4a4 Merge "Grant shell permissions for Airplane Mode to Shell to support CTS" am: a8cc70b502 am: d1d3e03659 am: c031e12c7f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1539421

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2a31950f7409d3a907448b05d334f5888fc06cc5
2021-01-05 21:09:27 +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
Colin Cross
4066f26d74 Merge "Revert "Add coex permissions to Shell for CTS tests"" am: ac69caae77 am: e73004ddb9 am: ccc092b06b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1532968

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icc2f83ac2796247b07f187b0fc011da8dcbc5a99
2020-12-22 06:56:09 +00:00
Quang Luong
479e4e3d19 Merge "Add coex permissions to Shell for CTS tests" am: 14185f3b8e am: c9939ba64f am: e4d04f1222
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1529258

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9ae216af8e36b66549b368ee18536e6cfa763e4d
2020-12-22 06:50:33 +00: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