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/
DWifiServiceImplTest.java231 @Mock WifiPermissionsUtil mWifiPermissionsUtil; field in WifiServiceImplTest
374 when(mWifiInjector.getWifiPermissionsUtil()).thenReturn(mWifiPermissionsUtil); in setUp()
546 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), in testSetWifiEnabledMetricsNormalAppBelowQSDK()
565 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), in testSetWifiEnabledMetricsNormalAppTargetingQSDKNoIncrement()
609 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), in testSetWifiEnabledSuccessForAppsTargetingBelowQSDK()
626 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), in testSetWifiEnabledFailureForAppsTargetingQSDK()
643 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), in testSetWifiEnableAppOpsRejected()
663 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), in testSetWifiEnableAppOpsIgnored()
695 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), in testSetWifiEnabledFromAppFailsWhenInAirplaneMode()
739 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), in testSetWifiEnabledFromAppFailsWhenApEnabled()
[all …]
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 …]
DWifiNetworkSuggestionsManagerTest.java97 private @Mock WifiPermissionsUtil mWifiPermissionsUtil; field in WifiNetworkSuggestionsManagerTest
125 mInorder = inOrder(mContext, mWifiPermissionsUtil); in setUp()
162 mWifiInjector, mWifiPermissionsUtil, mWifiConfigManager, mWifiConfigStore, in setUp()
494 when(mWifiPermissionsUtil.checkNetworkCarrierProvisioningPermission(TEST_UID_1)) in testGetNetworkSuggestionsForScanDetailSuccessWithOneMatchForCarrierProvisioningApp()
862 mInorder.verify(mWifiPermissionsUtil) in testOnNetworkConnectionSuccessWithOneMatch()
943 mInorder.verify(mWifiPermissionsUtil) in testOnNetworkConnectionSuccessWithMultipleMatch()
1005 mInorder.verify(mWifiPermissionsUtil) in testOnNetworkConnectionSuccessWithBssidMultipleMatch()
1068 mInorder.verify(mWifiPermissionsUtil) in testOnNetworkConnectionSuccessWithBssidAndWithoutBssidMultipleMatch()
1105 verify(mWifiPermissionsUtil).checkNetworkCarrierProvisioningPermission(TEST_UID_1); in testOnNetworkConnectionWhenAppNotApproved()
1114 verifyNoMoreInteractions(mContext, mWifiPermissionsUtil); 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.java76 @Mock private WifiPermissionsUtil mWifiPermissionsUtil; field in ScanRequestProxyTest
125 mWifiConfigManager, mWifiPermissionsUtil, mWifiMetrics, mClock, in setUp()
188 when(mWifiPermissionsUtil.checkNetworkSettingsPermission(TEST_UID)).thenReturn(true); in testStartScanSuccessFromAppWithNetworkSettings()
203 when(mWifiPermissionsUtil.checkNetworkSetupWizardPermission(TEST_UID)).thenReturn(true); in testStartScanSuccessFromAppWithNetworkSetupWizard()
570 when(mWifiPermissionsUtil.checkNetworkSettingsPermission(TEST_UID)).thenReturn(true); in testSuccessiveScanRequestFromSameAppWithNetworkSettingsPermissionNotThrottled()
593 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.java127 @Mock private WifiPermissionsUtil mWifiPermissionsUtil; field in WifiConfigManagerTest
211 when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(true); in setUp()
519 when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false); in testCannotUpdateMacRandomizationSettingWithoutPermission()
520 when(mWifiPermissionsUtil.checkNetworkSetupWizardPermission(anyInt())).thenReturn(false); in testCannotUpdateMacRandomizationSettingWithoutPermission()
547 when(mWifiPermissionsUtil.checkNetworkSetupWizardPermission(anyInt())).thenReturn(false); in testCanUpdateMacRandomizationSettingWithNetworkSettingPermission()
574 when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false); in testCanUpdateMacRandomizationSettingWithSetupWizardPermission()
575 when(mWifiPermissionsUtil.checkNetworkSetupWizardPermission(anyInt())).thenReturn(true); in testCanUpdateMacRandomizationSettingWithSetupWizardPermission()
735 when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false); in testUpdateSingleOpenNetworkFailedDueToPermissionDenied()
1211 when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false); in testEnableNetworkFailedDueToPermissionDenied()
1240 when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false); in testDisableNetworkFailedDueToPermissionDenied()
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DWifiInjector.java134 private final WifiPermissionsUtil mWifiPermissionsUtil; field in WifiInjector
179 mWifiPermissionsUtil = new WifiPermissionsUtil(mWifiPermissionsWrapper, mContext, in WifiInjector()
181 mWifiBackupRestore = new WifiBackupRestore(mWifiPermissionsUtil); in WifiInjector()
248 mWifiKeyStore, mWifiConfigStore, mWifiPermissionsUtil, in WifiInjector()
272 new Handler(mWifiCoreHandlerThread.getLooper()), this, mWifiPermissionsUtil, in WifiInjector()
278 mWifiNetworkScoreCache, mWifiPermissionsUtil); in WifiInjector()
294 mWifiPermissionsUtil, mWifiMetrics, mClock, mFrameworkFacade, in WifiInjector()
331 mActiveModeWarden, mWifiPermissionsUtil); in WifiInjector()
631 mWifiConfigStore, mWifiPermissionsUtil, mWifiMetrics); in makeWifiNetworkFactory()
661 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()
DWifiServiceImpl.java205 private WifiPermissionsUtil mWifiPermissionsUtil; field in WifiServiceImpl
358 if (!mWifiPermissionsUtil.checkChangePermission(msg.sendingUid)) { in checkChangePermissionAndReplyIfNotAuthorized()
479 mWifiPermissionsUtil = mWifiInjector.getWifiPermissionsUtil(); in WifiServiceImpl()
641 mWifiPermissionsUtil.enforceCanAccessScanResults(packageName, callingUid); in startScan()
847 mWifiPermissionsUtil.enforceLocationPermission(pkgName, uid); in enforceLocationPermission()
856 return mWifiPermissionsUtil.isTargetSdkLessThan(packageName, Build.VERSION_CODES.Q) in isTargetSdkLessThanQOrPrivileged()
862 || mWifiPermissionsUtil.checkSystemAlertWindowPermission(uid, packageName); in isTargetSdkLessThanQOrPrivileged()
878 && !mWifiPermissionsUtil.isTargetSdkLessThan(packageName, Build.VERSION_CODES.Q)) { in setWifiEnabled()
1407 if (!mWifiPermissionsUtil.isLocationModeEnabled()) { in startLocalOnlyHotspot()
1571 if (!mWifiPermissionsUtil.checkConfigOverridePermission(uid)) { in getWifiApConfiguration()
[all …]
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()
DScoredNetworkEvaluator.java56 private final WifiPermissionsUtil mWifiPermissionsUtil; field in ScoredNetworkEvaluator
66 mWifiPermissionsUtil = wifiPermissionsUtil; in ScoredNetworkEvaluator()
119 mWifiPermissionsUtil.enforceCanAccessScanResults(packageName, uid); in activeScorerAllowedtoSeeScanResults()
DWifiBackupRestore.java118 private final WifiPermissionsUtil mWifiPermissionsUtil; field in WifiBackupRestore
133 mWifiPermissionsUtil = wifiPermissionsUtil; in WifiBackupRestore()
190 if (!mWifiPermissionsUtil.checkConfigOverridePermission(configuration.creatorUid)) { in writeNetworkConfigurationsToXml()
DWifiNetworkSuggestionsManager.java100 private final WifiPermissionsUtil mWifiPermissionsUtil; field in WifiNetworkSuggestionsManager
397 mWifiPermissionsUtil = wifiPermissionsUtil; in WifiNetworkSuggestionsManager()
571 if (mWifiPermissionsUtil.checkNetworkCarrierProvisioningPermission(uid)) { in add()
969 mWifiPermissionsUtil.enforceCanAccessScanResults( in sendPostConnectionBroadcastIfAllowed()
DWifiNetworkFactory.java111 private final WifiPermissionsUtil mWifiPermissionsUtil; field in WifiNetworkFactory
388 mWifiPermissionsUtil = wifiPermissionsUtil; in WifiNetworkFactory()
468 if (mWifiPermissionsUtil.checkNetworkSettingsPermission(newRequest.requestorUid)) { in canNewRequestOverrideExistingRequest()
535 if (!mWifiPermissionsUtil.checkNetworkSettingsPermission(wns.requestorUid) in acceptRequest()
DWifiConfigManager.java274 private final WifiPermissionsUtil mWifiPermissionsUtil; field in WifiConfigManager
401 mWifiPermissionsUtil = wifiPermissionsUtil; in WifiConfigManager()
883 return isCreator || mWifiPermissionsUtil.checkNetworkSettingsPermission(uid); in canModifyNetwork()
890 && mWifiPermissionsUtil.checkNetworkSettingsPermission(uid); in canModifyNetwork()
1206 newInternalConfig) && !mWifiPermissionsUtil.checkNetworkSettingsPermission(uid) in addOrUpdateNetworkInternal()
1207 && !mWifiPermissionsUtil.checkNetworkSetupWizardPermission(uid)) { in addOrUpdateNetworkInternal()
3310 mWifiPermissionsUtil.checkNetworkSettingsPermission(uid); in canModifyProxySettings()
3312 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())).thenReturn(true); in setUp()
165 when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(true); in setUp()
170 mWifiPermissionsUtil, mPermissionsWrapperMock, mClock); in setUp()
1020 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), anyInt())).thenReturn(false); in testDataPathResonderMacPassphraseNoPeerIdSuccessNonLegacy()
1031 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), anyInt())).thenReturn(false); in testDataPathResonderMacOpenNoPeerIdNoPmkPassphraseSuccessNonLegacy()
1077 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), anyInt())).thenReturn(false); in testDataPathResonderDirectNoMacPassphraseSuccessNonLegacy()
1087 when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), anyInt())).thenReturn(false); in testDataPathResonderDirectNoMacNoPmkPassphraseSuccessNonLegacy()
1475 boolean isLegacy = mWifiPermissionsUtil.isTargetSdkLessThan("anything", in testDataPathResponderUtility()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/p2p/
DWifiP2pServiceImpl.java136 private WifiPermissionsUtil mWifiPermissionsUtil; field in WifiP2pServiceImpl
446 mWifiPermissionsUtil = mWifiInjector.getWifiPermissionsUtil(); in WifiP2pServiceImpl()
838 if (!mWifiPermissionsUtil.isLocationModeEnabled()) { in P2pStateMachine()
1051 if (!mWifiPermissionsUtil.checkCanAccessWifiDirect( in processMessage()
1151 if (mWifiPermissionsUtil.checkNetworkStackPermission(message.sendingUid)) { in processMessage()
1171 if (mWifiPermissionsUtil.checkNetworkStackPermission(message.sendingUid)) { in processMessage()
1189 mWifiPermissionsUtil.checkPackage(message.sendingUid, pkgName); in processMessage()
1201 if (!mWifiPermissionsUtil.checkCanAccessWifiDirect( in processMessage()
1512 if (!mWifiPermissionsUtil.checkCanAccessWifiDirect( in processMessage()
1548 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