Home
last modified time | relevance | path

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

12

/frameworks/base/tests/net/java/com/android/server/connectivity/
DPermissionMonitorTest.java82 assertFalse(mPermissionMonitor.hasPermission(app, CHANGE_NETWORK_STATE)); in testHasPermission()
83 assertFalse(mPermissionMonitor.hasPermission(app, NETWORK_STACK)); in testHasPermission()
84 assertFalse(mPermissionMonitor.hasPermission(app, CONNECTIVITY_USE_RESTRICTED_NETWORKS)); in testHasPermission()
85 assertFalse(mPermissionMonitor.hasPermission(app, CONNECTIVITY_INTERNAL)); in testHasPermission()
90 assertTrue(mPermissionMonitor.hasPermission(app, CHANGE_NETWORK_STATE)); in testHasPermission()
91 assertTrue(mPermissionMonitor.hasPermission(app, NETWORK_STACK)); in testHasPermission()
92 assertFalse(mPermissionMonitor.hasPermission(app, CONNECTIVITY_USE_RESTRICTED_NETWORKS)); in testHasPermission()
93 assertFalse(mPermissionMonitor.hasPermission(app, CONNECTIVITY_INTERNAL)); in testHasPermission()
98 assertFalse(mPermissionMonitor.hasPermission(app, CHANGE_NETWORK_STATE)); in testHasPermission()
99 assertFalse(mPermissionMonitor.hasPermission(app, NETWORK_STACK)); in testHasPermission()
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/aware/
DWifiAwareClientState.java222 boolean hasPermission = hasLocationingPermission(); in onInterfaceAddressChange()
223 if (VDBG) Log.v(TAG, "hasPermission=" + hasPermission); in onInterfaceAddressChange()
224 mCallback.onIdentityChanged(hasPermission ? mac : ALL_ZERO_MAC); in onInterfaceAddressChange()
256 boolean hasPermission = hasLocationingPermission(); in onClusterChange()
257 if (VDBG) Log.v(TAG, "hasPermission=" + hasPermission); in onClusterChange()
259 hasPermission ? currentDiscoveryInterfaceMac : ALL_ZERO_MAC); in onClusterChange()
/frameworks/base/services/core/java/com/android/server/connectivity/
DPermissionMonitor.java164 boolean hasPermission(PackageInfo app, String permission) { in hasPermission() method in PermissionMonitor
176 return hasPermission(app, CHANGE_NETWORK_STATE); in hasNetworkPermission()
181 return hasPermission(app, CONNECTIVITY_INTERNAL) in hasRestrictedNetworkPermission()
182 || hasPermission(app, CONNECTIVITY_USE_RESTRICTED_NETWORKS); in hasRestrictedNetworkPermission()
188 return hasPermission(app, CHANGE_NETWORK_STATE) in hasUseBackgroundNetworksPermission()
189 || hasPermission(app, CONNECTIVITY_USE_RESTRICTED_NETWORKS) in hasUseBackgroundNetworksPermission()
190 || hasPermission(app, CONNECTIVITY_INTERNAL) in hasUseBackgroundNetworksPermission()
191 || hasPermission(app, NETWORK_STACK) in hasUseBackgroundNetworksPermission()
/frameworks/base/services/usb/java/com/android/server/usb/
DUsbUserSettingsManager.java160 public boolean hasPermission(UsbDevice device, String packageName, int uid) { in hasPermission() method in UsbUserSettingsManager
178 public boolean hasPermission(UsbAccessory accessory) { in hasPermission() method in UsbUserSettingsManager
193 if (!hasPermission(device, packageName, uid)) { in checkPermission()
199 if (!hasPermission(accessory)) { in checkPermission()
238 if (hasPermission(device, packageName, uid)) { in requestPermission()
270 if (hasPermission(accessory)) { in requestPermission()
/frameworks/base/tests/net/java/com/android/server/net/
DNetworkStatsAccessTest.java178 private void setHasAppOpsPermission(int appOpsMode, boolean hasPermission) { in setHasAppOpsPermission() argument
182 hasPermission ? PackageManager.PERMISSION_GRANTED in setHasAppOpsPermission()
186 private void setHasReadHistoryPermission(boolean hasPermission) { in setHasReadHistoryPermission() argument
188 .thenReturn(hasPermission ? PackageManager.PERMISSION_GRANTED in setHasReadHistoryPermission()
/frameworks/base/services/core/java/com/android/server/slice/
DPinnedSliceState.java214 private boolean hasPermission; field in PinnedSliceState.ListenerInfo
218 public ListenerInfo(IBinder token, String pkg, boolean hasPermission, in ListenerInfo() argument
222 this.hasPermission = hasPermission; in ListenerInfo()
DSliceClientPermissions.java102 public synchronized boolean hasPermission(Uri uri, int userId) { in hasPermission() method in SliceClientPermissions
105 return authority != null && authority.hasPermission(uri.getPathSegments()); in hasPermission()
255 public boolean hasPermission(List<String> path) { in hasPermission() method in SliceClientPermissions.SliceAuthority
DSlicePermissionManager.java151 public boolean hasPermission(String pkg, int userId, Uri uri) { in hasPermission() method in SlicePermissionManager
156 || client.hasPermission(ContentProvider.getUriWithoutUserId(uri), providerUserId); in hasPermission()
/frameworks/base/services/tests/uiservicestests/src/com/android/server/slice/
DSlicePermissionManagerTest.java61 assertTrue(permissions.hasPermission("my.pkg", 0, uri)); in testGrant()
94 assertTrue(permissions.hasPermission("com.android.otherpkg", 0, in testBackup()
97 assertFalse(permissions.hasPermission("com.android.otherpkg", 0, in testBackup()
DSliceClientPermissionsTest.java72 assertFalse(client.hasPermission(base.buildUpon() in testRemoveBasic()
103 assertFalse(client.hasPermission(base.buildUpon() in testRemoveSubtrees()
130 assertTrue(client.hasPermission(base.buildUpon() in testAddConsolidate_addFirst()
157 assertTrue(client.hasPermission(base.buildUpon() in testAddConsolidate_addSecond()
/frameworks/base/services/core/java/com/android/server/pm/permission/
DPermissionsState.java245 return !hasInstallPermission(name) && hasPermission(name, userId); in hasRuntimePermission()
255 return hasPermission(name, UserHandle.USER_ALL); in hasInstallPermission()
266 public boolean hasPermission(String name, int userId) { in hasPermission() method in PermissionsState
486 if (!hasPermission(permission, userId)) { in computeGids()
560 if (hasPermission(permission.getName(), userId)) { in grantPermission()
585 if (!hasPermission(permName, userId)) { in revokePermission()
DPermissionManagerService.java224 if (permissionsState.hasPermission(permName, userId)) { in checkPermission()
238 .hasPermission(Manifest.permission.ACCESS_FINE_LOCATION, userId)) { in checkPermission()
268 if (permissionsState.hasPermission(permName, userId)) { in checkUidPermission()
279 .hasPermission(Manifest.permission.ACCESS_FINE_LOCATION, userId)) { in checkUidPermission()
1770 && (pkg == null || !hasPermission(pkg, bp.getName()))) { in updatePermissions()
1814 && (pkg == null || !hasPermission(pkg, bp.getName()))) { in updatePermissionTrees()
2025 private static boolean hasPermission(PackageParser.Package pkgInfo, String permName) { in hasPermission() method in PermissionManagerService
/frameworks/base/services/usage/java/com/android/server/usage/
DUsageStatsService.java672 private boolean hasPermission(String callingPackage) { in hasPermission() method in UsageStatsService.BinderService
728 if (!hasPermission(callingPackage)) { in queryUsageStats()
752 if (!hasPermission(callingPackage)) { in queryConfigurationStats()
774 if (!hasPermission(callingPackage)) { in queryEventStats()
795 if (!hasPermission(callingPackage)) { in queryEvents()
831 if (!hasPermission(callingPackage)) { in queryEventsForUser()
856 if (!hasPermission(callingPackage)) { in queryEventsForPackageForUser()
930 if (!hasPermission(callingPackage)) { in getAppStandbyBucket()
1004 if (!hasPermission(callingPackageName)) { in getAppStandbyBuckets()
/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/core/java/android/view/textclassifier/
DTextClassification.java313 if (exported && hasPermission(context, activityRI.activityInfo.permission)) {
324 if (exported && hasPermission(context, serviceRI.serviceInfo.permission)) {
332 private static boolean hasPermission(@NonNull Context context, @NonNull String permission) {
/frameworks/base/services/core/java/com/android/server/media/projection/
DMediaProjectionManagerService.java209 boolean hasPermission = false; in hasProjectionPermission()
211 hasPermission |= checkPermission(packageName, in hasProjectionPermission()
219 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/core/java/android/hardware/usb/
DUsbManager.java497 public boolean hasPermission(UsbDevice device) { in hasPermission() method in UsbManager
518 public boolean hasPermission(UsbAccessory accessory) { in hasPermission() method in UsbManager
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/euicc/
DEuiccConnectorTest.java351 boolean hasPermission, boolean requiresBindPermission, boolean hasPriority) { in prepareEuiccApp() argument
354 .thenReturn(hasPermission in prepareEuiccApp()
DEuiccControllerTest.java824 private void setHasWriteEmbeddedPermission(boolean hasPermission) { in setHasWriteEmbeddedPermission() argument
825 doReturn(hasPermission in setHasWriteEmbeddedPermission()
831 private void setHasMasterClearPermission(boolean hasPermission) { in setHasMasterClearPermission() argument
832 Stubber stubber = hasPermission ? doNothing() : doThrow(new SecurityException()); in setHasMasterClearPermission()
/frameworks/base/tests/UsbHostExternalManagmentTest/AoapTestDevice/src/com/android/hardware/usb/aoapdevicetest/
DUsbAoapDeviceTestActivity.java97 if (!mUsbManager.hasPermission(accessory)) { in onAccessoryAttached()
/frameworks/base/libs/usb/tests/AccessoryChat/src/com/android/accessorychat/
DAccessoryChat.java105 if (mUsbManager.hasPermission(accessory)) { in onResume()
/frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/
DSourceActivity.java142 if (!mUsbManager.hasPermission(accessory)) { in connect()
/frameworks/base/media/tests/CameraBrowser/src/com/android/camerabrowser/
DMtpClient.java173 if (!mUsbManager.hasPermission(usbDevice)) { in openDeviceLocked()

12