Home
last modified time | relevance | path

Searched refs:role (Results 1 – 25 of 52) sorted by relevance

123

/cts/tests/tests/companion/common/src/android/companion/cts/common/
DAppHelper.kt29 fun associate(macAddress: MacAddress, role: String = "") = in associate()
30 runShellCommand("cmd companiondevice associate $userId $packageName $macAddress $role") in associate()
48 fun isRoleHolder(role: String) = in uninstall()
49 runShellCommand("cmd role get-role-holders --user $userId $role").contains(packageName) in uninstall()
51 fun addToHoldersOfRole(role: String) = in uninstall()
52 runShellCommand("cmd role add-role-holder --user $userId $role $packageName") in uninstall()
54 fun removeFromHoldersOfRole(role: String) = in uninstall()
55 runShellCommand("cmd role remove-role-holder --user $userId $role $packageName") in uninstall()
57 fun withRole(role: String, block: () -> Unit) { in uninstall()
58 addToHoldersOfRole(role) in uninstall()
[all …]
/cts/tests/tests/companion/core/src/android/companion/cts/core/
DDeviceProfilesTest.kt4 import android.app.role.RoleManager.ROLE_ASSISTANT in <lambda>()
5 import android.app.role.RoleManager.ROLE_BROWSER in <lambda>()
6 import android.app.role.RoleManager.ROLE_CALL_REDIRECTION in <lambda>()
7 import android.app.role.RoleManager.ROLE_CALL_SCREENING in <lambda>()
8 import android.app.role.RoleManager.ROLE_DIALER in <lambda>()
9 import android.app.role.RoleManager.ROLE_EMERGENCY in <lambda>()
10 import android.app.role.RoleManager.ROLE_HOME in <lambda>()
11 import android.app.role.RoleManager.ROLE_SMS in <lambda>()
12 import android.app.role.RoleManager.ROLE_SYSTEM_SUPERVISION in <lambda>()
13 import android.app.role.RoleManager.ROLE_SYSTEM_WELLBEING in <lambda>()
DBackupAndRestoreTest.kt228 fun assertRoleGrantedToApp(app: AppHelper, role: String) = in <lambda>()
233 app.isRoleHolder(role) in <lambda>()
237 fun assertRoleRevokedFromApp(app: AppHelper, role: String) = in <lambda>()
242 !app.isRoleHolder(role) in <lambda>()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/roles/
DRoles.java19 import static android.app.role.RoleManager.ROLE_BROWSER;
27 import android.app.role.RoleManager;
75 public Set<String> getRoleHolders(String role) { in getRoleHolders() argument
78 return new HashSet<>(sContext.getSystemService(RoleManager.class).getRoleHolders(role)); in getRoleHolders()
86 public Set<String> getRoleHoldersAsUser(UserReference user, String role) { in getRoleHoldersAsUser() argument
90 sContext.getSystemService(RoleManager.class).getRoleHoldersAsUser(role, in getRoleHoldersAsUser()
DRoleContext.java39 public RoleContext(String role, Package pkg, UserReference user) { in RoleContext() argument
40 mRole = role; in RoleContext()
43 mPreviousRoleHolders = TestApis.roles().getRoleHoldersAsUser(user, role); in RoleContext()
/cts/tests/tests/telecom/src/android/telecom/cts/
DCtsRoleManagerAdapter.java28 import android.app.role.RoleManager;
66 public void setRoleHolder(String role, String packageName) throws Exception { in setRoleHolder() argument
68 addRoleHolder(role, packageName); in setRoleHolder()
87 public void removeRoleHolder(String role, String packageName) throws Exception { in removeRoleHolder() argument
89 removeRoleHolderInternal(role, packageName); in removeRoleHolder()
DMissedCallTest.java19 import android.app.role.RoleManager;
DThirdPartyInCallServiceTest.java22 import android.app.role.RoleManager;
DNullBindingCallScreeningServiceTest.java23 import android.app.role.RoleManager;
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/packages/
DPackage.java46 import android.app.role.RoleManager;
1001 public RoleContext setAsRoleHolder(String role) { in setAsRoleHolder() argument
1002 return setAsRoleHolder(role, TestApis.users().instrumented()); in setAsRoleHolder()
1010 public RoleContext setAsRoleHolder(String role, UserReference user) { in setAsRoleHolder() argument
1019 role, in setAsRoleHolder()
1028 fail("Could not set role holder of " + role + "." + " Relevant logcat: " in setAsRoleHolder()
1029 … + TestApis.logcat().dump((line) -> line.contains(role) || line.contains("Role"))); in setAsRoleHolder()
1031 if (!TestApis.roles().getRoleHoldersAsUser(user, role).contains(packageName())) { in setAsRoleHolder()
1034 (line) -> line.contains(role) || line.contains("Role"))); in setAsRoleHolder()
1054 return new RoleContext(role, this, user); in setAsRoleHolder()
[all …]
/cts/tests/devicepolicy/src/android/devicepolicy/cts/
DCheckFinancedTest.java21 import static android.app.role.RoleManager.MANAGE_HOLDERS_FLAG_DONT_KILL_APP;
22 import static android.app.role.RoleManager.ROLE_FINANCED_DEVICE_KIOSK;
34 import android.app.role.RoleManager;
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/
DAudioNotificationsBaseActivity.java69 protected AudioNotificationsBaseActivity(int role) { in AudioNotificationsBaseActivity() argument
70 mRole = role; in AudioNotificationsBaseActivity()
/cts/tests/tests/companion/uiautomation/src/android/companion/cts/uiautomation/
DAssociationRevokedTestBase.kt21 import android.app.role.RoleManager
/cts/tests/tests/telecom/CallStreamingServiceTestApp/
DAndroid.bp17 // package name, and so that when we revoke the call streaming role it can be cleaned up without
/cts/tests/tests/telecom-apps/Utils/
DAndroid.bp17 // package name, and so that when we revoke the call streaming role it can be cleaned up without
/cts/hostsidetests/appsecurity/test-apps/RoleSecurityTestApp/src/com/android/cts/rolesecuritytest/
DDeviceTest.java24 import android.app.role.RoleManager;
/cts/tests/app/FgsTest/src/android/app/cts/fgstest/
DActivityManagerForegroundServiceTypeTest.java35 import android.app.role.RoleManager;
616 for (String role: roles) { in grantPermissions()
618 + " " + role + " " + packageName); in grantPermissions()
643 for (String role: roles) { in resetPermissions()
645 + UserHandle.myUserId() + " " + role + " " + packageName); in resetPermissions()
/cts/tests/tests/nfc/src/android/nfc/cts/
DWalletRoleTestUtils.java25 import android.app.role.OnRoleHoldersChangedListener;
26 import android.app.role.RoleManager;
/cts/apps/CtsVerifier/src/com/android/cts/verifier/voicemail/
DDefaultDialerChanger.java20 import android.app.role.RoleManager;
/cts/tests/tests/activityrecognition/src/android/activityrecognition/cts/
DActivityRecognizerAttributionTags.kt22 import android.app.role.RoleManager
/cts/tests/tests/security/src/android/security/cts/
DRolePermissionOverrideTest.kt19 import android.app.role.RoleManager
/cts/tests/tests/telephony/current/src/android/telephony/cts/util/
DDefaultSmsAppHelper.java24 import android.app.role.RoleManager;
/cts/tests/tests/voiceinteraction/src/android/voiceinteraction/cts/
DVoiceInteractionRoleTest.java24 import android.app.role.RoleManager;
/cts/apps/CtsVerifier/src/com/android/cts/verifier/telecom/
DTelecomDefaultDialerTestActivity.java21 import android.app.role.RoleManager;
/cts/tests/tests/virtualdevice/common/src/android/virtualdevice/cts/common/
DFakeAssociationRule.java31 import android.app.role.RoleManager;

123