Home
last modified time | relevance | path

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

12

/frameworks/opt/net/wifi/service/java/com/android/server/wifi/aware/
DWifiAwareClientState.java225 boolean hasPermission = mWifiPermissionsUtil.checkCallersLocationPermission( in onInterfaceAddressChange()
227 if (VDBG) Log.v(TAG, "hasPermission=" + hasPermission); in onInterfaceAddressChange()
228 mCallback.onIdentityChanged(hasPermission ? mac : ALL_ZERO_MAC); in onInterfaceAddressChange()
260 boolean hasPermission = mWifiPermissionsUtil.checkCallersLocationPermission( in onClusterChange()
262 if (VDBG) Log.v(TAG, "hasPermission=" + hasPermission); in onClusterChange()
264 hasPermission ? currentDiscoveryInterfaceMac : ALL_ZERO_MAC); in onClusterChange()
/frameworks/base/tests/net/java/com/android/server/connectivity/
DPermissionMonitorTest.java209 assertFalse(mPermissionMonitor.hasPermission(app, CHANGE_NETWORK_STATE)); in testHasPermission()
210 assertFalse(mPermissionMonitor.hasPermission(app, NETWORK_STACK)); in testHasPermission()
211 assertFalse(mPermissionMonitor.hasPermission(app, CONNECTIVITY_USE_RESTRICTED_NETWORKS)); in testHasPermission()
212 assertFalse(mPermissionMonitor.hasPermission(app, CONNECTIVITY_INTERNAL)); in testHasPermission()
215 assertTrue(mPermissionMonitor.hasPermission(app, CHANGE_NETWORK_STATE)); in testHasPermission()
216 assertTrue(mPermissionMonitor.hasPermission(app, NETWORK_STACK)); in testHasPermission()
217 assertFalse(mPermissionMonitor.hasPermission(app, CONNECTIVITY_USE_RESTRICTED_NETWORKS)); in testHasPermission()
218 assertFalse(mPermissionMonitor.hasPermission(app, CONNECTIVITY_INTERNAL)); in testHasPermission()
222 assertFalse(mPermissionMonitor.hasPermission(app, CHANGE_NETWORK_STATE)); in testHasPermission()
223 assertFalse(mPermissionMonitor.hasPermission(app, NETWORK_STACK)); in testHasPermission()
[all …]
/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
167 return mUsbPermissionManager.hasPermission(device, uid); in hasPermission()
170 public boolean hasPermission(UsbAccessory accessory, int uid) { in hasPermission() method in UsbUserSettingsManager
171 return mUsbPermissionManager.hasPermission(accessory, uid); in hasPermission()
175 if (!hasPermission(device, packageName, uid)) { in checkPermission()
182 if (!hasPermission(accessory, uid)) { in checkPermission()
213 if (hasPermission(device, packageName, uid)) { in requestPermission()
243 if (hasPermission(accessory, uid)) { in requestPermission()
DUsbPermissionManager.java134 boolean hasPermission(@NonNull UsbDevice device, int uid) { in hasPermission() method in UsbPermissionManager
154 boolean hasPermission(@NonNull UsbAccessory accessory, int uid) { in hasPermission() method in UsbPermissionManager
/frameworks/base/tests/net/java/com/android/server/net/
DNetworkStatsAccessTest.java179 private void setHasAppOpsPermission(int appOpsMode, boolean hasPermission) { in setHasAppOpsPermission() argument
183 hasPermission ? PackageManager.PERMISSION_GRANTED in setHasAppOpsPermission()
187 private void setHasReadHistoryPermission(boolean hasPermission) { in setHasReadHistoryPermission() argument
189 .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/core/java/com/android/server/location/
DGnssStatusListenerHelper.java76 if (!hasPermission(mContext, callerIdentity)) { in onSvStatusChanged()
88 if (!hasPermission(mContext, callerIdentity)) { in onNmeaReceived()
DGnssMeasurementsProvider.java98 if (!hasPermission(mContext, callerIdentity)) { in onMeasurementsAvailable()
/frameworks/base/services/tests/uiservicestests/src/com/android/server/slice/
DSlicePermissionManagerTest.java66 assertTrue(permissions.hasPermission("my.pkg", 0, uri)); in testGrant()
106 assertTrue(permissions.hasPermission("com.android.otherpkg", 0, in testBackup()
109 assertFalse(permissions.hasPermission("com.android.otherpkg", 0, in testBackup()
DSliceClientPermissionsTest.java73 assertFalse(client.hasPermission(base.buildUpon() in testRemoveBasic()
104 assertFalse(client.hasPermission(base.buildUpon() in testRemoveSubtrees()
131 assertTrue(client.hasPermission(base.buildUpon() in testAddConsolidate_addFirst()
158 assertTrue(client.hasPermission(base.buildUpon() in testAddConsolidate_addSecond()
/frameworks/base/services/core/java/com/android/server/pm/permission/
DPermissionsState.java256 return !hasInstallPermission(name) && hasPermission(name, userId); in hasRuntimePermission()
266 return hasPermission(name, UserHandle.USER_ALL); in hasInstallPermission()
277 public boolean hasPermission(String name, int userId) { in hasPermission() method in PermissionsState
525 if (!hasPermission(permission, userId)) { in computeGids()
609 if (hasPermission(permission.getName(), userId)) { in grantPermission()
634 if (!hasPermission(permName, userId)) { in revokePermission()
/frameworks/base/services/core/java/com/android/server/connectivity/
DPermissionMonitor.java227 boolean hasPermission(@NonNull final PackageInfo app, @NonNull final String permission) { in hasPermission() method in PermissionMonitor
238 return hasPermission(app, CHANGE_NETWORK_STATE); in hasNetworkPermission()
257 return hasPermission(app, CONNECTIVITY_INTERNAL) in hasRestrictedNetworkPermission()
258 || hasPermission(app, NETWORK_STACK) in hasRestrictedNetworkPermission()
259 || hasPermission(app, CONNECTIVITY_USE_RESTRICTED_NETWORKS); in hasRestrictedNetworkPermission()
/frameworks/base/libs/usb/api/
Dcurrent.txt17 method public boolean hasPermission(com.android.future.usb.UsbAccessory);
/frameworks/base/services/usage/java/com/android/server/usage/
DUsageStatsService.java920 private boolean hasPermission(String callingPackage) { in hasPermission() method in UsageStatsService.BinderService
992 if (!hasPermission(callingPackage)) { in queryUsageStats()
1016 if (!hasPermission(callingPackage)) { in queryConfigurationStats()
1038 if (!hasPermission(callingPackage)) { in queryEventStats()
1059 if (!hasPermission(callingPackage)) { in queryEvents()
1083 final boolean includeTaskRoot = hasPermission(callingPackage); in queryEventsForPackage()
1097 if (!hasPermission(callingPackage)) { in queryEventsForUser()
1122 if (!hasPermission(callingPackage)) { in queryEventsForPackageForUser()
1196 if (!hasPermission(callingPackage)) { in getAppStandbyBucket()
1271 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/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/core/java/com/android/server/media/projection/
DMediaProjectionManagerService.java260 boolean hasPermission = false; in hasProjectionPermission()
262 hasPermission |= checkPermission(packageName, in hasProjectionPermission()
270 return hasPermission; in hasProjectionPermission()
/frameworks/base/services/net/java/android/net/
DNetworkStackClient.java332 final int hasPermission = in checkNetworkStackPermission() local
334 if (hasPermission != PERMISSION_GRANTED) { in checkNetworkStackPermission()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/euicc/
DEuiccConnectorTest.java355 boolean hasPermission, boolean requiresBindPermission, boolean hasPriority) { in prepareEuiccApp() argument
358 .thenReturn(hasPermission in prepareEuiccApp()
/frameworks/base/core/java/android/hardware/usb/
DUsbManager.java519 public boolean hasPermission(UsbDevice device) { in hasPermission() method in UsbManager
540 public boolean hasPermission(UsbAccessory accessory) { in hasPermission() method in UsbManager
/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()

12