Home
last modified time | relevance | path

Searched refs:hasPermission (Results 1 – 23 of 23) sorted by relevance

/frameworks/base/services/tests/servicestests/src/com/android/server/net/
DNetworkStatsAccessTest.java165 private void setHasAppOpsPermission(int appOpsMode, boolean hasPermission) { in setHasAppOpsPermission() argument
169 hasPermission ? PackageManager.PERMISSION_GRANTED in setHasAppOpsPermission()
173 private void setHasReadHistoryPermission(boolean hasPermission) { in setHasReadHistoryPermission() argument
175 .thenReturn(hasPermission ? PackageManager.PERMISSION_GRANTED in setHasReadHistoryPermission()
/frameworks/base/services/core/java/com/android/server/connectivity/
DPermissionMonitor.java153 private boolean hasPermission(PackageInfo app, String permission) { in hasPermission() method in PermissionMonitor
165 return hasPermission(app, CHANGE_NETWORK_STATE); in hasNetworkPermission()
173 return hasPermission(app, CONNECTIVITY_INTERNAL) in hasRestrictedNetworkPermission()
174 || hasPermission(app, CONNECTIVITY_USE_RESTRICTED_NETWORKS); in hasRestrictedNetworkPermission()
/frameworks/base/services/core/java/com/android/server/pm/
DPermissionsState.java215 return !hasInstallPermission(name) && hasPermission(name, userId); in hasRuntimePermission()
225 return hasPermission(name, UserHandle.USER_ALL); in hasInstallPermission()
236 public boolean hasPermission(String name, int userId) { in hasPermission() method in PermissionsState
444 if (!hasPermission(permission, userId)) { in computeGids()
518 if (hasPermission(permission.name, userId)) { in grantPermission()
542 if (!hasPermission(permission.name, userId)) { in revokePermission()
DPackageManagerService.java3727 if (permissionsState.hasPermission(permName, userId)) {
3732 .hasPermission(Manifest.permission.ACCESS_FINE_LOCATION, userId)) {
3754 if (permissionsState.hasPermission(permName, userId)) {
3759 .hasPermission(Manifest.permission.ACCESS_FINE_LOCATION, userId)) {
6234 if (permissionsState.hasPermission(permission, userId)) { in addPackageHoldingPermissions()
9825 private static boolean hasPermission(PackageParser.Package pkgInfo, String perm) { in hasPermission() method
9871 if (pkgInfo == null || !hasPermission(pkgInfo, bp.name)) { in updatePermissionsLPw()
9911 if (pkgInfo == null || !hasPermission(pkgInfo, bp.name)) { in updatePermissionsLPw()
/frameworks/base/core/java/android/hardware/usb/
DUsbManager.java387 public boolean hasPermission(UsbDevice device) { in hasPermission() method in UsbManager
404 public boolean hasPermission(UsbAccessory accessory) { in hasPermission() method in UsbManager
/frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/
DMtpManager.java87 if (!mManager.hasPermission(rawDevice)) { in openDevice()
89 if (!mManager.hasPermission(rawDevice)) { in openDevice()
/frameworks/base/services/core/java/com/android/server/media/projection/
DMediaProjectionManagerService.java208 boolean hasPermission = false; in hasProjectionPermission()
210 hasPermission |= checkPermission(packageName, in hasProjectionPermission()
218 return hasPermission; in hasProjectionPermission()
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/
DTestUtil.java94 if (usbManager.hasPermission(device)) { in findMtpDevice()
/frameworks/base/libs/usb/src/com/android/future/usb/
DUsbManager.java150 public boolean hasPermission(UsbAccessory accessory) { in hasPermission() method in UsbManager
/frameworks/base/services/usb/java/com/android/server/usb/
DUsbSettingsManager.java1001 public boolean hasPermission(UsbDevice device) { in hasPermission() method in UsbSettingsManager
1015 public boolean hasPermission(UsbAccessory accessory) { in hasPermission() method in UsbSettingsManager
1030 if (!hasPermission(device)) { in checkPermission()
1036 if (!hasPermission(accessory)) { in checkPermission()
1075 if (hasPermission(device)) { in requestPermission()
1095 if (hasPermission(accessory)) { in requestPermission()
DUsbService.java235 return getSettingsForUser(userId).hasPermission(device); in hasDevicePermission()
241 return getSettingsForUser(userId).hasPermission(accessory); in hasAccessoryPermission()
/frameworks/base/libs/usb/tests/AccessoryChat/src/com/android/accessorychat/
DAccessoryChat.java105 if (mUsbManager.hasPermission(accessory)) { in onResume()
/frameworks/native/services/sensorservice/
DSensorService.cpp1262 bool hasPermission = false; in canAccessSensor() local
1266 hasPermission = checkPermission(String16(requiredPermission), in canAccessSensor()
1269 hasPermission = PermissionCache::checkCallingPermission(String16(requiredPermission)); in canAccessSensor()
1272 if (!hasPermission) { in canAccessSensor()
/frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/
DSourceActivity.java142 if (!mUsbManager.hasPermission(accessory)) { in connect()
/frameworks/base/services/usage/java/com/android/server/usage/
DUsageStatsService.java1237 private boolean hasPermission(String callingPackage) { in hasPermission() method in UsageStatsService.BinderService
1256 if (!hasPermission(callingPackage)) { in queryUsageStats()
1277 if (!hasPermission(callingPackage)) { in queryConfigurationStats()
1298 if (!hasPermission(callingPackage)) { in queryEvents()
/frameworks/base/media/tests/CameraBrowser/src/com/android/camerabrowser/
DMtpClient.java173 if (!mUsbManager.hasPermission(usbDevice)) { in openDeviceLocked()
/frameworks/base/services/core/java/com/android/server/fingerprint/
DFingerprintService.java445 boolean hasPermission(String permission) { in hasPermission() method in FingerprintService
789 final boolean restricted = !hasPermission(MANAGE_FINGERPRINT); in isRestricted()
/frameworks/base/tests/AccessoryDisplay/sink/src/com/android/accessorydisplay/sink/
DSinkActivity.java165 if (!mUsbManager.hasPermission(device)) { in connect()
/frameworks/base/services/accessibility/java/com/android/server/accessibility/
DAccessibilityManagerService.java4128 if (!hasPermission(Manifest.permission.INTERACT_ACROSS_USERS) in resolveCallingUserIdEnforcingPermissionsLocked()
4129 && !hasPermission(Manifest.permission.INTERACT_ACROSS_USERS_FULL)) { in resolveCallingUserIdEnforcingPermissionsLocked()
4178 if (!hasPermission(permission)) { in enforceCallingPermission()
4185 private boolean hasPermission(String permission) { in hasPermission() method in AccessibilityManagerService.SecurityPolicy
/frameworks/opt/setupwizard/tools/docs/
Dandroid-22.txt13367 method public boolean hasPermission(android.hardware.usb.UsbDevice);
13368 method public boolean hasPermission(android.hardware.usb.UsbAccessory);
/frameworks/base/api/
Dcurrent.txt14758 method public boolean hasPermission(android.hardware.usb.UsbDevice);
14759 method public boolean hasPermission(android.hardware.usb.UsbAccessory);
Dsystem-current.txt15968 method public boolean hasPermission(android.hardware.usb.UsbDevice);
15969 method public boolean hasPermission(android.hardware.usb.UsbAccessory);
Dtest-current.txt14776 method public boolean hasPermission(android.hardware.usb.UsbDevice);
14777 method public boolean hasPermission(android.hardware.usb.UsbAccessory);