/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/p2p/ |
D | WifiP2pServiceImplTest.java | 271 @Mock WifiPermissionsUtil mWifiPermissionsUtil; field in WifiP2pServiceImplTest 376 when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(isLocationModeEnabled); in simulateLocationModeChange() 1091 when(mWifiPermissionsUtil.isTargetSdkLessThan(any(), in setTargetSdkGreaterThanT() 1284 if (mWifiPermissionsUtil.isLocationModeEnabled()) { in checkSendThisDeviceChangedBroadcast() 1317 if (mWifiPermissionsUtil.isLocationModeEnabled()) { in checkSendThisDeviceChangedBroadcast() 1440 when(mWifiInjector.getWifiPermissionsUtil()).thenReturn(mWifiPermissionsUtil); in setUpWifiP2pServiceImpl() 1456 when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(true); in setUpWifiP2pServiceImpl() 1457 when(mWifiPermissionsUtil.checkNetworkStackPermission(anyInt())).thenReturn(true); in setUpWifiP2pServiceImpl() 1458 when(mWifiPermissionsUtil.checkReadWifiCredentialPermission(anyInt())).thenReturn(true); in setUpWifiP2pServiceImpl() 1459 when(mWifiPermissionsUtil.checkConfigOverridePermission(anyInt())).thenReturn(true); in setUpWifiP2pServiceImpl() [all …]
|
/packages/modules/Wifi/service/java/com/android/server/wifi/aware/ |
D | WifiAwareServiceImpl.java | 86 private WifiPermissionsUtil mWifiPermissionsUtil; field in WifiAwareServiceImpl 130 mWifiPermissionsUtil = wifiPermissionsUtil; in start() 216 mWifiPermissionsUtil.checkPackage(uid, callingPackage); in enableInstantCommunicationMode() 217 if (!mWifiPermissionsUtil.isSystem(callingPackage, uid) in enableInstantCommunicationMode() 218 && !mWifiPermissionsUtil.checkConfigOverridePermission(uid)) { in enableInstantCommunicationMode() 242 if (!mWifiPermissionsUtil.checkConfigOverridePermission(uid)) { in setAwareParams() 252 mWifiPermissionsUtil.checkPackage(uid, callingPackage); in resetPairedDevices() 263 mWifiPermissionsUtil.checkPackage(uid, callingPackage); in removePairedDevice() 277 mWifiPermissionsUtil.checkPackage(uid, callingPackage); in getPairedDevices() 285 mWifiPermissionsUtil.checkPackage(uid, callingPackage); in setOpportunisticModeEnabled() [all …]
|
D | WifiAwareClientState.java | 65 private final WifiPermissionsUtil mWifiPermissionsUtil; field in WifiAwareClientState 96 mWifiPermissionsUtil = wifiPermissionsUtil; in WifiAwareClientState() 261 boolean hasPermission = mWifiPermissionsUtil.checkCallersLocationPermission( in onInterfaceAddressChange() 304 boolean hasPermission = mWifiPermissionsUtil.checkCallersLocationPermission( in onClusterChange()
|
/packages/modules/Wifi/service/java/com/android/server/wifi/ |
D | WifiServiceImpl.java | 319 private final WifiPermissionsUtil mWifiPermissionsUtil; field in WifiServiceImpl 541 mWifiPermissionsUtil = mWifiInjector.getWifiPermissionsUtil(); in WifiServiceImpl() 748 mIsLocationModeEnabled = mWifiPermissionsUtil.isLocationModeEnabled(); in updateLocationMode() 925 mWifiPermissionsUtil.checkPackage(callingUid, packageName); in startScan() 944 mWifiPermissionsUtil.enforceCanAccessScanResults(packageName, featureId, callingUid, in startScan() 1085 || mWifiPermissionsUtil.isSignedWithPlatformKey(uid); in isPrivileged() 1099 return mWifiPermissionsUtil.isDeviceOwner(uid, packageName) in isDeviceOrProfileOwner() 1100 || mWifiPermissionsUtil.isProfileOwner(uid, packageName); in isDeviceOrProfileOwner() 1185 mWifiPermissionsUtil.enforceLocationPermission(pkgName, featureId, uid); in enforceLocationPermission() 1190 mWifiPermissionsUtil.enforceCoarseLocationPermission(pkgName, featureId, uid); in enforceCoarseLocationPermission() [all …]
|
D | MultiInternetWifiNetworkFactory.java | 46 private final WifiPermissionsUtil mWifiPermissionsUtil; field in MultiInternetWifiNetworkFactory 122 mWifiPermissionsUtil = wifiPermissionsUtil; in MultiInternetWifiNetworkFactory() 143 boolean isFromSetting = mWifiPermissionsUtil.checkNetworkSettingsPermission(uid) in acceptRequest() 144 || mWifiPermissionsUtil.checkNetworkSetupWizardPermission(uid); in acceptRequest() 149 boolean isFromNetworkStack = mWifiPermissionsUtil.checkNetworkStackPermission(uid) in acceptRequest() 150 || mWifiPermissionsUtil.checkMainlineNetworkStackPermission(uid); in acceptRequest() 169 boolean isFromSetting = mWifiPermissionsUtil.checkNetworkSettingsPermission( in needNetworkFor() 213 boolean isFromSetting = mWifiPermissionsUtil.checkNetworkSettingsPermission( in releaseNetworkFor()
|
D | WifiInjector.java | 207 private final WifiPermissionsUtil mWifiPermissionsUtil; field in WifiInjector 322 mWifiPermissionsUtil = new WifiPermissionsUtil(mWifiPermissionsWrapper, mContext, in WifiInjector() 324 mWifiBackupRestore = new WifiBackupRestore(mWifiPermissionsUtil); in WifiInjector() 427 mWifiPermissionsUtil, in WifiInjector() 456 this, mWifiConfigManager, mWifiPermissionsUtil, mWifiMetrics, mClock, in WifiInjector() 475 this, mWifiPermissionsUtil, mWifiConfigManager, mWifiConfigStore, mWifiMetrics, in WifiInjector() 481 mWifiCarrierInfoManager, mMacAddressUtil, mWifiPermissionsUtil); in WifiInjector() 489 mWifiPseudonymManager, mWifiPermissionsUtil, mWifiNetworkSuggestionsManager); in WifiInjector() 502 mWifiConfigManager, mContext, mDppMetrics, mScanRequestProxy, mWifiPermissionsUtil); in WifiInjector() 505 mContext, mSettingsStore, mFrameworkFacade, mWifiPermissionsUtil, mWifiMetrics, in WifiInjector() [all …]
|
D | WifiConfigManager.java | 304 private final WifiPermissionsUtil mWifiPermissionsUtil; field in WifiConfigManager 446 mWifiPermissionsUtil = wifiInjector.getWifiPermissionsUtil(); in WifiConfigManager() 456 mConfiguredNetworks = new ConfigurationMap(mWifiPermissionsUtil); in WifiConfigManager() 1059 mWifiPermissionsUtil.isOrganizationOwnedDeviceAdmin(uid, packageName); in canModifyNetwork() 1072 mWifiPermissionsUtil.isOrganizationOwnedDeviceAdmin(config.creatorUid, in canModifyNetwork() 1078 || mWifiPermissionsUtil.checkNetworkSettingsPermission(uid) in canModifyNetwork() 1079 || mWifiPermissionsUtil.checkNetworkSetupWizardPermission(uid) in canModifyNetwork() 1080 || mWifiPermissionsUtil.checkConfigOverridePermission(uid); in canModifyNetwork() 1088 && (mWifiPermissionsUtil.checkNetworkSettingsPermission(uid) in canModifyNetwork() 1089 || mWifiPermissionsUtil.checkNetworkSetupWizardPermission(uid) in canModifyNetwork() [all …]
|
D | ConfigurationMap.java | 42 @NonNull private final WifiPermissionsUtil mWifiPermissionsUtil; field in ConfigurationMap 47 mWifiPermissionsUtil = wifiPermissionsUtil; in ConfigurationMap() 62 if (config.shared || mWifiPermissionsUtil in put()
|
D | SavedNetworkNominator.java | 43 private final WifiPermissionsUtil mWifiPermissionsUtil; field in SavedNetworkNominator 56 mWifiPermissionsUtil = wifiPermissionsUtil; in SavedNetworkNominator() 276 if (mWifiPermissionsUtil.checkNetworkSettingsPermission(creatorUid) in isImsiProtectionApprovalNeeded() 277 || mWifiPermissionsUtil.checkNetworkSetupWizardPermission(creatorUid)) { in isImsiProtectionApprovalNeeded()
|
D | WifiLockManager.java | 96 private final WifiPermissionsUtil mWifiPermissionsUtil; field in WifiLockManager 127 mWifiPermissionsUtil = wifiPermissionsUtil; in WifiLockManager() 490 if (mWifiPermissionsUtil.checkRequestCompanionProfileAutomotiveProjectionPermission(uid) in isAppExemptedFromImportance() 520 if (mWifiPermissionsUtil.checkRequestCompanionProfileAutomotiveProjectionPermission(uid)) { in isAppExemptedFromScreenOn() 680 mWifiPermissionsUtil.getWifiCallerType(wifiLock.getUid(), in releaseLock() 698 mWifiPermissionsUtil.getWifiCallerType(wifiLock.getUid(), in releaseLock()
|
D | WifiNetworkFactory.java | 141 private final WifiPermissionsUtil mWifiPermissionsUtil; field in WifiNetworkFactory 583 mWifiPermissionsUtil = wifiPermissionsUtil; in WifiNetworkFactory() 704 if (mWifiPermissionsUtil.checkNetworkSettingsPermission(newRequest.getRequestorUid())) { in canNewRequestOverrideExistingRequest() 774 boolean isFromSetting = mWifiPermissionsUtil.checkNetworkSettingsPermission( in acceptRequest() 796 if (mWifiPermissionsUtil.isGuestUser()) { in acceptRequest() 807 if (!mWifiPermissionsUtil.checkNetworkSettingsPermission( in acceptRequest() 856 boolean isFromSetting = mWifiPermissionsUtil.checkNetworkSettingsPermission( in needNetworkFor() 881 if (mWifiPermissionsUtil.isGuestUser()) { in needNetworkFor() 918 && !mWifiPermissionsUtil.isTargetSdkLessThan( in needNetworkFor() 1189 if (mWifiPermissionsUtil.checkEnterCarModePrioritized(mActiveSpecificNetworkRequest in handleConnectToNetworkUserSelectionInternal() [all …]
|
D | WakeupController.java | 76 private final WifiPermissionsUtil mWifiPermissionsUtil; field in WakeupController 168 mWifiPermissionsUtil = wifiInjector.getWifiPermissionsUtil(); in WakeupController() 243 && mWifiPermissionsUtil.isLocationModeEnabled(); in isUsable()
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/ |
D | WifiServiceImplTest.java | 414 @Mock WifiPermissionsUtil mWifiPermissionsUtil; field in WifiServiceImplTest 598 when(mWifiInjector.getWifiPermissionsUtil()).thenReturn(mWifiPermissionsUtil); in setUp() 657 when(mWifiPermissionsUtil.isSystem(anyString(), anyInt())).thenReturn(false); in setUp() 661 when(mWifiPermissionsUtil.doesUidBelongToCurrentUserOrDeviceOwner(anyInt())) in setUp() 665 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), in setUp() 667 when(mWifiPermissionsUtil.isTargetSdkLessThan(any(), in setUp() 819 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), in testRemoveNetworkFailureAppBelowQSdk() 888 when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(true); in testSetWifiEnabledMetricsPrivilegedApp() 917 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), in testSetWifiEnabledMetricsNormalAppBelowQSdk() 939 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), in testSetWifiEnabledMetricsNormalAppTargetingQSdkNoIncrement() [all …]
|
D | WifiConfigManagerTest.java | 189 @Mock private WifiPermissionsUtil mWifiPermissionsUtil; field in WifiConfigManagerTest 318 when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(true); in setUp() 320 when(mWifiPermissionsUtil.isProfileOwner(anyInt(), any())).thenReturn(false); in setUp() 321 when(mWifiPermissionsUtil.doesUidBelongToCurrentUserOrDeviceOwner(anyInt())) in setUp() 323 when(mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(anyInt())) in setUp() 325 when(mWifiPermissionsUtil.isDeviceInDemoMode(any())).thenReturn(false); in setUp() 326 when(mWifiPermissionsUtil.isSystem(any(), anyInt())).thenReturn(true); in setUp() 350 when(mWifiInjector.getWifiPermissionsUtil()).thenReturn(mWifiPermissionsUtil); in setUp() 396 when(mWifiPermissionsUtil.isDeviceOwner(anyInt(), any())).thenReturn(result); in mockIsDeviceOwner() 397 when(mWifiPermissionsUtil.isDeviceOwner(anyInt())).thenReturn(result); in mockIsDeviceOwner() [all …]
|
D | WifiNetworkSuggestionsManagerTest.java | 171 private @Mock WifiPermissionsUtil mWifiPermissionsUtil; field in WifiNetworkSuggestionsManagerTest 224 mInorder = inOrder(mContext, mWifiPermissionsUtil); in setUp() 262 when(mWifiPermissionsUtil.doesUidBelongToCurrentUserOrDeviceOwner(anyInt())) in setUp() 310 mWifiPermissionsUtil, in setUp() 739 when(mWifiPermissionsUtil.checkNetworkCarrierProvisioningPermission(TEST_UID_1)) in testAddNetworkSuggestionsSuccessOnInPlaceModificationWhenNotInWcm() 999 when(mWifiPermissionsUtil.checkNetworkCarrierProvisioningPermission(TEST_UID_1)) in testGetNetworkSuggestionsForScanDetailSuccessWithOneMatchForCarrierProvisioningApp() 1463 mInorder.verify(mWifiPermissionsUtil).enforceCanAccessScanResults(eq(TEST_PACKAGE_1), in testOnNetworkConnectionSuccessWithOneMatch() 1503 mInorder.verify(mWifiPermissionsUtil).enforceCanAccessScanResults(eq(TEST_PACKAGE_1), in testOnNetworkConnectionSuccessWithOneMatchFromCarrierPrivilegedApp() 1512 mInorder.verify(mWifiPermissionsUtil) in testOnNetworkConnectionSuccessWithOneMatchFromCarrierPrivilegedApp() 1528 when(mWifiPermissionsUtil.checkNetworkCarrierProvisioningPermission(TEST_UID_1)) in testOnSavedOpenNetworkConnectionSuccessWithMultipleMatch() [all …]
|
D | ConfigurationMapTest.java | 90 @Mock WifiPermissionsUtil mWifiPermissionsUtil; field in ConfigurationMapTest 118 when(mWifiPermissionsUtil.doesUidBelongToCurrentUserOrDeviceOwner(anyInt())) in setUp() 137 mConfigs = new ConfigurationMap(mWifiPermissionsUtil); in setUp() 187 if (config.shared || mWifiPermissionsUtil in verifyGetters()
|
D | AvailableNetworkNotifierTest.java | 61 @Mock WifiPermissionsUtil mWifiPermissionsUtil; field in AvailableNetworkNotifierTest 89 mWifiPermissionsUtil); in setUp()
|
D | ActiveModeWardenTest.java | 174 @Mock WifiPermissionsUtil mWifiPermissionsUtil; field in ActiveModeWardenTest 244 when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(true); in setUp() 276 when(mWifiPermissionsUtil.isSystem(TEST_PACKAGE, TEST_UID)).thenReturn(true); in setUp() 324 mWifiPermissionsUtil, in createActiveModeWarden() 425 when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(true); in enterScanOnlyModeActiveState() 507 when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(false); in enterStaDisabledMode() 816 when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(true); in testSwitchFromConnectModeToScanOnlyModeRemovesAdditionalCMMs() 1476 when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(false); in testDoesNotEnterScanModeWhenLocationModeDisabled() 1498 when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(false); in testEnterScanModeWhenLocationModeEnabled() 1515 when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(true); in testEnterScanModeWhenLocationModeEnabled() [all …]
|
D | MultiInternetWifiNetworkFactoryTest.java | 68 @Mock WifiPermissionsUtil mWifiPermissionsUtil; field in MultiInternetWifiNetworkFactoryTest 104 mAlarmManager, mWifiPermissionsUtil, mMultiInternetManager, in setUp() 199 when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(true); in testMultiInternetHandleNetworkRequestFromSettingsWithBssid()
|
D | OpenNetworkNotifierTest.java | 99 @Mock private WifiPermissionsUtil mWifiPermissionsUtil; field in OpenNetworkNotifierTest 131 mMakeBeforeBreakManager, mWifiNotificationManager, mWifiPermissionsUtil); in setUp() 149 when(mWifiPermissionsUtil.getCurrentUser()).thenReturn(UserHandle.USER_SYSTEM); in setUp() 477 UserHandle.of(mWifiPermissionsUtil.getCurrentUser()))) in userHasDisallowConfigWifiRestriction_notificationNotDisplayed() 501 UserHandle.of(mWifiPermissionsUtil.getCurrentUser()))) in userHasDisallowConfigWifiRestriction_showingNotificationIsCleared() 518 UserHandle.of(mWifiPermissionsUtil.getCurrentUser()))) in userHasDisallowAddWifiConfigRestriction_notificationNotDisplayed() 542 UserHandle.of(mWifiPermissionsUtil.getCurrentUser()))) in userHasDisallowAddWifiConfigRestriction_showingNotificationIsCleared()
|
/packages/modules/Wifi/service/java/com/android/server/wifi/util/ |
D | WorkSourceHelper.java | 50 private final WifiPermissionsUtil mWifiPermissionsUtil; field in WorkSourceHelper 123 mWifiPermissionsUtil = wifiPermissionsUtil; in WorkSourceHelper() 142 return mWifiPermissionsUtil.checkNetworkSettingsPermission(uid) in isPrivileged() 143 || mWifiPermissionsUtil.checkNetworkSetupWizardPermission(uid) in isPrivileged() 144 || mWifiPermissionsUtil.checkNetworkStackPermission(uid) in isPrivileged() 145 || mWifiPermissionsUtil.checkMainlineNetworkStackPermission(uid); in isPrivileged()
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/aware/ |
D | WifiAwareServiceImplTest.java | 128 @Mock private WifiPermissionsUtil mWifiPermissionsUtil; field in WifiAwareServiceImplTest 185 when(mWifiPermissionsUtil.isTargetSdkLessThan(any(), eq(Build.VERSION_CODES.TIRAMISU), in setup() 200 mAwareMetricsMock, mWifiPermissionsUtil, mPermissionsWrapperMock, in setup() 207 eq(mWifiPermissionsUtil), eq(mPermissionsWrapperMock), any(), any(), in setup() 243 when(mWifiPermissionsUtil.isSystem(anyString(), anyInt())).thenReturn(false); in testInstantCommunicationMode() 247 when(mWifiPermissionsUtil.isSystem(anyString(), anyInt())).thenReturn(true); in testInstantCommunicationMode() 294 when(mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(anyInt())) in testConnectWithManageNetworkSelectionPermission() 315 when(mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(anyInt())) in testConnectWithManageNetworkSelectionPermission() 519 verify(mWifiPermissionsUtil).enforceNearbyDevicesPermission(any(), eq(true), any()); in testPublishPostT() 527 doThrow(new SecurityException()).when(mWifiPermissionsUtil) in testPublishExceptionPostT() [all …]
|
D | WifiAwareMetricsTest.java | 72 @Mock private WifiPermissionsUtil mWifiPermissionsUtil; field in WifiAwareMetricsTest 268 mClock.getElapsedSinceBootMillis(), mWifiPermissionsUtil, null, in testAttachSessionMetrics() 275 mClock.getElapsedSinceBootMillis(), mWifiPermissionsUtil, null, in testAttachSessionMetrics() 282 mClock.getElapsedSinceBootMillis(), mWifiPermissionsUtil, null, in testAttachSessionMetrics() 289 mClock.getElapsedSinceBootMillis(), mWifiPermissionsUtil, null, in testAttachSessionMetrics() 306 mClock.getElapsedSinceBootMillis(), mWifiPermissionsUtil, null, in testAttachSessionMetrics() 379 null, null, null, false, 0, mWifiPermissionsUtil, null, false, 6); in testDiscoverySessionMetrics() 381 null, null, null, false, 0, mWifiPermissionsUtil, null, false, 6); in testDiscoverySessionMetrics() 383 null, null, null, false, 0, mWifiPermissionsUtil, null, false, 6); in testDiscoverySessionMetrics()
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/util/ |
D | WorkSourceHelperTest.java | 57 @Mock private WifiPermissionsUtil mWifiPermissionsUtil; field in WorkSourceHelperTest 74 ws, mWifiPermissionsUtil, mActivityManager, mPackageManager, mResources); in testGetRequestorWsPriority() 109 when(mWifiPermissionsUtil.checkNetworkSettingsPermission(TEST_UID_1)).thenReturn(true); in testGetRequestorWsPriority()
|
/packages/modules/Wifi/service/java/com/android/server/wifi/rtt/ |
D | RttServiceImpl.java | 109 private WifiPermissionsUtil mWifiPermissionsUtil; field in RttServiceImpl 316 mWifiPermissionsUtil = wifiPermissionsUtil; in start() 355 if (mWifiPermissionsUtil.isLocationModeEnabled()) { in start() 458 && mWifiPermissionsUtil.isLocationModeEnabled(); in isAvailable() 553 mWifiPermissionsUtil.checkPackage(uid, callingPackage); in startRanging() 563 if (!mWifiPermissionsUtil.checkNearbyDevicesPermission( in startRanging() 567 mWifiPermissionsUtil.enforceFineLocationPermission( in startRanging() 572 mWifiPermissionsUtil.enforceFineLocationPermission( in startRanging() 1250 permissionGranted = mWifiPermissionsUtil.checkNearbyDevicesPermission( in onRangingResults() 1256 mWifiPermissionsUtil.checkCallersLocationPermission( in onRangingResults() [all …]
|