/frameworks/base/core/java/android/os/ |
D | PermissionEnforcer.java | 96 protected int checkPermission(@NonNull String permission, @NonNull AttributionSource source) { in checkPermission() method in PermissionEnforcer 103 protected int checkPermission(@NonNull String permission, int pid, int uid) { in checkPermission() method in PermissionEnforcer 104 if (mContext.checkPermission(permission, pid, uid) == PackageManager.PERMISSION_GRANTED) { in checkPermission() 131 int result = checkPermission(permission, source); in enforcePermission() 144 int result = checkPermission(permission, pid, uid); in enforcePermission() 153 int result = checkPermission(permission, source); in enforcePermissionAllOf() 169 int result = checkPermission(permission, pid, uid); in enforcePermissionAllOf() 180 int result = checkPermission(permission, source); in enforcePermissionAnyOf() 197 int result = checkPermission(permission, pid, uid); in enforcePermissionAnyOf()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/ |
D | KeyguardService.java | 413 void checkPermission() { in checkPermission() method 442 checkPermission(); 450 checkPermission(); 461 checkPermission(); 473 checkPermission(); 480 checkPermission(); 488 checkPermission(); 496 checkPermission(); 509 checkPermission(); 524 checkPermission(); [all …]
|
/frameworks/native/libs/permission/android/permission/ |
D | PermissionChecker.cpp | 72 return checkPermission(permission, attributionSource, message, /*forDataDelivery*/ true, in checkPermissionForDataDeliveryFromDatasource() 81 return checkPermission(permission, attributionSource, message, /*forDataDelivery*/ true, in checkPermissionForStartDataDeliveryFromDatasource() 89 return checkPermission(permission, attributionSource, message, /*forDataDelivery*/ false, in checkPermissionForPreflight() 97 return checkPermission(permission, attributionSource, message, /*forDataDelivery*/ false, in checkPermissionForPreflightFromDatasource() 114 PermissionChecker::PermissionResult PermissionChecker::checkPermission(const String16& permission, in checkPermission() function in android::permission::PermissionChecker 122 binder::Status status = service->checkPermission(permission, attributionSource, message, in checkPermission()
|
/frameworks/base/core/java/android/hardware/location/ |
D | GeofenceHardwareService.java | 59 private void checkPermission(int pid, int uid, int monitoringType) { in checkPermission() method in GeofenceHardwareService 104 checkPermission(Binder.getCallingPid(), Binder.getCallingUid(), monitoringType); 114 checkPermission(Binder.getCallingPid(), Binder.getCallingUid(), monitoringType); 124 checkPermission(Binder.getCallingPid(), Binder.getCallingUid(), monitoringType); 134 checkPermission(Binder.getCallingPid(), Binder.getCallingUid(), monitoringType); 145 checkPermission(Binder.getCallingPid(), Binder.getCallingUid(), monitoringType); 157 checkPermission(Binder.getCallingPid(), Binder.getCallingUid(), monitoringType);
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/wifi/ |
D | WifiPermissionChecker.java | 63 return checkPermission(ACCESS_WIFI_STATE); in canAccessWifiState() 70 return checkPermission(ACCESS_FINE_LOCATION); in canAccessFineLocation() 73 private boolean checkPermission(String permission) { in checkPermission() method in WifiPermissionChecker 81 if (mPackageManager.checkPermission(permission, mLaunchedPackage) == PERMISSION_GRANTED) { in checkPermission()
|
/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/ |
D | JobSchedulerShellCommand.java | 114 private void checkPermission(String operation) throws Exception { in checkPermission() method in JobSchedulerShellCommand 115 checkPermission(operation, Manifest.permission.CHANGE_APP_IDLE_STATE); in checkPermission() 118 private void checkPermission(String operation, String permission) throws Exception { in checkPermission() method in JobSchedulerShellCommand 178 checkPermission("force scheduled jobs"); in runJob() 248 checkPermission("force timeout jobs"); in timeout() 291 checkPermission("cancel jobs"); in cancelJob() 334 checkPermission("change battery monitoring"); in monitorBattery() 357 checkPermission("disable flex policy"); in disableFlexPolicy() 370 checkPermission("enable flex policy"); in enableFlexPolicy() 416 checkPermission("get aconfig flag state", Manifest.permission.DUMP); in getAconfigFlagState() [all …]
|
/frameworks/opt/chips/src/com/android/ex/chips/ |
D | ChipsUtil.java | 62 public static int checkPermission(Context context, String permission) { in checkPermission() method in ChipsUtil 65 return context.checkPermission(permission, Process.myPid(), Process.myUid()); in checkPermission() 82 checkPermission(context, permission) == PackageManager.PERMISSION_GRANTED; in hasPermissions()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/ |
D | WifiPermissionCheckerTest.java | 74 when(mPackageManager.checkPermission(ACCESS_WIFI_STATE, LAUNCHED_PACKAGE)) in canAccessWifiState_noPermission_returnFalse() 82 when(mPackageManager.checkPermission(ACCESS_WIFI_STATE, LAUNCHED_PACKAGE)) in canAccessWifiState_hasPermission_returnTrue() 90 when(mPackageManager.checkPermission(ACCESS_FINE_LOCATION, LAUNCHED_PACKAGE)) in canAccessFineLocation_noPermission_returnFalse() 98 when(mPackageManager.checkPermission(ACCESS_FINE_LOCATION, LAUNCHED_PACKAGE)) in canAccessFineLocation_hasPermission_returnTrue()
|
/frameworks/base/core/java/android/permission/ |
D | PermissionCheckerManager.java | 113 public int checkPermission(@NonNull String permission, in checkPermission() method in PermissionCheckerManager 125 return mContext.checkPermission(permission, attributionSource.next[0].pid, in checkPermission() 130 return (mContext.checkPermission(permission, attributionSource.pid, in checkPermission() 136 return mService.checkPermission(permission, attributionSource, message, forDataDelivery, in checkPermission()
|
/frameworks/base/ravenwood/junit-impl-src/android/platform/test/ravenwood/ |
D | RavenwoodPermissionEnforcer.java | 26 protected int checkPermission(String permission, AttributionSource source) { in checkPermission() method in RavenwoodPermissionEnforcer 33 protected int checkPermission(String permission, int pid, int uid) { in checkPermission() method in RavenwoodPermissionEnforcer
|
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ |
D | PermissionHelperTest.java | 93 when(mContext.checkPermission(anyString(), anyInt(), anyInt())) in testHasPermission() 98 when(mContext.checkPermission(anyString(), anyInt(), anyInt())) in testHasPermission() 245 when(mContext.checkPermission(anyString(), anyInt(), anyInt())) in testSetNotificationPermission_grantUserSet() 260 when(mContext.checkPermission(anyString(), anyInt(), anyInt())) in testSetNotificationPermission_pkgPerm_grantedByDefaultPermSet_allUserSet() 279 when(mContext.checkPermission(anyString(), anyInt(), anyInt())) in testSetNotificationPermission_revokeUserSet() 294 when(mContext.checkPermission(anyString(), anyInt(), anyInt())) in testSetNotificationPermission_grantNotUserSet() 308 when(mContext.checkPermission(anyString(), anyInt(), anyInt())) in testSetNotificationPermission_revokeNotUserSet() 348 when(mContext.checkPermission(anyString(), anyInt(), anyInt())) in testSetNotificationPermission_alreadyGrantedNotRegranted() 359 when(mContext.checkPermission(anyString(), anyInt(), anyInt())) in testSetNotificationPermission_alreadyRevokedNotRerevoked() 371 when(mContext.checkPermission(anyString(), anyInt(), anyInt())) in testSetNotificationPermission_doesntRequestNotChanged() [all …]
|
/frameworks/av/media/utils/ |
D | ServiceUtilities.cpp | 218 bool ok = PermissionCache::checkPermission(sCaptureMediaOutput, pid, uid); in captureMediaOutputAllowed() 228 bool ok = PermissionCache::checkPermission(sCaptureTunerAudioInput, pid, uid); in captureTunerAudioInputAllowed() 239 bool ok = PermissionCache::checkPermission(sCaptureVoiceCommOutput, pid, uid); in captureVoiceCommunicationOutputAllowed() 250 bool ok = PermissionCache::checkPermission(sAccessUltrasound, pid, uid); in accessUltrasoundAllowed() 291 bool ok = PermissionCache::checkPermission(sModifyAudioRouting, pid, uid); in modifyAudioRoutingAllowed() 309 bool ok = PermissionCache::checkPermission(sModifyDefaultAudioEffectsAllowed, pid, uid); in modifyDefaultAudioEffectsAllowed() 327 bool ok = PermissionCache::checkPermission(sModifyPhoneState, pid, uid); in modifyPhoneStateAllowed() 337 bool ok = PermissionCache::checkPermission(sModifyPhoneState, pid, uid) in bypassInterruptionPolicyAllowed() 338 || PermissionCache::checkPermission(sWriteSecureSettings, pid, uid) in bypassInterruptionPolicyAllowed() 339 || PermissionCache::checkPermission(sModifyAudioRouting, pid, uid); in bypassInterruptionPolicyAllowed() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/tv/ |
D | TvRemoteProviderWatcherTest.java | 71 when(mMockPackageManager.checkPermission( in setUp() 76 when(mMockPackageManager.checkPermission( in setUp() 81 when(mMockPackageManager.checkPermission(Manifest.permission.TV_VIRTUAL_REMOTE_CONTROLLER, in setUp() 143 when(mMockPackageManager.checkPermission(anyString(), anyString())).thenReturn( in packageManagerPermissionIsRequired()
|
/frameworks/native/libs/binder/ |
D | PermissionCache.cpp | 88 return PermissionCache::checkPermission(permission, pid, uid); in checkCallingPermission() 91 bool PermissionCache::checkPermission( in checkPermission() function in android::PermissionCache 102 granted = android::checkPermission(permission, pid, uid); in checkPermission()
|
D | PermissionController.cpp | 56 bool PermissionController::checkPermission(const String16& permission, int32_t pid, int32_t uid) in checkPermission() function in android::PermissionController 59 return service != nullptr ? service->checkPermission(permission, pid, uid) : false; in checkPermission()
|
/frameworks/base/services/usb/java/com/android/server/usb/ |
D | UsbSerialReader.java | 92 if (mContext.checkPermission(android.Manifest.permission.MANAGE_USB, pid, uid) in getSerial() 98 .checkPermission((UsbDevice) mDevice, packageName, pid, uid); in getSerial() 101 .checkPermission((UsbAccessory) mDevice, pid, uid); in getSerial()
|
/frameworks/base/tests/utils/testutils/java/android/os/test/ |
D | FakePermissionEnforcer.java | 59 protected int checkPermission(@NonNull String permission, in checkPermission() method in FakePermissionEnforcer 65 protected int checkPermission(@NonNull String permission, int pid, int uid) { in checkPermission() method in FakePermissionEnforcer
|
/frameworks/base/services/core/java/com/android/server/location/ |
D | LocationPermissions.java | 139 if (context.checkPermission(LOCATION_BYPASS, pid, uid) == PERMISSION_GRANTED) { in enforceBypassPermission() 188 if (context.checkPermission(ACCESS_FINE_LOCATION, pid, uid) == PERMISSION_GRANTED) { in getPermissionLevel() 191 if (context.checkPermission(ACCESS_COARSE_LOCATION, pid, uid) == PERMISSION_GRANTED) { in getPermissionLevel()
|
/frameworks/base/services/tests/uiservicestests/src/com/android/server/slice/ |
D | SliceManagerServiceTest.java | 124 when(mContextSpy.checkPermission("perm1", Process.myPid(), Process.myUid())) in testCheckAutoGrantPermissions() 126 when(mContextSpy.checkPermission("perm2", Process.myPid(), Process.myUid())) in testCheckAutoGrantPermissions() 131 verify(mContextSpy).checkPermission(eq("perm1"), eq(Process.myPid()), eq(Process.myUid())); in testCheckAutoGrantPermissions() 132 verify(mContextSpy).checkPermission(eq("perm2"), eq(Process.myPid()), eq(Process.myUid())); in testCheckAutoGrantPermissions()
|
/frameworks/base/services/core/java/com/android/server/wm/ |
D | SafeActivityOptions.java | 277 final int startInTaskPerm = ActivityTaskManagerService.checkPermission( in checkPermissions() 289 && ActivityTaskManagerService.checkPermission( in checkPermissions() 334 final int startTasksFromRecentsPerm = ActivityTaskManagerService.checkPermission( in checkPermissions() 350 final int controlKeyguardPerm = ActivityTaskManagerService.checkPermission( in checkPermissions() 363 if (adapter != null && supervisor.mService.checkPermission( in checkPermissions() 375 if (transition != null && supervisor.mService.checkPermission( in checkPermissions() 466 final int statusBarPerm = ActivityTaskManagerService.checkPermission( in isSystemOrSystemUI()
|
/frameworks/base/services/core/java/com/android/server/dreams/ |
D | DreamManagerService.java | 800 private void checkPermission(String permission) { in checkPermission() method in DreamManagerService 906 checkPermission(android.Manifest.permission.READ_DREAM_STATE); in getDreamComponentsForUser() 920 checkPermission(android.Manifest.permission.WRITE_DREAM_STATE); in setDreamComponents() 933 checkPermission(android.Manifest.permission.WRITE_DREAM_STATE); in setDreamComponentsForUser() 947 checkPermission(android.Manifest.permission.WRITE_DREAM_STATE); in setSystemDreamComponent() 959 checkPermission(android.Manifest.permission.WRITE_DREAM_STATE); in registerDreamOverlayService() 968 checkPermission(android.Manifest.permission.READ_DREAM_STATE); in getDefaultDreamComponentForUser() 982 checkPermission(android.Manifest.permission.READ_DREAM_STATE); in isDreaming() 994 checkPermission(android.Manifest.permission.READ_DREAM_STATE); in isDreamingOrInPreview() 1007 checkPermission(android.Manifest.permission.WRITE_DREAM_STATE); in dream() [all …]
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/pm/ |
D | DeletePackageHelperTest.kt | 117 whenever(mPms.checkPermission(CONTROL_KEYGUARD, "a.data.package", USER_SYSTEM)) in deleteSystemPackageSucceedsIfAdmin() 139 whenever(mPms.checkPermission(CONTROL_KEYGUARD, "a.data.package", USER_SYSTEM)) in deleteSystemPackageSucceedsIfProfileOfAdmin() 157 whenever(mPms.checkPermission(CONTROL_KEYGUARD, "a.data.package", USER_SYSTEM)) in deleteSystemPackageSucceedsIfNotAdminButDeleteSystemAppSpecified() 172 whenever(mPms.checkPermission(CONTROL_KEYGUARD, "a.data.package", USER_SYSTEM)) in deleteSystemPackageWithKeyguard_fails()
|
/frameworks/base/services/core/java/com/android/server/pm/permission/ |
D | PermissionManagerService.java | 226 public int checkPermission(String packageName, String permissionName, String persistentDeviceId, in checkPermission() method in PermissionManagerService 239 return mPermissionManagerServiceImpl.checkPermission(packageName, permissionName, in checkPermission() 242 return checkPermissionDelegate.checkPermission(packageName, permissionName, in checkPermission() 243 persistentDeviceId, userId, mPermissionManagerServiceImpl::checkPermission); in checkPermission() 627 public int checkPermission(@NonNull String packageName, @NonNull String permissionName, in checkPermission() method in PermissionManagerService.PermissionManagerServiceInternalImpl 629 return PermissionManagerService.this.checkPermission(packageName, permissionName, in checkPermission() 901 if (sourceUid != callingUid && mContext.checkPermission( in registerAttributionSource() 1005 public int checkPermission(@NonNull String permission, in checkPermission() method in PermissionManagerService.PermissionCheckerService 1013 final int result = checkPermission(mContext, mPermissionManagerServiceInternal, in checkPermission() 1125 private static int checkPermission(@NonNull Context context, in checkPermission() method in PermissionManagerService.PermissionCheckerService [all …]
|
/frameworks/base/tests/testables/tests/src/android/testing/ |
D | TestablePermissionsTest.java | 49 mContext.checkPermission(permission.INTERACT_ACROSS_USERS, 0, 0)); in testCheck() 51 mContext.checkPermission(permission.INTERACT_ACROSS_USERS_FULL, 0, 0)); in testCheck()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/permission/ |
D | LegacyPermissionManagerServiceTest.java | 131 when(mInjector.checkPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, in checkDeviceIdentifierAccess_hasPrivilegedPermission_returnsGranted() 225 when(mInjector.checkPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, in checkPhoneNumberAccess_hasPrivilegedPermission_returnsGranted() 349 when(mInjector.checkPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, in checkPhoneNumberAccess_nullPackageNameSystemUid_returnsGranted() 368 when(mInjector.checkPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, in checkPhoneNumberAccess_systemUidMismatchPackageUid_returnsGranted() 437 when(mInjector.checkPermission(anyString(), anyInt(), anyInt())).thenReturn( in setupAccessTest() 461 when(mInjector.checkPermission(permission, APP_PID, APP_UID)).thenReturn( in grantPermissionAndAppop()
|