/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/ |
D | PermissionHelperTest.java | 105 assertThat(PermissionHelper.hasAccessAdServicesStatePermission(mockContext)).isTrue(); 110 assertThat(PermissionHelper.hasAccessAdServicesStatePermission(mockContext1)).isTrue(); 118 assertThat(PermissionHelper.hasModifyAdServicesStatePermission(mockContext)).isTrue(); 123 assertThat(PermissionHelper.hasModifyAdServicesStatePermission(mockContext1)).isTrue(); 131 assertThat(PermissionHelper.hasUpdateAdIdCachePermission(mockContextGrant)).isTrue(); 136 assertThat(PermissionHelper.hasUpdateAdIdCachePermission(mockContextDeny)).isFalse(); 145 assertThat(PermissionHelper.hasUpdateAdIdCachePermission(mockContextGrant)).isTrue(); 150 assertThat(PermissionHelper.hasUpdateAdIdCachePermission(mockContextDeny)).isFalse(); 158 PermissionHelper.hasTopicsPermission( 163 PermissionHelper.hasAdIdPermission( [all …]
|
D | AdServicesCommonServiceImplTest.java | 102 @SpyStatic(PermissionHelper.class) 588 .when(() -> PermissionHelper.hasModifyAdServicesStatePermission(any())); in enableAdServicesTest_unauthorizedCaller() 593 ExtendedMockito.verify(() -> PermissionHelper.hasModifyAdServicesStatePermission(any())); in enableAdServicesTest_unauthorizedCaller() 604 .when(() -> PermissionHelper.hasModifyAdServicesStatePermission(any())); in enableAdServicesTest_apiDisabled() 610 ExtendedMockito.verify(() -> PermissionHelper.hasModifyAdServicesStatePermission(any())); in enableAdServicesTest_apiDisabled() 620 .when(() -> PermissionHelper.hasModifyAdServicesStatePermission(any())); in enableAdServicesTest_engineStarted() 628 ExtendedMockito.verify(() -> PermissionHelper.hasModifyAdServicesStatePermission(any())); in enableAdServicesTest_engineStarted() 638 .when(() -> PermissionHelper.hasModifyAdServicesStatePermission(any())); in enableAdServicesTest_extServicesPackage_initializesComponents() 655 ExtendedMockito.verify(() -> PermissionHelper.hasModifyAdServicesStatePermission(any())); in enableAdServicesTest_extServicesPackage_initializesComponents() 667 .when(() -> PermissionHelper.hasModifyAdServicesStatePermission(any())); in enableAdServicesTest_tPlus_adServicesPackage_skipBackCompatInit() [all …]
|
D | FledgeAuthorizationFilterTest.java | 77 @MockStatic(PermissionHelper.class) 195 when(PermissionHelper.hasPermission( in testAssertAppHasCaPermission_appHasPermission() 220 when(PermissionHelper.hasPermission( in testAssertAppHasPasPermission_appHasPermission() 244 when(PermissionHelper.hasPermission( in testAssertAppHasAnyPermission_appHasAllPermissions() 247 when(PermissionHelper.hasPermission( in testAssertAppHasAnyPermission_appHasAllPermissions() 250 when(PermissionHelper.hasPermission( in testAssertAppHasAnyPermission_appHasAllPermissions() 278 when(PermissionHelper.hasPermission( in testAssertAppHasAnyPermission_appHasOnePermission() 281 when(PermissionHelper.hasPermission( in testAssertAppHasAnyPermission_appHasOnePermission() 284 when(PermissionHelper.hasPermission( in testAssertAppHasAnyPermission_appHasOnePermission() 312 when(PermissionHelper.hasPermission( in testAssertAppHasAnyPermission_appHasTwoPermissions() [all …]
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/ |
D | PermissionHelperTest.java | 56 PermissionHelper.hasAtLeastOnePermissionGranted(mContext, PERMISSION1, in testHasAtLeastOnePermission_none() 67 PermissionHelper.hasAtLeastOnePermissionGranted(mContext, PERMISSION1, in testHasAtLeastOnePermission_one() 78 PermissionHelper.hasAtLeastOnePermissionGranted(mContext, PERMISSION1, in testHasAtLeastOnePermission_both() 88 SecurityException exception = assertThrows(SecurityException.class, () -> PermissionHelper in testCheckHasAtLeastOnePermission_none() 99 PermissionHelper.checkHasAtLeastOnePermissionGranted(mContext, MESSAGE, PERMISSION1, in testCheckHasAtLeastOnePermissionGranted_one() 108 PermissionHelper.checkHasAtLeastOnePermissionGranted(mContext, MESSAGE, PERMISSION1, in testCheckHasAtLeastOnePermissionGranted_both() 117 () -> PermissionHelper.checkHasDumpPermissionGranted(mContext, MESSAGE)); in testCheckHasDumpPermissionGranted_notGranted() 127 PermissionHelper.checkHasDumpPermissionGranted(mContext, MESSAGE); in testCheckHasDumpPermissionGranted_granted()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/adselection/ |
D | AdIdFetcherTest.java | 35 import com.android.adservices.service.common.PermissionHelper; 48 @MockStatic(PermissionHelper.class) 110 Mockito.when(PermissionHelper.hasAdIdPermission(mContext, CALLER_PACKAGE_NAME, CALLER_UID)) in testIsLimitedTrackingEnabled_PermissionsNotDeclared_ReturnsDefault() 129 Mockito.when(PermissionHelper.hasAdIdPermission(mContext, CALLER_PACKAGE_NAME, CALLER_UID)) in testIsLimitedTrackingEnabled_Disabled_ReturnsFalse() 148 Mockito.when(PermissionHelper.hasAdIdPermission(mContext, CALLER_PACKAGE_NAME, CALLER_UID)) in testIsLimitedTrackingEnabled_LatEnabled_ReturnsTrue() 167 Mockito.when(PermissionHelper.hasAdIdPermission(mContext, CALLER_PACKAGE_NAME, CALLER_UID)) in testIsLimitedTrackingEnabled_AdIdZeroedOut_ReturnsDefault() 186 Mockito.when(PermissionHelper.hasAdIdPermission(mContext, CALLER_PACKAGE_NAME, CALLER_UID)) in testIsLimitedTrackingEnabled_TimeoutException_ReturnsDefault() 206 Mockito.when(PermissionHelper.hasAdIdPermission(mContext, CALLER_PACKAGE_NAME, CALLER_UID)) in testIsLimitedTrackingEnabled_OnError_ReturnsDefault()
|
D | ReportAndRegisterEventE2ETest.java | 97 import com.android.adservices.service.common.PermissionHelper; 274 .mockStatic(PermissionHelper.class) in setup() 642 PermissionHelper.hasAttributionPermission( in testService_ReportingAndRegisteringEnabled_measurementConsentRevoked() 692 PermissionHelper.hasAttributionPermission( in testService_ReportingAndRegisteringEnabled_noPermissionForARA() 919 PermissionHelper.hasAttributionPermission( in testService_ReportingAndRegisteringFallbackEnabled_measurementConsentRevoked() 980 PermissionHelper.hasAttributionPermission( in testService_ReportingAndRegisteringFallbackEnabled_noPermissionForARA() 1124 PermissionHelper.hasAttributionPermission( in enableMeasurementConsentAndARAPermission()
|
D | ReportAndRegisterEventImplTest.java | 81 import com.android.adservices.service.common.PermissionHelper; 191 .mockStatic(PermissionHelper.class) in setup() 952 PermissionHelper.hasAttributionPermission( in testImpl_onlyReportsEvent_measurementConsentRevoked() 998 PermissionHelper.hasAttributionPermission( in testImpl_onlyReportsEvent_noPermissionForARA() 1190 PermissionHelper.hasAttributionPermission( in enableARA()
|
/packages/services/Car/car-builtin-lib/src/android/car/builtin/ |
D | PermissionHelper.java | 27 public final class PermissionHelper { class 28 private PermissionHelper() { in PermissionHelper() method in PermissionHelper
|
/packages/services/Car/service/src/com/android/car/ |
D | PermissionHelper.java | 27 public final class PermissionHelper { class 69 private PermissionHelper() { in PermissionHelper() method in PermissionHelper
|
/packages/modules/HealthFitness/tests/cts/route/src/android/healthconnect/cts/route/ |
D | ExerciseRouteTestHelper.java | 23 import static android.healthconnect.cts.utils.PermissionHelper.READ_EXERCISE_ROUTES; 24 import static android.healthconnect.cts.utils.PermissionHelper.READ_EXERCISE_ROUTE_PERMISSION; 25 import static android.healthconnect.cts.utils.PermissionHelper.getGrantedHealthPermissions;
|
D | ExerciseRouteNoReadWritePermissionTest.java | 30 import static android.healthconnect.cts.utils.PermissionHelper.READ_EXERCISE_ROUTES; 31 import static android.healthconnect.cts.utils.PermissionHelper.runWithRevokedPermissions;
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/nopermission/ |
D | HealthConnectManagerNotAllPermissionsAreGrantedTest.java | 31 import static android.healthconnect.cts.utils.PermissionHelper.grantPermissions; 32 import static android.healthconnect.cts.utils.PermissionHelper.revokeAllPermissions; 33 import static android.healthconnect.cts.utils.PermissionHelper.revokePermission;
|
D | HealthConnectManagerNoPermissionsGrantedTest.java | 40 import static android.healthconnect.cts.utils.PermissionHelper.grantPermission; 41 import static android.healthconnect.cts.utils.PermissionHelper.revokeAllPermissions;
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/ui/ |
D | ExerciseRouteRequestTest.kt | 34 import android.healthconnect.cts.utils.PermissionHelper.READ_EXERCISE_ROUTES 35 import android.healthconnect.cts.utils.PermissionHelper.getDeclaredHealthPermissions 36 import android.healthconnect.cts.utils.PermissionHelper.grantPermission 37 import android.healthconnect.cts.utils.PermissionHelper.runWithDeviceConfigForController 38 import android.healthconnect.cts.utils.PermissionHelper.runWithRevokedPermission 39 import android.healthconnect.cts.utils.PermissionHelper.runWithUserFixedPermission
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/common/ |
D | PermissionHelper.java | 35 public final class PermissionHelper { class 36 private PermissionHelper() {} in PermissionHelper() method in PermissionHelper
|
D | AdServicesCommonServiceImpl.java | 144 PermissionHelper.hasAccessAdServicesStatePermission(mContext); in isAdServicesEnabled() 204 PermissionHelper.hasModifyAdServicesStatePermission(mContext); in setAdServicesEnabled() 319 boolean authorizedCaller = PermissionHelper.hasModifyAdServicesStatePermission(mContext); in enableAdServices() 377 boolean authorizedCaller = PermissionHelper.hasUpdateAdIdCachePermission(mContext); in updateAdIdCache() 431 PermissionHelper.hasAccessAdServicesCommonStatePermission(mContext, packageName); in getAdServicesCommonStates()
|
D | FledgeAuthorizationFilter.java | 146 if (!PermissionHelper.hasPermission(context, appPackageName, permission)) { in assertAppDeclaredPermission() 171 if (PermissionHelper.hasPermission(context, appPackageName, permission)) { in assertAppDeclaredAnyPermission()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/adselection/ |
D | AdIdFetcher.java | 32 import com.android.adservices.service.common.PermissionHelper; 98 PermissionHelper.hasAdIdPermission(mContext, packageName, callingUid); in isLimitedAdTrackingEnabled()
|
D | ReportAndRegisterEventImpl.java | 35 import com.android.adservices.service.common.PermissionHelper; 223 if (!PermissionHelper.hasAttributionPermission(mContext, input.getCallerPackageName())) { in canMeasurementRegisterAndReport()
|
/packages/modules/HealthFitness/tests/integrationtests/src/android/healthconnect/tests/backuprestore/ |
D | BackupRestoreE2ETest.java | 19 import static android.healthconnect.cts.utils.PermissionHelper.getHealthDataHistoricalAccessStartDa… 20 import static android.healthconnect.cts.utils.PermissionHelper.grantPermission; 21 import static android.healthconnect.cts.utils.PermissionHelper.revokeAllPermissions; 22 import static android.healthconnect.cts.utils.PermissionHelper.revokeAllPermissionsWithDelay;
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/ |
D | MeasurementServiceImpl.java | 61 import com.android.adservices.service.common.PermissionHelper; 176 PermissionHelper.hasAttributionPermission(mContext, request.getAppPackageName()); in register() 237 PermissionHelper.hasAttributionPermission(mContext, request.getAppPackageName()); in registerWebSource() 322 PermissionHelper.hasAttributionPermission( in registerSource() 363 PermissionHelper.hasAttributionPermission(mContext, request.getAppPackageName()); in registerWebTrigger()
|
/packages/modules/HealthFitness/tests/cts/utils/HealthConnectTestUtils/src/android/healthconnect/cts/utils/ |
D | RevokedHealthPermissionRule.java | 19 import static android.healthconnect.cts.utils.PermissionHelper.getGrantedHealthPermissions;
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/adid/ |
D | AdIdServiceImpl.java | 53 import com.android.adservices.service.common.PermissionHelper; 117 PermissionHelper.hasAdIdPermission(mContext, packageName, callingUid); in getAdId()
|
/packages/modules/HealthFitness/tests/cts/hostsidetests/healthconnect/device/src/android/healthconnect/cts/device/ |
D | HealthConnectDeviceTest.java | 35 import static android.healthconnect.cts.utils.PermissionHelper.getGrantedHealthPermissions; 36 import static android.healthconnect.cts.utils.PermissionHelper.grantPermission; 37 import static android.healthconnect.cts.utils.PermissionHelper.revokeAndThenGrantHealthPermissions; 38 import static android.healthconnect.cts.utils.PermissionHelper.revokeHealthPermissions; 39 import static android.healthconnect.cts.utils.PermissionHelper.revokePermission;
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/topics/ |
D | TopicsServiceImpl.java | 70 import com.android.adservices.service.common.PermissionHelper; 150 PermissionHelper.hasTopicsPermission(mContext, packageName, callingUid); in getTopics()
|