Home
last modified time | relevance | path

Searched refs:mWifiPermissionsUtil (Results 1 – 25 of 32) sorted by relevance

12

/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/p2p/
DWifiP2pServiceImplTest.java141 @Mock WifiPermissionsUtil mWifiPermissionsUtil; field in WifiP2pServiceImplTest
211 when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(isLocationModeEnabled); in simulateLocationModeChange()
726 when(mWifiInjector.getWifiPermissionsUtil()).thenReturn(mWifiPermissionsUtil); in setUpWifiP2pServiceImpl()
880 .when(mWifiPermissionsUtil).checkPackage(anyInt(), anyString()); in testAddLocalServiceFailureWhenChannelUpdateWrongPkgName()
894 doNothing().when(mWifiPermissionsUtil).checkPackage(anyInt(), anyString()); in testAddLocalServiceFailureWhenCallerPermissionDenied()
895 when(mWifiPermissionsUtil.checkCanAccessWifiDirect( in testAddLocalServiceFailureWhenCallerPermissionDenied()
901 verify(mWifiPermissionsUtil) in testAddLocalServiceFailureWhenCallerPermissionDenied()
912 doNothing().when(mWifiPermissionsUtil).checkPackage(anyInt(), anyString()); in testAddLocalServiceSuccess()
913 when(mWifiPermissionsUtil.checkCanAccessWifiDirect(anyString(), anyInt(), anyBoolean())) in testAddLocalServiceSuccess()
918 verify(mWifiPermissionsUtil) in testAddLocalServiceSuccess()
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/aware/
DWifiAwareClientState.java62 private final WifiPermissionsUtil mWifiPermissionsUtil; field in WifiAwareClientState
85 mWifiPermissionsUtil = wifiPermissionsUtil; in WifiAwareClientState()
225 boolean hasPermission = mWifiPermissionsUtil.checkCallersLocationPermission( in onInterfaceAddressChange()
260 boolean hasPermission = mWifiPermissionsUtil.checkCallersLocationPermission( in onClusterChange()
DWifiAwareServiceImpl.java69 private WifiPermissionsUtil mWifiPermissionsUtil; field in WifiAwareServiceImpl
104 mWifiPermissionsUtil = wifiPermissionsUtil; in start()
473 mWifiPermissionsUtil.enforceLocationPermission(callingPackage, uid); in enforceLocationPermission()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DWifiControllerTest.java99 @Mock WifiPermissionsUtil mWifiPermissionsUtil; field in WifiControllerTest
120 when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(true); in setUp()
124 mWifiPermissionsUtil); in setUp()
187 mActiveModeWarden, mWifiPermissionsUtil); in testEnterScanModeAtStartWhenSet()
205 when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(false); in testDoesNotEnterScanModeWhenLocationModeDisabled()
209 mWifiPermissionsUtil); in testDoesNotEnterScanModeWhenLocationModeDisabled()
232 when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(false); in testEnterScanModeWhenLocationModeEnabled()
238 mWifiPermissionsUtil); in testEnterScanModeWhenLocationModeEnabled()
250 when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(true); in testEnterScanModeWhenLocationModeEnabled()
266 when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(true); in testExitScanModeWhenLocationModeDisabled()
[all …]
DWifiServiceImplTest.java237 @Mock WifiPermissionsUtil mWifiPermissionsUtil; field in WifiServiceImplTest
381 when(mWifiInjector.getWifiPermissionsUtil()).thenReturn(mWifiPermissionsUtil); in setUp()
553 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), in testSetWifiEnabledMetricsNormalAppBelowQSDK()
572 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), in testSetWifiEnabledMetricsNormalAppTargetingQSDKNoIncrement()
616 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), in testSetWifiEnabledSuccessForDOAppsTargetingQSDK()
636 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), in testSetWifiEnabledSuccessForSystemAppsTargetingQSDK()
654 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), in testSetWifiEnabledSuccessForAppsTargetingBelowQSDK()
685 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), in testSetWifiEnabledFailureForAppsTargetingQSDK()
702 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), in testSetWifiEnableAppOpsRejected()
722 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), in testSetWifiEnableAppOpsIgnored()
[all …]
DWifiNetworkSuggestionsManagerTest.java97 private @Mock WifiPermissionsUtil mWifiPermissionsUtil; field in WifiNetworkSuggestionsManagerTest
125 mInorder = inOrder(mContext, mWifiPermissionsUtil); in setUp()
164 mWifiInjector, mWifiPermissionsUtil, mWifiConfigManager, mWifiConfigStore, in setUp()
503 when(mWifiPermissionsUtil.checkNetworkCarrierProvisioningPermission(TEST_UID_1)) in testGetNetworkSuggestionsForScanDetailSuccessWithOneMatchForCarrierProvisioningApp()
872 mInorder.verify(mWifiPermissionsUtil) in testOnNetworkConnectionSuccessWithOneMatch()
906 mInorder.verify(mWifiPermissionsUtil, never()).enforceCanAccessScanResults( in testOnNetworkConnectionFailureWithOneMatch()
957 mInorder.verify(mWifiPermissionsUtil) in testOnNetworkConnectionSuccessWithMultipleMatch()
1019 mInorder.verify(mWifiPermissionsUtil) in testOnNetworkConnectionSuccessWithBssidMultipleMatch()
1082 mInorder.verify(mWifiPermissionsUtil) in testOnNetworkConnectionSuccessWithBssidAndWithoutBssidMultipleMatch()
1119 verify(mWifiPermissionsUtil).checkNetworkCarrierProvisioningPermission(TEST_UID_1); in testOnNetworkConnectionWhenAppNotApproved()
[all …]
DScoredNetworkEvaluatorTest.java75 @Mock private WifiPermissionsUtil mWifiPermissionsUtil; field in ScoredNetworkEvaluatorTest
99 mWifiConfigManager, new LocalLog(0), mScoreCache, mWifiPermissionsUtil); in setUp()
238 doThrow(new SecurityException()).when(mWifiPermissionsUtil).enforceCanAccessScanResults( in testUpdate_externalScorerNotPermittedToSeeScanResults()
248 verify(mWifiPermissionsUtil).enforceCanAccessScanResults( in testUpdate_externalScorerNotPermittedToSeeScanResults()
261 doThrow(new SecurityException()).when(mWifiPermissionsUtil).enforceCanAccessScanResults( in testUpdate_externalScorerNotPermittedToSeeScanResultsWithException()
271 verify(mWifiPermissionsUtil).enforceCanAccessScanResults( in testUpdate_externalScorerNotPermittedToSeeScanResultsWithException()
DScanRequestProxyTest.java81 @Mock private WifiPermissionsUtil mWifiPermissionsUtil; field in ScanRequestProxyTest
137 mWifiConfigManager, mWifiPermissionsUtil, mWifiMetrics, mClock, in setUp()
200 when(mWifiPermissionsUtil.checkNetworkSettingsPermission(TEST_UID)).thenReturn(true); in testStartScanSuccessFromAppWithNetworkSettings()
215 when(mWifiPermissionsUtil.checkNetworkSetupWizardPermission(TEST_UID)).thenReturn(true); in testStartScanSuccessFromAppWithNetworkSetupWizard()
585 when(mWifiPermissionsUtil.checkNetworkSettingsPermission(TEST_UID)).thenReturn(true); in testSuccessiveScanRequestFromSameAppWithNetworkSettingsPermissionNotThrottled()
608 when(mWifiPermissionsUtil.checkNetworkSetupWizardPermission(TEST_UID)).thenReturn(true); in testSuccessiveScanRequestFromSameAppWithNetworkSetupWizardPermissionNotThrottled()
DWifiBackupRestoreTest.java187 @Mock WifiPermissionsUtil mWifiPermissionsUtil; field in WifiBackupRestoreTest
194 when(mWifiPermissionsUtil.checkConfigOverridePermission(anyInt())).thenReturn(true); in setUp()
195 mWifiBackupRestore = new WifiBackupRestore(mWifiPermissionsUtil); in setUp()
620 when(mWifiPermissionsUtil.checkConfigOverridePermission(eq(systemAppUid))) in testMultipleNetworksSystemAppBackupRestore()
622 when(mWifiPermissionsUtil.checkConfigOverridePermission(eq(nonSystemAppUid))) in testMultipleNetworksSystemAppBackupRestore()
DWifiConfigManagerTest.java130 @Mock private WifiPermissionsUtil mWifiPermissionsUtil; field in WifiConfigManagerTest
221 when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(true); in setUp()
534 when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false); in testCannotUpdateMacRandomizationSettingWithoutPermission()
535 when(mWifiPermissionsUtil.checkNetworkSetupWizardPermission(anyInt())).thenReturn(false); in testCannotUpdateMacRandomizationSettingWithoutPermission()
562 when(mWifiPermissionsUtil.checkNetworkSetupWizardPermission(anyInt())).thenReturn(false); in testCanUpdateMacRandomizationSettingWithNetworkSettingPermission()
589 when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false); in testCanUpdateMacRandomizationSettingWithSetupWizardPermission()
590 when(mWifiPermissionsUtil.checkNetworkSetupWizardPermission(anyInt())).thenReturn(true); in testCanUpdateMacRandomizationSettingWithSetupWizardPermission()
750 when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false); in testUpdateSingleOpenNetworkFailedDueToPermissionDenied()
1226 when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false); in testEnableNetworkFailedDueToPermissionDenied()
1255 when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false); in testDisableNetworkFailedDueToPermissionDenied()
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DWifiInjector.java136 private final WifiPermissionsUtil mWifiPermissionsUtil; field in WifiInjector
187 mWifiPermissionsUtil = new WifiPermissionsUtil(mWifiPermissionsWrapper, mContext, in WifiInjector()
189 mWifiBackupRestore = new WifiBackupRestore(mWifiPermissionsUtil); in WifiInjector()
256 mWifiKeyStore, mWifiConfigStore, mWifiPermissionsUtil, in WifiInjector()
280 new Handler(mWifiCoreHandlerThread.getLooper()), this, mWifiPermissionsUtil, in WifiInjector()
286 mWifiNetworkScoreCache, mWifiPermissionsUtil); in WifiInjector()
302 mWifiPermissionsUtil, mWifiMetrics, mClock, mFrameworkFacade, in WifiInjector()
340 mActiveModeWarden, mWifiPermissionsUtil); in WifiInjector()
652 mWifiConfigStore, mWifiPermissionsUtil, mWifiMetrics); in makeWifiNetworkFactory()
682 return mWifiPermissionsUtil; in getWifiPermissionsUtil()
DScanRequestProxy.java84 private final WifiPermissionsUtil mWifiPermissionsUtil; field in ScanRequestProxy
242 mWifiPermissionsUtil = wifiPermissionUtil; in ScanRequestProxy()
462 mWifiPermissionsUtil.checkNetworkSettingsPermission(callingUid) in startScan()
463 || mWifiPermissionsUtil.checkNetworkSetupWizardPermission(callingUid); in startScan()
DWifiController.java68 private final WifiPermissionsUtil mWifiPermissionsUtil; field in WifiController
115 mWifiPermissionsUtil = wifiPermissionsUtil; in WifiController()
141 boolean isLocationModeActive = mWifiPermissionsUtil.isLocationModeEnabled(); in start()
185 if (!mWifiPermissionsUtil.isLocationModeEnabled()) { in checkScanOnlyModeAvailable()
DWifiServiceImpl.java206 private WifiPermissionsUtil mWifiPermissionsUtil; field in WifiServiceImpl
359 if (!mWifiPermissionsUtil.checkChangePermission(msg.sendingUid)) { in checkChangePermissionAndReplyIfNotAuthorized()
480 mWifiPermissionsUtil = mWifiInjector.getWifiPermissionsUtil(); in WifiServiceImpl()
638 mWifiPermissionsUtil.enforceCanAccessScanResults(packageName, callingUid); in startScan()
874 mWifiPermissionsUtil.enforceLocationPermission(pkgName, uid); in enforceLocationPermission()
883 return mWifiPermissionsUtil.isTargetSdkLessThan(packageName, Build.VERSION_CODES.Q, uid) in isTargetSdkLessThanQOrPrivileged()
889 || mWifiPermissionsUtil.checkSystemAlertWindowPermission(uid, packageName); in isTargetSdkLessThanQOrPrivileged()
905 && !mWifiPermissionsUtil.isTargetSdkLessThan(packageName, Build.VERSION_CODES.Q, in setWifiEnabled()
1450 if (!mWifiPermissionsUtil.isLocationModeEnabled()) { in startLocalOnlyHotspot()
1618 if (!mWifiPermissionsUtil.checkConfigOverridePermission(uid)) { in getWifiApConfiguration()
[all …]
DScoredNetworkEvaluator.java56 private final WifiPermissionsUtil mWifiPermissionsUtil; field in ScoredNetworkEvaluator
66 mWifiPermissionsUtil = wifiPermissionsUtil; in ScoredNetworkEvaluator()
119 mWifiPermissionsUtil.enforceCanAccessScanResults(packageName, uid); in activeScorerAllowedtoSeeScanResults()
DWifiNetworkSuggestionsManager.java109 private final WifiPermissionsUtil mWifiPermissionsUtil; field in WifiNetworkSuggestionsManager
407 mWifiPermissionsUtil = wifiPermissionsUtil; in WifiNetworkSuggestionsManager()
581 if (mWifiPermissionsUtil.checkNetworkCarrierProvisioningPermission(uid)) { in add()
700 if (mWifiPermissionsUtil.checkNetworkCarrierProvisioningPermission(uid)) { in remove()
1054 mWifiPermissionsUtil.enforceCanAccessScanResults( in sendPostConnectionBroadcastIfAllowed()
DWifiBackupRestore.java118 private final WifiPermissionsUtil mWifiPermissionsUtil; field in WifiBackupRestore
133 mWifiPermissionsUtil = wifiPermissionsUtil; in WifiBackupRestore()
190 if (!mWifiPermissionsUtil.checkConfigOverridePermission(configuration.creatorUid)) { in writeNetworkConfigurationsToXml()
DWifiNetworkFactory.java117 private final WifiPermissionsUtil mWifiPermissionsUtil; field in WifiNetworkFactory
368 mWifiPermissionsUtil = wifiPermissionsUtil; in WifiNetworkFactory()
454 if (mWifiPermissionsUtil.checkNetworkSettingsPermission(newRequest.requestorUid)) { in canNewRequestOverrideExistingRequest()
521 if (!mWifiPermissionsUtil.checkNetworkSettingsPermission(wns.requestorUid) in acceptRequest()
DWifiConfigManager.java275 private final WifiPermissionsUtil mWifiPermissionsUtil; field in WifiConfigManager
407 mWifiPermissionsUtil = wifiPermissionsUtil; in WifiConfigManager()
903 return isCreator || mWifiPermissionsUtil.checkNetworkSettingsPermission(uid); in canModifyNetwork()
910 && mWifiPermissionsUtil.checkNetworkSettingsPermission(uid); in canModifyNetwork()
1226 newInternalConfig) && !mWifiPermissionsUtil.checkNetworkSettingsPermission(uid) in addOrUpdateNetworkInternal()
1227 && !mWifiPermissionsUtil.checkNetworkSetupWizardPermission(uid)) { in addOrUpdateNetworkInternal()
3344 mWifiPermissionsUtil.checkNetworkSettingsPermission(uid); in canModifyProxySettings()
3346 mWifiPermissionsUtil.checkNetworkSetupWizardPermission(uid); in canModifyProxySettings()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/aware/
DWifiAwareMetricsTest.java60 @Mock private WifiPermissionsUtil mWifiPermissionsUtil; field in WifiAwareMetricsTest
242 mClock.getElapsedSinceBootMillis(), mWifiPermissionsUtil)); in testAttachSessionMetrics()
248 mClock.getElapsedSinceBootMillis(), mWifiPermissionsUtil)); in testAttachSessionMetrics()
254 mClock.getElapsedSinceBootMillis(), mWifiPermissionsUtil)); in testAttachSessionMetrics()
260 mClock.getElapsedSinceBootMillis(), mWifiPermissionsUtil)); in testAttachSessionMetrics()
276 mClock.getElapsedSinceBootMillis(), mWifiPermissionsUtil)); in testAttachSessionMetrics()
310 null, null, false, 0, mWifiPermissionsUtil); in testDiscoverySessionMetrics()
312 null, null, false, 0, mWifiPermissionsUtil); in testDiscoverySessionMetrics()
314 null, null, false, 0, mWifiPermissionsUtil); in testDiscoverySessionMetrics()
DWifiAwareServiceImplTest.java99 @Mock private WifiPermissionsUtil mWifiPermissionsUtil; field in WifiAwareServiceImplTest
151 mAwareMetricsMock, mWifiPermissionsUtil, mPermissionsWrapperMock, mFrameworkFacade, in setup()
155 eq(mWifiPermissionsUtil), eq(mPermissionsWrapperMock), any()); in setup()
DWifiAwareDataPathStateManagerTest.java127 @Mock private WifiPermissionsUtil mWifiPermissionsUtil; field in WifiAwareDataPathStateManagerTest
164 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), anyInt(), anyInt())) in setUp()
166 when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(true); in setUp()
171 mWifiPermissionsUtil, mPermissionsWrapperMock, mClock); in setUp()
1020 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), anyInt(), anyInt())) in testDataPathResonderMacPassphraseNoPeerIdSuccessNonLegacy()
1032 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), anyInt(), anyInt())) in testDataPathResonderMacOpenNoPeerIdNoPmkPassphraseSuccessNonLegacy()
1079 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), anyInt(), anyInt())) in testDataPathResonderDirectNoMacPassphraseSuccessNonLegacy()
1090 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), anyInt(), anyInt())) in testDataPathResonderDirectNoMacNoPmkPassphraseSuccessNonLegacy()
1479 boolean isLegacy = mWifiPermissionsUtil.isTargetSdkLessThan("anything", in testDataPathResponderUtility()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/p2p/
DWifiP2pServiceImpl.java140 private WifiPermissionsUtil mWifiPermissionsUtil; field in WifiP2pServiceImpl
464 mWifiPermissionsUtil = mWifiInjector.getWifiPermissionsUtil(); in WifiP2pServiceImpl()
857 if (!mWifiPermissionsUtil.isLocationModeEnabled()) { in P2pStateMachine()
1070 if (!mWifiPermissionsUtil.checkCanAccessWifiDirect( in processMessage()
1170 if (mWifiPermissionsUtil.checkNetworkStackPermission(message.sendingUid)) { in processMessage()
1190 if (mWifiPermissionsUtil.checkNetworkStackPermission(message.sendingUid)) { in processMessage()
1208 mWifiPermissionsUtil.checkPackage(message.sendingUid, pkgName); in processMessage()
1220 if (!mWifiPermissionsUtil.checkCanAccessWifiDirect( in processMessage()
1531 if (!mWifiPermissionsUtil.checkCanAccessWifiDirect( in processMessage()
1567 if (!mWifiPermissionsUtil.checkCanAccessWifiDirect( in processMessage()
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/rtt/
DRttServiceImpl.java93 private WifiPermissionsUtil mWifiPermissionsUtil; field in RttServiceImpl
256 mWifiPermissionsUtil = wifiPermissionsUtil; in start()
310 if (mWifiPermissionsUtil.isLocationModeEnabled()) { in start()
403 && mWifiPermissionsUtil.isLocationModeEnabled(); in isAvailable()
454 mWifiPermissionsUtil.enforceFineLocationPermission(callingPackage, uid); in startRanging()
1095 boolean permissionGranted = mWifiPermissionsUtil.checkCallersLocationPermission( in onRangingResults()
1098 && mWifiPermissionsUtil.isLocationModeEnabled(); in onRangingResults()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/scanner/
DWifiScanningServiceTest.java130 @Mock WifiPermissionsUtil mWifiPermissionsUtil; field in WifiScanningServiceTest
146 .thenReturn(mWifiPermissionsUtil); in setUp()
2545 doThrow(new SecurityException()).when(mWifiPermissionsUtil) in rejectAllMessagesFromNonPrivilegedAppsWithoutLocationPermission()
2614 verify(mWifiPermissionsUtil).enforceCanAccessScanResultsForWifiScanner( in verifyIgnoreLocationSettingsFromNonPrivilegedAppsForSingleScan()
2627 verify(mWifiPermissionsUtil).enforceCanAccessScanResultsForWifiScanner( in verifyIgnoreLocationSettingsFromNonPrivilegedAppsForSingleScan()
2640 verify(mWifiPermissionsUtil).enforceCanAccessScanResultsForWifiScanner( in verifyIgnoreLocationSettingsFromNonPrivilegedAppsForSingleScan()
2674 verify(mWifiPermissionsUtil).enforceCanAccessScanResultsForWifiScanner( in verifyHideFromAppOpsFromNonPrivilegedAppsForSingleScan()
2687 verify(mWifiPermissionsUtil).enforceCanAccessScanResultsForWifiScanner( in verifyHideFromAppOpsFromNonPrivilegedAppsForSingleScan()
2700 verify(mWifiPermissionsUtil).enforceCanAccessScanResultsForWifiScanner( in verifyHideFromAppOpsFromNonPrivilegedAppsForSingleScan()
2737 verify(mWifiPermissionsUtil, never()).enforceCanAccessScanResultsForWifiScanner( in verifyLocationPermissionCheckIsSkippedFromPrivilegedClientsForSingleScan()

12