Home
last modified time | relevance | path

Searched refs:checkCallingOrSelfPermission (Results 1 – 25 of 117) sorted by relevance

12345

/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/
DPermissionUtilsTest.kt78 .checkCallingOrSelfPermission(TEST_PERMISSION1) in testEnforceAnyPermissionOf()
80 .checkCallingOrSelfPermission(TEST_PERMISSION2) in testEnforceAnyPermissionOf()
85 .checkCallingOrSelfPermission(TEST_PERMISSION1) in testEnforceAnyPermissionOf()
87 .checkCallingOrSelfPermission(TEST_PERMISSION2) in testEnforceAnyPermissionOf()
91 doReturn(PERMISSION_DENIED).`when`(mockContext).checkCallingOrSelfPermission(any()) in testEnforceAnyPermissionOf()
100 doReturn(PERMISSION_GRANTED).`when`(mockContext).checkCallingOrSelfPermission(NETWORK_STACK) in testEnforceNetworkStackPermissionOr()
102 .checkCallingOrSelfPermission(PERMISSION_MAINLINE_NETWORK_STACK) in testEnforceNetworkStackPermissionOr()
106 doReturn(PERMISSION_DENIED).`when`(mockContext).checkCallingOrSelfPermission(NETWORK_STACK) in testEnforceNetworkStackPermissionOr()
108 .checkCallingOrSelfPermission(PERMISSION_MAINLINE_NETWORK_STACK) in testEnforceNetworkStackPermissionOr()
112 doReturn(PERMISSION_DENIED).`when`(mockContext).checkCallingOrSelfPermission(NETWORK_STACK) in testEnforceNetworkStackPermissionOr()
[all …]
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/common/
DPermissionHelper.java99 == context.checkCallingOrSelfPermission( in hasModifyAdServicesStatePermission()
102 == context.checkCallingOrSelfPermission( in hasModifyAdServicesStatePermission()
111 == context.checkCallingOrSelfPermission( in hasAccessAdServicesStatePermission()
114 == context.checkCallingOrSelfPermission( in hasAccessAdServicesStatePermission()
125 == context.checkCallingOrSelfPermission( in hasUpdateAdIdCachePermission()
128 == context.checkCallingOrSelfPermission( in hasUpdateAdIdCachePermission()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/hal/property/
DPropertyHalServiceConfigsUnitTest.java145 when(mContext.checkCallingOrSelfPermission(Car.PERMISSION_CAR_ENGINE_DETAILED)) in setUp()
147 when(mContext.checkCallingOrSelfPermission(Car.PERMISSION_CONTROL_CAR_CLIMATE)) in setUp()
149 when(mContext.checkCallingOrSelfPermission(Car.PERMISSION_READ_WINDSHIELD_WIPERS)) in setUp()
151 when(mContext.checkCallingOrSelfPermission(Car.PERMISSION_CONTROL_WINDSHIELD_WIPERS)) in setUp()
153 when(mContext.checkCallingOrSelfPermission(Car.PERMISSION_CONTROL_ADAS_STATES)) in setUp()
155 when(mContext.checkCallingOrSelfPermission(Car.PERMISSION_READ_DISPLAY_UNITS)) in setUp()
157 when(mContext.checkCallingOrSelfPermission(Car.PERMISSION_CONTROL_DISPLAY_UNITS)) in setUp()
159 when(mContext.checkCallingOrSelfPermission(Car.PERMISSION_VENDOR_EXTENSION)) in setUp()
213 when(mContext.checkCallingOrSelfPermission(Car.PERMISSION_CONTROL_CAR_CLIMATE)) in testIsReadableWritableForSystemProperty()
215 when(mContext.checkCallingOrSelfPermission(Car.PERMISSION_VENDOR_EXTENSION)) in testIsReadableWritableForSystemProperty()
[all …]
DPropertyPermissionInfoTest.java64 when(mContext.checkCallingOrSelfPermission(Car.PERMISSION_VENDOR_EXTENSION)) in testAllOfPermission()
68 when(mContext.checkCallingOrSelfPermission(Car.PERMISSION_CONTROL_DISPLAY_UNITS)) in testAllOfPermission()
87 when(mContext.checkCallingOrSelfPermission(Car.PERMISSION_VENDOR_EXTENSION)) in testAnyOfPermission()
91 when(mContext.checkCallingOrSelfPermission(Car.PERMISSION_CONTROL_DISPLAY_UNITS)) in testAnyOfPermission()
/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/
DTetheringService.java210 if (!checkCallingOrSelfPermission(NETWORK_SETTINGS)) { in setPreferTestNetworks()
268 return checkCallingOrSelfPermission(NETWORK_STACK) in hasNetworkStackPermission()
269 || checkCallingOrSelfPermission(PERMISSION_MAINLINE_NETWORK_STACK); in hasNetworkStackPermission()
273 return checkCallingOrSelfPermission(TETHER_PRIVILEGED); in hasTetherPrivilegedPermission()
276 private boolean checkCallingOrSelfPermission(final String permission) { in checkCallingOrSelfPermission() method in TetheringService.TetheringConnector
277 return mService.checkCallingOrSelfPermission(permission) == PERMISSION_GRANTED; in checkCallingOrSelfPermission()
300 return mService.checkCallingOrSelfPermission( in hasTetherAccessPermission()
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
DTelecomServiceImplTest.java237 when(mContext.checkCallingOrSelfPermission(Manifest.permission.INTERACT_ACROSS_USERS)) in setUp()
564 doReturn(PackageManager.PERMISSION_GRANTED).when(mContext).checkCallingOrSelfPermission( in testGetCallCapablePhoneAccountsAcrossProfiles()
572 doReturn(PackageManager.PERMISSION_DENIED).when(mContext).checkCallingOrSelfPermission( in testGetCallCapablePhoneAccountsAcrossProfiles()
583 doReturn(PackageManager.PERMISSION_GRANTED).when(mContext).checkCallingOrSelfPermission( in testGetCallCapablePhoneAccountsAcrossProfiles()
594 doReturn(PackageManager.PERMISSION_DENIED).when(mContext).checkCallingOrSelfPermission( in testGetCallCapablePhoneAccountsAcrossProfiles()
845 .when(mContext).checkCallingOrSelfPermission(MODIFY_PHONE_STATE); in testRegisterPhoneAccount()
855 .when(mContext).checkCallingOrSelfPermission(MODIFY_PHONE_STATE); in testRegisterPhoneAccountSimultaneousCallingVerification()
976 .when(mContext).checkCallingOrSelfPermission(MODIFY_PHONE_STATE); in testRegisterPhoneAccountWithoutModifyPermission()
994 .when(mContext).checkCallingOrSelfPermission(MODIFY_PHONE_STATE); in testRegisterPhoneAccountWithOldFeatureFlag()
1013 .when(mContext).checkCallingOrSelfPermission(MODIFY_PHONE_STATE); in testRegisterPhoneAccountWithoutModifyPermissionFailure()
[all …]
/packages/modules/Connectivity/Tethering/tests/unit/src/com/android/networkstack/tethering/
DMockTetheringService.java52 return context.checkCallingOrSelfPermission(WRITE_SETTINGS) == PERMISSION_GRANTED; in checkAndNoteWriteSettingsOperation()
56 public int checkCallingOrSelfPermission(String permission) { in checkCallingOrSelfPermission() method in MockTetheringService
61 return super.checkCallingOrSelfPermission(permission); in checkCallingOrSelfPermission()
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/
DHelpersTest.java433 when(mockContext.checkCallingOrSelfPermission( in checkDestinationFilePathRestrictions_noPermission()
436 when(mockContext.checkCallingOrSelfPermission( in checkDestinationFilePathRestrictions_noPermission()
458 when(mockContext.checkCallingOrSelfPermission( in checkDestinationFilePathRestrictions_installer()
461 when(mockContext.checkCallingOrSelfPermission( in checkDestinationFilePathRestrictions_installer()
484 when(mockContext.checkCallingOrSelfPermission( in checkDestinationFilePathRestrictions_WES()
487 when(mockContext.checkCallingOrSelfPermission( in checkDestinationFilePathRestrictions_WES()
/packages/modules/AdServices/adservices/apk/tests/util/java/com/android/adservices/ui/util/
DNotificationActivityTestUtil.java62 if (sContext.checkCallingOrSelfPermission(READ_DEVICE_CONFIG) in startActivity()
87 if (sContext.checkCallingOrSelfPermission(READ_DEVICE_CONFIG) in startRenotifyPasActivity()
/packages/apps/Dialer/java/com/android/dialer/preferredsim/impl/
DPreferredSimFallbackProvider.java162 if (getContext().checkCallingOrSelfPermission(permission.READ_CONTACTS) in checkReadContactsPermission()
169 if (getContext().checkCallingOrSelfPermission(permission.WRITE_CONTACTS) in checkWriteContactsPermission()
/packages/modules/Connectivity/staticlibs/framework/com/android/net/module/util/
DPermissionUtils.java53 if (context.checkCallingOrSelfPermission(permission) == PERMISSION_GRANTED) { in hasAnyPermissionOf()
141 if (context.checkCallingOrSelfPermission(android.Manifest.permission.DUMP) in hasDumpPermission()
/packages/services/Car/experimental/service/src/com/android/experimentalcar/
DIExperimentalCarImpl.java145 if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP) in dump()
210 if (context.checkCallingOrSelfPermission(permission) != PackageManager.PERMISSION_GRANTED) { in assertPermission()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/am/
DCarActivityServiceUnitTest.java103 when(mContext.checkCallingOrSelfPermission(eq(Car.PERMISSION_CONTROL_CAR_APP_LAUNCH))) in setPersistentActivityThrowsException_withoutPermission()
131 when(mContext.checkCallingOrSelfPermission(eq(Car.PERMISSION_CONTROL_CAR_APP_LAUNCH))) in setPersistentActivitiesOnRootTaskThrowsException_withoutPermission()
/packages/services/Telecomm/src/com/android/server/telecom/
DTelecomServiceImpl.java860 && mContext.checkCallingOrSelfPermission(MODIFY_PHONE_STATE)
1945 final boolean hasCallPermission = mContext.checkCallingOrSelfPermission(CALL_PHONE)
1952 final boolean hasCallPrivilegedPermission = mContext.checkCallingOrSelfPermission(
2069 if (mContext.checkCallingOrSelfPermission(
2429 if (!(mContext.checkCallingOrSelfPermission(READ_PHONE_STATE)
2431 !(mContext.checkCallingOrSelfPermission(READ_PRIVILEGED_PHONE_STATE)
2920 int result = mContext.checkCallingOrSelfPermission(MODIFY_PHONE_STATE); in enforcePhoneAccountModificationForPackage()
3079 || mContext.checkCallingOrSelfPermission(REGISTER_SIM_SUBSCRIPTION) in enforceRegisterVoiceCallingIndicationCapabilities()
3132 return mContext.checkCallingOrSelfPermission( in hasInAppCrossUserPermission()
3138 return mContext.checkCallingOrSelfPermission( in hasInAppCrossProfilePermission()
[all …]
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/
DUtils.java556 return context.checkCallingOrSelfPermission(Manifest.permission.BLUETOOTH_PRIVILEGED) in hasBluetoothPrivilegedPermission()
993 return context.checkCallingOrSelfPermission(android.Manifest.permission.NETWORK_SETTINGS) in checkCallerHasNetworkSettingsPermission()
1003 return context.checkCallingOrSelfPermission( in checkCallerHasNetworkSetupWizardPermission()
1014 return context.checkCallingOrSelfPermission( in checkCallerHasScanWithoutLocationPermission()
1022 return context.checkCallingOrSelfPermission( in checkCallerHasPrivilegedPermission()
1030 return context.checkCallingOrSelfPermission( in checkCallerHasWriteSmsPermission()
/packages/services/Car/car-lib/src/com/android/car/internal/
DCarPermission.java44 == mContext.checkCallingOrSelfPermission(mName); in checkGranted()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/occupantconnection/
DCarOccupantConnectionServiceTest.java152 when(mContext.checkCallingOrSelfPermission(eq(Car.PERMISSION_MANAGE_OCCUPANT_CONNECTION))) in testRegisterReceiverWithoutPermission_throwsException()
323 when(mContext.checkCallingOrSelfPermission(eq(Car.PERMISSION_MANAGE_OCCUPANT_CONNECTION))) in testUnregisterReceiverWithoutPermission_throwsException()
448 when(mContext.checkCallingOrSelfPermission(eq(Car.PERMISSION_MANAGE_OCCUPANT_CONNECTION))) in testRequestConnectionWithoutPermission_throwsException()
605 when(mContext.checkCallingOrSelfPermission(eq(Car.PERMISSION_MANAGE_OCCUPANT_CONNECTION))) in testCancelConnectionWithoutPermission_throwsException()
743 when(mContext.checkCallingOrSelfPermission(eq(Car.PERMISSION_MANAGE_OCCUPANT_CONNECTION))) in testSendPayloadWithoutPermission_throwsException()
794 when(mContext.checkCallingOrSelfPermission(eq(Car.PERMISSION_MANAGE_OCCUPANT_CONNECTION))) in testIsConnectedWithoutPermission_throwsException()
823 when(mContext.checkCallingOrSelfPermission(eq(Car.PERMISSION_MANAGE_OCCUPANT_CONNECTION))) in testDisconnectWithoutPermission_throwsException()
/packages/services/Telephony/tests/src/com/android/
DTestContext.java227 if (checkCallingOrSelfPermission(permission) != PackageManager.PERMISSION_GRANTED) { in enforceCallingOrSelfPermission()
243 public int checkCallingOrSelfPermission(String permission) { in checkCallingOrSelfPermission() method in TestContext
/packages/modules/AdServices/adservices/tests/cts/ui/libs/src/com/android/adservices/tests/ui/libs/
DAdservicesWorkflows.java41 if (context.checkCallingOrSelfPermission(READ_DEVICE_CONFIG) in startNotificationActivity()
55 if (context.checkCallingOrSelfPermission(READ_DEVICE_CONFIG) in startSettingsActivity()
/packages/services/Car/service/src/com/android/car/
DPermissionHelper.java61 if (context.checkCallingOrSelfPermission(permission) in hasAtLeastOnePermissionGranted()
/packages/modules/OnDevicePersonalization/framework/java/android/federatedcompute/
DExampleStoreService.java84 return checkCallingOrSelfPermission(BIND_EXAMPLE_STORE_SERVICE) in checkCallerPermission()
/packages/providers/ContactsKeysProvider/src/com/android/providers/contactkeys/util/
DE2eeContactKeysPermissions.java39 ok = context.checkCallingOrSelfPermission(permission) in hasCallerOrSelfPermission()
/packages/modules/Bluetooth/service/src/com/android/server/bluetooth/
DBluetoothServiceBinder.java196 if (mContext.checkCallingOrSelfPermission(LOCAL_MAC_ADDRESS) != PERMISSION_GRANTED) { in getAddress()
351 if (mContext.checkCallingOrSelfPermission(DUMP) != PERMISSION_GRANTED) { in dump()
/packages/providers/ContactsProvider/src/com/android/providers/contacts/util/
DContactsPermissions.java44 ok = context.checkCallingOrSelfPermission(permission) in hasCallerOrSelfPermission()
/packages/modules/Connectivity/tests/unit/java/com/android/server/
DNsdServiceTest.java1999 doReturn(PERMISSION_DENIED).when(mContext).checkCallingOrSelfPermission(NETWORK_STACK); in testRegisterOffloadEngine_checkPermission_V()
2000 doReturn(PERMISSION_DENIED).when(mContext).checkCallingOrSelfPermission( in testRegisterOffloadEngine_checkPermission_V()
2002 doReturn(PERMISSION_DENIED).when(mContext).checkCallingOrSelfPermission(NETWORK_SETTINGS); in testRegisterOffloadEngine_checkPermission_V()
2003 doReturn(PERMISSION_GRANTED).when(mContext).checkCallingOrSelfPermission( in testRegisterOffloadEngine_checkPermission_V()
2006 doReturn(PERMISSION_DENIED).when(mContext).checkCallingOrSelfPermission( in testRegisterOffloadEngine_checkPermission_V()
2008 doReturn(PERMISSION_GRANTED).when(mContext).checkCallingOrSelfPermission(DEVICE_POWER); in testRegisterOffloadEngine_checkPermission_V()
2013 doReturn(PERMISSION_GRANTED).when(mContext).checkCallingOrSelfPermission( in testRegisterOffloadEngine_checkPermission_V()
2029 doReturn(PERMISSION_DENIED).when(mContext).checkCallingOrSelfPermission(NETWORK_STACK); in testRegisterOffloadEngine_checkPermission_U()
2030 doReturn(PERMISSION_DENIED).when(mContext).checkCallingOrSelfPermission( in testRegisterOffloadEngine_checkPermission_U()
2032 doReturn(PERMISSION_DENIED).when(mContext).checkCallingOrSelfPermission(NETWORK_SETTINGS); in testRegisterOffloadEngine_checkPermission_U()
[all …]

12345