Home
last modified time | relevance | path

Searched refs:hasPermission (Results 1 – 25 of 44) 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.java195 assertFalse(mPermissionMonitor.hasPermission(CHANGE_NETWORK_STATE, MOCK_UID1)); in testHasPermission()
196 assertFalse(mPermissionMonitor.hasPermission(NETWORK_STACK, MOCK_UID1)); in testHasPermission()
197 assertFalse(mPermissionMonitor.hasPermission( in testHasPermission()
199 assertFalse(mPermissionMonitor.hasPermission(CONNECTIVITY_INTERNAL, MOCK_UID1)); in testHasPermission()
202 assertTrue(mPermissionMonitor.hasPermission(CHANGE_NETWORK_STATE, MOCK_UID1)); in testHasPermission()
203 assertTrue(mPermissionMonitor.hasPermission(NETWORK_STACK, MOCK_UID1)); in testHasPermission()
204 assertFalse(mPermissionMonitor.hasPermission( in testHasPermission()
206 assertFalse(mPermissionMonitor.hasPermission(CONNECTIVITY_INTERNAL, MOCK_UID1)); in testHasPermission()
207 assertFalse(mPermissionMonitor.hasPermission(CHANGE_NETWORK_STATE, MOCK_UID2)); in testHasPermission()
208 assertFalse(mPermissionMonitor.hasPermission(NETWORK_STACK, MOCK_UID2)); in testHasPermission()
[all …]
/frameworks/base/services/usb/java/com/android/server/usb/
DUsbUserSettingsManager.java162 public boolean hasPermission(UsbDevice device, String packageName, int pid, int uid) { in hasPermission() method in UsbUserSettingsManager
169 return mUsbPermissionManager.hasPermission(device, uid); in hasPermission()
172 public boolean hasPermission(UsbAccessory accessory, int uid) { in hasPermission() method in UsbUserSettingsManager
173 return mUsbPermissionManager.hasPermission(accessory, uid); in hasPermission()
177 if (!hasPermission(device, packageName, pid, uid)) { in checkPermission()
184 if (!hasPermission(accessory, uid)) { in checkPermission()
216 if (hasPermission(device, packageName, pid, uid)) { in requestPermission()
246 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/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
/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/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/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/core/java/com/android/server/connectivity/
DPermissionMonitor.java173 final boolean isNetwork = hasPermission(CHANGE_NETWORK_STATE, uid); in startMonitoring()
223 boolean hasPermission(@NonNull final String permission, final int uid) { in hasPermission() method in PermissionMonitor
239 return hasPermission(PERMISSION_MAINLINE_NETWORK_STACK, appInfo.uid) in hasRestrictedNetworkPermission()
240 || hasPermission(NETWORK_STACK, appInfo.uid) in hasRestrictedNetworkPermission()
241 || hasPermission(CONNECTIVITY_USE_RESTRICTED_NETWORKS, appInfo.uid); in hasRestrictedNetworkPermission()
330 final boolean isNetwork = hasPermission(CHANGE_NETWORK_STATE, uid); in highestPermissionForUid()
462 if (hasPermission(INTERNET, uid)) { in getNetdPermissionMask()
465 if (hasPermission(UPDATE_DEVICE_STATS, uid)) { in getNetdPermissionMask()
/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/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/libs/usb/api/
Dcurrent.txt17 method public boolean hasPermission(com.android.future.usb.UsbAccessory);
/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/net/java/android/net/
DConnectivityModuleConnector.java288 final int hasPermission = in checkModuleServicePermission() local
290 if (hasPermission != PERMISSION_GRANTED) { in checkModuleServicePermission()
/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/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/tests/UsbHostExternalManagmentTest/AoapTestDevice/src/com/android/hardware/usb/aoapdevicetest/
DUsbAoapDeviceTestActivity.java97 if (!mUsbManager.hasPermission(accessory)) { in onAccessoryAttached()
/frameworks/base/core/java/android/hardware/usb/
DUsbManager.java561 public boolean hasPermission(UsbDevice device) { in hasPermission() method in UsbManager
582 public boolean hasPermission(UsbAccessory accessory) { in hasPermission() method in UsbManager
/frameworks/base/services/core/java/com/android/server/
DVibratorService.java531 if (!hasPermission(android.Manifest.permission.VIBRATE_ALWAYS_ON)) { in setAlwaysOnEffect()
602 if (!(hasPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) in fixupVibrationAttributes()
603 || hasPermission(android.Manifest.permission.MODIFY_PHONE_STATE) in fixupVibrationAttributes()
604 || hasPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING))) { in fixupVibrationAttributes()
631 if (!hasPermission(android.Manifest.permission.VIBRATE)) { in vibrate()
711 private boolean hasPermission(String permission) { in hasPermission() method in VibratorService
/frameworks/base/libs/usb/tests/AccessoryChat/src/com/android/accessorychat/
DAccessoryChat.java105 if (mUsbManager.hasPermission(accessory)) { in onResume()

12