/cts/tests/tests/notification/src/android/app/notification/current/cts/ |
D | ZenPolicyTest.java | 53 ZenPolicy policy = builder.build(); in testWriteToParcel() local 56 policy.writeToParcel(parcel, 0); in testWriteToParcel() 60 assertEquals(policy, policyFromParcel); in testWriteToParcel() 66 ZenPolicy policy = builder.allowAlarms(true).build(); in testAlarms() local 67 assertEquals(ZenPolicy.STATE_ALLOW, policy.getPriorityCategoryAlarms()); in testAlarms() 68 assertAllPriorityCategoriesUnsetExcept(policy, in testAlarms() 70 assertAllVisualEffectsUnset(policy); in testAlarms() 72 policy = builder.allowAlarms(false).build(); in testAlarms() 73 assertEquals(ZenPolicy.STATE_DISALLOW, policy.getPriorityCategoryAlarms()); in testAlarms() 74 assertAllPriorityCategoriesUnsetExcept(policy, in testAlarms() [all …]
|
/cts/hostsidetests/security/src/android/security/cts/ |
D | SELinuxNeverallowRulesParserTest.java | 35 String policy = "allow s t:c p;"; in testParsingEmpty() local 36 List<SELinuxNeverallowRule> rules = SELinuxNeverallowRule.parsePolicy(policy); in testParsingEmpty() 42 String policy = "# A comment, no big deal\n" in testParsingWithoutConditions() local 45 List<SELinuxNeverallowRule> rules = SELinuxNeverallowRule.parsePolicy(policy); in testParsingWithoutConditions() 61 String policy = "# A comment\n" in testParsingMultiNeverallowOnOneLine() local 63 List<SELinuxNeverallowRule> rules = SELinuxNeverallowRule.parsePolicy(policy); in testParsingMultiNeverallowOnOneLine() 69 String policy = "# A comment\n" in testParsingMultiLinesNeverallow() local 77 List<SELinuxNeverallowRule> rules = SELinuxNeverallowRule.parsePolicy(policy); in testParsingMultiLinesNeverallow() 84 String policy = "# BEGIN_TREBLE_ONLY\n" in testParsingWithConditions() local 88 List<SELinuxNeverallowRule> rules = SELinuxNeverallowRule.parsePolicy(policy); in testParsingWithConditions() [all …]
|
/cts/hostsidetests/car/app/src/android/car/cts/app/ |
D | PowerPolicyListenerImpl.java | 41 public void onPolicyChanged(CarPowerPolicy policy) { in onPolicyChanged() argument 43 if (policy == null) { in onPolicyChanged() 46 mCurrentPolicy = policy; in onPolicyChanged() 48 mTestClient.printlnResult(getPolicyString(policy)); in onPolicyChanged() 60 public static String getPolicyString(CarPowerPolicy policy) { in getPolicyString() argument 61 String[] enables = Arrays.stream(policy.getEnabledComponents()) in getPolicyString() 63 String[] disables = Arrays.stream(policy.getDisabledComponents()) in getPolicyString() 67 policyStr.append(policy.getPolicyId()).append(" (enabledComponents: "); in getPolicyString()
|
/cts/tests/devicepolicy/src/android/devicepolicy/cts/ |
D | NoAdminLeakingTest.java | 66 @CanSetPolicyTest(policy = LockscreenPolicyWithUnifiedChallenge.class) 74 @CanSetPolicyTest(policy = LockscreenPolicyWithUnifiedChallenge.class) 82 @CanSetPolicyTest(policy = LockscreenPolicyWithUnifiedChallenge.class) 90 @CanSetPolicyTest(policy = LockscreenPolicyWithUnifiedChallenge.class) 98 @CanSetPolicyTest(policy = LockscreenPolicyWithUnifiedChallenge.class) 107 @CanSetPolicyTest(policy = LockscreenPolicyWithUnifiedChallenge.class) 114 @CanSetPolicyTest(policy = LockscreenPolicyWithUnifiedChallenge.class) 122 @CanSetPolicyTest(policy = LockscreenPolicyWithUnifiedChallenge.class) 130 @CanSetPolicyTest(policy = LockscreenPolicyWithUnifiedChallenge.class) 138 @CanSetPolicyTest(policy = LockscreenPolicyWithUnifiedChallenge.class) [all …]
|
D | SupportMessageTest.java | 82 @PolicyAppliesTest(policy = SupportMessage.class) 91 @PolicyAppliesTest(policy = SupportMessage.class) 100 @PolicyAppliesTest(policy = SupportMessage.class) 109 @PolicyAppliesTest(policy = SupportMessage.class) 119 @PolicyAppliesTest(policy = SupportMessage.class) 129 @PolicyAppliesTest(policy = SupportMessage.class) 137 @PolicyAppliesTest(policy = SupportMessage.class) 145 @PolicyAppliesTest(policy = SupportMessage.class) 153 @PolicyAppliesTest(policy = SupportMessage.class) 161 @PolicyAppliesTest(policy = SupportMessage.class) [all …]
|
D | WifiSsidRestrictionTest.java | 61 @CanSetPolicyTest(policy = WifiSsidRestriction.class) 69 WifiSsidPolicy policy = new WifiSsidPolicy( in setWifiSsidPolicy_validAllowlist_works() local 72 mDevicePolicyManager.setWifiSsidPolicy(policy); in setWifiSsidPolicy_validAllowlist_works() 83 @CanSetPolicyTest(policy = WifiSsidRestriction.class) 91 WifiSsidPolicy policy = new WifiSsidPolicy( in setWifiSsidPolicy_validDenylist_works() local 94 mDevicePolicyManager.setWifiSsidPolicy(policy); in setWifiSsidPolicy_validDenylist_works() 104 @CanSetPolicyTest(policy = WifiSsidRestriction.class) 110 WifiSsidPolicy policy = new WifiSsidPolicy( in setWifiSsidPolicy_validRemoveRestriction_works() local 113 mDevicePolicyManager.setWifiSsidPolicy(policy); in setWifiSsidPolicy_validRemoveRestriction_works() 127 @CanSetPolicyTest(policy = WifiSsidRestriction.class) [all …]
|
D | ManagedProfileContactsAccessTest.java | 98 @CannotSetPolicyTest(policy = ManagedProfileContactAccess.class) 105 @CannotSetPolicyTest(policy = ManagedProfileContactAccess.class) 112 @CanSetPolicyTest(policy = ManagedProfileContactAccess.class) 125 @CanSetPolicyTest(policy = ManagedProfileContactAccess.class) 132 PackagePolicy policy = new PackagePolicy(testPolicy); in setManagedProfileContactsAccess_validEmptyPolicy_works() local 135 .setManagedProfileContactsAccessPolicy(policy); in setManagedProfileContactsAccess_validEmptyPolicy_works() 142 .getManagedProfileContactsAccessPolicy()).isEqualTo(policy); in setManagedProfileContactsAccess_validEmptyPolicy_works() 145 @CanSetPolicyTest(policy = ManagedProfileContactAccess.class) 153 PackagePolicy policy = new PackagePolicy(testPolicy, ONLY_PACKAGE_ONE); in setManagedProfileContactsAccess_validPackageListPolicy_works() local 156 .setManagedProfileContactsAccessPolicy(policy); in setManagedProfileContactsAccess_validPackageListPolicy_works() [all …]
|
D | ManagedProfileCallerIdAccessTest.java | 98 @CannotSetPolicyTest(policy = ManagedProfileContactAccess.class) 105 @CannotSetPolicyTest(policy = ManagedProfileContactAccess.class) 112 @CanSetPolicyTest(policy = ManagedProfileContactAccess.class) 125 @CanSetPolicyTest(policy = ManagedProfileContactAccess.class) 132 PackagePolicy policy = new PackagePolicy(testPolicy); in setManagedProfileCallerIdAccess_validEmptyPolicy_works() local 135 .setManagedProfileCallerIdAccessPolicy(policy); in setManagedProfileCallerIdAccess_validEmptyPolicy_works() 142 .getManagedProfileCallerIdAccessPolicy()).isEqualTo(policy); in setManagedProfileCallerIdAccess_validEmptyPolicy_works() 145 @CanSetPolicyTest(policy = ManagedProfileContactAccess.class) 153 PackagePolicy policy = new PackagePolicy(testPolicy, ONLY_PACKAGE_ONE); in setManagedProfileCallerIdAccess_validPackageListPolicy_works() local 156 .setManagedProfileCallerIdAccessPolicy(policy); in setManagedProfileCallerIdAccess_validPackageListPolicy_works() [all …]
|
D | ResetPasswordWithTokenTest.java | 96 @PolicyAppliesTest(policy = ResetPasswordWithToken.class) 110 @CanSetPolicyTest(policy = ResetPasswordWithToken.class) 122 @CanSetPolicyTest(policy = ResetPasswordWithToken.class) 130 @PolicyAppliesTest(policy = ResetPasswordWithToken.class) 141 @PolicyAppliesTest(policy = ResetPasswordWithToken.class) 156 @PolicyAppliesTest(policy = PasswordQuality.class) 183 @PolicyAppliesTest(policy = PasswordQuality.class) 211 @CanSetPolicyTest(policy = ResetPasswordWithToken.class) 228 @PolicyAppliesTest(policy = PasswordQuality.class) 256 @PolicyAppliesTest(policy = PasswordQuality.class) [all …]
|
D | KeyManagementTest.java | 125 @CanSetPolicyTest(policy = KeyManagement.class) 140 @CanSetPolicyTest(policy = KeyManagement.class, singleTestOnly = true) 149 @CanSetPolicyTest(policy = KeyManagement.class, singleTestOnly = true) 158 @CanSetPolicyTest(policy = KeyManagement.class, singleTestOnly = true) 167 @CanSetPolicyTest(policy = KeyManagement.class) 186 @CanSetPolicyTest(policy = KeyManagement.class) 205 @CanSetPolicyTest(policy = KeyManagement.class) 222 @CannotSetPolicyTest(policy = KeyManagement.class) 229 @CanSetPolicyTest(policy = KeyManagement.class) 236 @CanSetPolicyTest(policy = KeyManagement.class) [all …]
|
D | KeyguardTest.java | 78 @CannotSetPolicyTest(policy = KeyguardDisableSecureCamera.class, 91 @PolicyAppliesTest(policy = KeyguardDisableSecureCamera.class) 114 @PolicyDoesNotApplyTest(policy = KeyguardDisableSecureCamera.class) 137 @CannotSetPolicyTest(policy = KeyguardDisableSecureNotifications.class, 150 @PolicyAppliesTest(policy = KeyguardDisableSecureNotifications.class) 173 @PolicyDoesNotApplyTest(policy = KeyguardDisableSecureNotifications.class) 196 @CannotSetPolicyTest(policy = KeyguardDisableTrustAgents.class, 209 @PolicyAppliesTest(policy = KeyguardDisableTrustAgents.class) 232 @PolicyDoesNotApplyTest(policy = KeyguardDisableTrustAgents.class) 255 @CannotSetPolicyTest(policy = KeyguardDisableUnredactedNotifications.class, [all …]
|
D | PasswordComplexityTest.java | 107 @CannotSetPolicyTest(policy = PasswordComplexity.class, includeNonDeviceAdminStates = false) 115 @CannotSetPolicyTest(policy = PasswordComplexity.class, includeNonDeviceAdminStates = false) 127 @CanSetPolicyTest(policy = PasswordComplexity.class) 145 @CannotSetPolicyTest(policy = PasswordComplexity.class) 153 @CanSetPolicyTest(policy = PasswordComplexity.class, singleTestOnly = true) 162 @CanSetPolicyTest(policy = PasswordComplexity.class, singleTestOnly = true) 176 @CanSetPolicyTest(policy = PasswordComplexity.class, singleTestOnly = true) 190 @CanSetPolicyTest(policy = PasswordComplexity.class, singleTestOnly = true) 204 @CanSetPolicyTest(policy = PasswordComplexity.class, singleTestOnly = true) 218 @CanSetPolicyTest(policy = PasswordComplexity.class, singleTestOnly = true) [all …]
|
D | FactoryResetProtectionTest.java | 68 @CannotSetPolicyTest(policy = FactoryResetProtection.class, includeNonDeviceAdminStates = false) 79 @CannotSetPolicyTest(policy = FactoryResetProtection.class) 89 @CanSetPolicyTest(policy = FactoryResetProtection.class) 110 @CanSetPolicyTest(policy = FactoryResetProtection.class) 149 FactoryResetProtectionPolicy policy = new FactoryResetProtectionPolicy.Builder() in factoryResetProtectionPolicy_validXml_correctSerializationAndDeserialization() local 153 assertThat(isEqualToFactoryResetProtectionPolicy(policy)).isTrue(); in factoryResetProtectionPolicy_validXml_correctSerializationAndDeserialization() 165 private boolean isEqualToFactoryResetProtectionPolicy(FactoryResetProtectionPolicy policy) { in isEqualToFactoryResetProtectionPolicy() argument 166 assertThat(policy.isFactoryResetProtectionEnabled()) in isEqualToFactoryResetProtectionPolicy() 168 assertThat(policy.getFactoryResetProtectionAccounts()) in isEqualToFactoryResetProtectionPolicy() 170 assertThat(policy.getFactoryResetProtectionAccounts() in isEqualToFactoryResetProtectionPolicy()
|
D | PendingSystemUpdateTest.kt | 53 @CanSetPolicyTest(policy = [ReceiveSystemUpdateCallback::class]) 69 @CanSetPolicyTest(policy = [ReceiveSystemUpdateCallback::class]) 85 @CanSetPolicyTest(policy = [ReceiveSystemUpdateCallback::class]) 102 @CanSetPolicyTest(policy = [ReceiveSystemUpdateCallback::class]) 115 @CanSetPolicyTest(policy = [ReceiveSystemUpdateCallback::class]) 132 @CanSetPolicyTest(policy = [ReceiveSystemUpdateCallback::class]) 149 @CanSetPolicyTest(policy = [ReceiveSystemUpdateCallback::class]) 166 @CanSetPolicyTest(policy = [ReceiveSystemUpdateCallback::class]) 179 policy = [ReceiveSystemUpdateCallback::class],
|
D | SetUsbDataSignalingTest.java | 59 @PolicyAppliesTest(policy = SetUsbDataSignaling.class) 67 @CannotSetPolicyTest(policy = SetUsbDataSignaling.class) 75 @CanSetPolicyTest(policy = SetUsbDataSignaling.class) 89 @PolicyAppliesTest(policy = SetUsbDataSignaling.class) 101 @PolicyAppliesTest(policy = SetUsbDataSignaling.class) 113 @PolicyAppliesTest(policy = SetUsbDataSignaling.class) 130 @PolicyAppliesTest(policy = SetUsbDataSignaling.class) 139 @PolicyAppliesTest(policy = SetUsbDataSignaling.class)
|
D | TimeTest.java | 66 @PolicyAppliesTest(policy = AutoTimeRequired.class) 83 @PolicyAppliesTest(policy = AutoTimeRequired.class) 100 @CannotSetPolicyTest(policy = AutoTimeRequired.class, includeNonDeviceAdminStates = false) 109 @PolicyDoesNotApplyTest(policy = AutoTimeRequired.class) 126 @CanSetPolicyTest(policy = AutoTimeRequired.class) 145 @CanSetPolicyTest(policy = AutoTimeRequired.class) 164 @CanSetPolicyTest(policy = AutoTimeEnabled.class) 184 @CanSetPolicyTest(policy = AutoTimeEnabled.class) 205 @PolicyAppliesTest(policy = AutoTimeEnabled.class) 224 @PolicyAppliesTest(policy = AutoTimeEnabled.class) [all …]
|
D | WifiTest.java | 122 @CannotSetPolicyTest(policy = DisallowConfigWifi.class, includeNonDeviceAdminStates = false) 131 @PolicyAppliesTest(policy = DisallowConfigWifi.class) 148 @PolicyDoesNotApplyTest(policy = DisallowConfigWifi.class) 192 policy = DisallowChangeWifiState.class, includeNonDeviceAdminStates = false) 201 @PolicyAppliesTest(policy = DisallowChangeWifiState.class) 217 @PolicyDoesNotApplyTest(policy = DisallowChangeWifiState.class) 263 @CannotSetPolicyTest(policy = DisallowWifiTethering.class, includeNonDeviceAdminStates = false) 272 @PolicyAppliesTest(policy = DisallowWifiTethering.class) 289 @PolicyDoesNotApplyTest(policy = DisallowWifiTethering.class) 340 policy = DisallowConfigTethering.class, includeNonDeviceAdminStates = false) [all …]
|
D | TelephonyTest.java | 88 …@CannotSetPolicyTest(policy = DisallowConfigCellBroadcasts.class, includeNonDeviceAdminStates = fa… 97 @PolicyAppliesTest(policy = DisallowConfigCellBroadcasts.class) 113 @PolicyDoesNotApplyTest(policy = DisallowConfigCellBroadcasts.class) 148 …@CannotSetPolicyTest(policy = DisallowConfigMobileNetworks.class, includeNonDeviceAdminStates = fa… 157 @PolicyAppliesTest(policy = DisallowConfigMobileNetworks.class) 173 @PolicyDoesNotApplyTest(policy = DisallowConfigMobileNetworks.class) 208 @CannotSetPolicyTest(policy = DisallowOutgoingCalls.class, includeNonDeviceAdminStates = false) 217 @PolicyAppliesTest(policy = DisallowOutgoingCalls.class) 234 @PolicyDoesNotApplyTest(policy = DisallowOutgoingCalls.class) 270 @CannotSetPolicyTest(policy = DisallowSms.class, includeNonDeviceAdminStates = false) [all …]
|
D | BluetoothTest.java | 159 @PolicyAppliesTest(policy = Bluetooth.class) 191 @PolicyAppliesTest(policy = Bluetooth.class) 305 @CannotSetPolicyTest(policy = DisallowBluetoothSharingPreU.class) 318 @CannotSetPolicyTest(policy = DisallowBluetoothSharing.class) 327 @CannotSetPolicyTest(policy = DisallowBluetoothSharingGlobally.class) 337 @PolicyAppliesTest(policy = DisallowBluetoothSharingPreU.class) 352 @PolicyAppliesTest(policy = DisallowBluetoothSharing.class) 363 @PolicyAppliesTest(policy = DisallowBluetoothSharingGlobally.class) 375 @PolicyDoesNotApplyTest(policy = DisallowBluetoothSharingPreU.class) 395 @PolicyDoesNotApplyTest(policy = DisallowBluetoothSharing.class) [all …]
|
D | AccessibilityServicesTest.java | 94 @CanSetPolicyTest(policy = PermittedAccessibilityServices.class) 107 @PolicyAppliesTest(policy = PermittedAccessibilityServices.class) 118 @PolicyAppliesTest(policy = PermittedAccessibilityServices.class) 135 @CanSetPolicyTest(policy = PermittedAccessibilityServices.class) 148 @PolicyAppliesTest(policy = PermittedAccessibilityServices.class) 164 @CanSetPolicyTest(policy = PermittedAccessibilityServices.class) 178 @PolicyAppliesTest(policy = PermittedAccessibilityServices.class) 191 @PolicyAppliesTest(policy = PermittedAccessibilityServices.class) 208 @PolicyAppliesTest(policy = PermittedAccessibilityServices.class) 221 @CannotSetPolicyTest(policy = PermittedAccessibilityServices.class, [all …]
|
/cts/tests/tests/nativemedia/aaudio/jni/ |
D | test_aaudio_mmap.cpp | 35 aaudio_policy_t policy = (aaudio_policy_t) AAudioExtensions::getMMapPolicyProperty(); in TEST_F() local 38 EXPECT_TRUE(policy == AAUDIO_UNSPECIFIED in TEST_F() 39 || policy == AAUDIO_POLICY_NEVER in TEST_F() 40 || policy == AAUDIO_POLICY_AUTO in TEST_F() 41 || policy == AAUDIO_POLICY_ALWAYS); in TEST_F() 46 EXPECT_NE(AAUDIO_POLICY_ALWAYS, policy); in TEST_F()
|
/cts/hostsidetests/appcloning/test-apps/AppCloningContactsSharingApps/ManagedProfileOwnerApp/src/com/android/cts/managedprofile/owner/app/ |
D | ManagedProfileOwnerAppTest.java | 63 PackagePolicy policy = new PackagePolicy(PackagePolicy.PACKAGE_POLICY_ALLOWLIST); in testSetDisallowWorkContactsAccessPolicy() local 64 mDevicePolicyManager.setManagedProfileContactsAccessPolicy(policy); in testSetDisallowWorkContactsAccessPolicy() 66 .isEqualTo(policy); in testSetDisallowWorkContactsAccessPolicy() 71 PackagePolicy policy = new PackagePolicy(PackagePolicy.PACKAGE_POLICY_BLOCKLIST); in testEnableWorkContactsAccess() local 72 mDevicePolicyManager.setManagedProfileContactsAccessPolicy(policy); in testEnableWorkContactsAccess() 74 .isEqualTo(policy); in testEnableWorkContactsAccess()
|
/cts/tests/tests/security/native/encryption/ |
D | FileBasedEncryptionPolicyTest.cpp | 279 arg.policy_size = sizeof(arg.policy); in TEST() 284 res = ioctl(fd, FS_IOC_GET_ENCRYPTION_POLICY, &arg.policy.v1); in TEST() 314 switch (arg.policy.version) { in TEST() 317 contents_mode = arg.policy.v1.contents_encryption_mode; in TEST() 318 filenames_mode = arg.policy.v1.filenames_encryption_mode; in TEST() 319 flags = arg.policy.v1.flags; in TEST() 341 contents_mode = arg.policy.v2.contents_encryption_mode; in TEST() 342 filenames_mode = arg.policy.v2.filenames_encryption_mode; in TEST() 343 flags = arg.policy.v2.flags; in TEST() 346 FAIL() << "Unknown encryption policy version: " << arg.policy.version; in TEST()
|
/cts/tests/vr/src/android/vr/cts/ |
D | VrSetFIFOThreadTest.java | 86 int vr_thread = 0, policy = 0; in testSetVrThreadAPISuccess() local 93 policy = (int) Process.getThreadScheduler(vr_thread); in testSetVrThreadAPISuccess() 94 Log.e(TAG, "scheduling policy: " + policy); in testSetVrThreadAPISuccess() 95 assertEquals((SCHED_FIFO | SCHED_RESET_ON_FORK), policy); in testSetVrThreadAPISuccess() 109 int vr_thread = 0, policy = 0; in testSetVrThreadAPIFailure() local 116 policy = (int) Process.getThreadScheduler(vr_thread); in testSetVrThreadAPIFailure() 117 Log.e(TAG, "scheduling policy: " + policy); in testSetVrThreadAPIFailure() 118 assertEquals(SCHED_OTHER, policy); in testSetVrThreadAPIFailure()
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/systemupdate/ |
D | SystemUpdatePolicyTest.java | 320 private void assertSystemUpdatePoliciesEqual(SystemUpdatePolicy policy, in assertSystemUpdatePoliciesEqual() argument 322 assertThat(policy.getInstallWindowStart()).isEqualTo(copy.getInstallWindowStart()); in assertSystemUpdatePoliciesEqual() 323 assertThat(policy.getInstallWindowEnd()).isEqualTo(copy.getInstallWindowEnd()); in assertSystemUpdatePoliciesEqual() 324 assertFreezePeriodListsEqual(policy.getFreezePeriods(), copy.getFreezePeriods()); in assertSystemUpdatePoliciesEqual() 325 assertThat(policy.getPolicyType()).isEqualTo(copy.getPolicyType()); in assertSystemUpdatePoliciesEqual() 364 private void testPolicy(SystemUpdatePolicy policy) { in testPolicy() argument 365 mDevicePolicyManager.setSystemUpdatePolicy(ADMIN_RECEIVER_COMPONENT, policy); in testPolicy() 368 if (policy == null) { in testPolicy() 372 assertEquals(policy.toString(), newPolicy.toString()); in testPolicy() 373 assertEquals(policy.getPolicyType(), newPolicy.getPolicyType()); in testPolicy() [all …]
|