/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/ |
D | MulticastRoutingCoordinatorServiceTest.kt | 81 @Mock private lateinit var mDeps: MulticastRoutingCoordinatorService.Dependencies variable in com.android.server.connectivity.MulticastRoutingCoordinatorServiceTest 132 doReturn(mClock).`when`(mDeps).getClock() in setUp() 133 doReturn(mFd).`when`(mDeps).createMulticastRoutingSocket() in setUp() 134 doReturn(mMulticastSocket).`when`(mDeps).createMulticastSocket() in setUp() 135 doReturn(mIfPhysicalIndex1).`when`(mDeps).getInterfaceIndex(mIfName1) in setUp() 136 doReturn(mIfPhysicalIndex2).`when`(mDeps).getInterfaceIndex(mIfName2) in setUp() 137 doReturn(mIfPhysicalIndex3).`when`(mDeps).getInterfaceIndex(mIfName3) in setUp() 138 doReturn(mNetworkInterface1).`when`(mDeps).getNetworkInterface(mIfPhysicalIndex1) in setUp() 139 doReturn(mNetworkInterface2).`when`(mDeps).getNetworkInterface(mIfPhysicalIndex2) in setUp() 156 mService = MulticastRoutingCoordinatorService(handler, mDeps) in prepareService() [all …]
|
D | SatelliteAccessControllerTest.kt | 83 private val mDeps = mock(SatelliteAccessController.Dependencies::class.java) constant in com.android.server.connectivity.SatelliteAccessControllerTest 88 SatelliteAccessController(context, mDeps, mCallback, mHandler) 154 doReturn(listOf<String>()).`when`(mDeps).getRoleHoldersAsUser( in test_onRoleHoldersChanged_SatelliteFallbackUid_Changed_SingleUser() 163 .`when`(mDeps).getRoleHoldersAsUser(RoleManager.ROLE_SMS, PRIMARY_USER_HANDLE) in test_onRoleHoldersChanged_SatelliteFallbackUid_Changed_SingleUser() 168 doReturn(listOf(SMS_APP2)).`when`(mDeps).getRoleHoldersAsUser( in test_onRoleHoldersChanged_SatelliteFallbackUid_Changed_SingleUser() 176 doReturn(listOf<String>()).`when`(mDeps).getRoleHoldersAsUser( in test_onRoleHoldersChanged_SatelliteFallbackUid_Changed_SingleUser() 187 doReturn(listOf<Any>()).`when`(mDeps).getRoleHoldersAsUser( in test_onRoleHoldersChanged_NoSatelliteCommunicationPermission() 200 .`when`(mDeps).getRoleHoldersAsUser(RoleManager.ROLE_SMS, PRIMARY_USER_HANDLE) in test_onRoleHoldersChanged_NoSatelliteCommunicationPermission() 209 .`when`(mDeps).getRoleHoldersAsUser(RoleManager.ROLE_SMS, PRIMARY_USER_HANDLE) in test_onRoleHoldersChanged_RoleSms_NotAvailable() 220 doReturn(listOf<String>()).`when`(mDeps).getRoleHoldersAsUser( in test_onRoleHoldersChanged_SatelliteNetworkFallbackUid_Changed_multiUser() [all …]
|
D | ClatCoordinatorTest.java | 146 @Spy private TestDependencies mDeps = new TestDependencies(); field in ClatCoordinatorTest 382 final ClatCoordinator coordinator = new ClatCoordinator(mDeps); in makeClatCoordinator() 402 final InOrder inOrder = inOrder(mNetd, mDeps, mIngressMap, mEgressMap, mCookieTagMap); in testStartStopClatd() 403 clearInvocations(mNetd, mDeps, mIngressMap, mEgressMap, mCookieTagMap); in testStartStopClatd() 415 inOrder.verify(mDeps).selectIpv4Address(eq(INIT_V4ADDR_STRING), in testStartStopClatd() 419 inOrder.verify(mDeps).generateIpv6Address(eq(BASE_IFACE), in testStartStopClatd() 423 inOrder.verify(mDeps).openPacketSocket(); in testStartStopClatd() 424 inOrder.verify(mDeps).adoptFd(eq(PACKET_SOCK_FD)); in testStartStopClatd() 425 inOrder.verify(mDeps).openRawSocket6(eq(MARK)); in testStartStopClatd() 426 inOrder.verify(mDeps).adoptFd(eq(RAW_SOCK_FD)); in testStartStopClatd() [all …]
|
/packages/modules/Connectivity/Tethering/tests/unit/src/com/android/networkstack/tethering/ |
D | TetheringConfigurationTest.java | 107 private final MockDependencies mDeps = new MockDependencies(); field in TetheringConfigurationTest 111 super(ctx, log, id, mDeps); in MockTetheringConfiguration() 242 return new TetheringConfiguration(mMockContext, mLog, INVALID_SUBSCRIPTION_ID, mDeps); in getTetheringConfiguration() 328 mMockContext, mLog, INVALID_SUBSCRIPTION_ID, mDeps); in testNoDefinedUpstreamTypesAddsEthernet() 351 mMockContext, mLog, INVALID_SUBSCRIPTION_ID, mDeps); in testDefinedUpstreamTypesSansEthernetAddsEthernet() 369 mMockContext, mLog, INVALID_SUBSCRIPTION_ID, mDeps); in testDefinedUpstreamTypesWithEthernetDoesNotAddEthernet() 383 mDeps.setFeatureEnabled( in initializeBpfOffloadConfiguration() 391 new TetheringConfiguration(mMockContext, mLog, INVALID_SUBSCRIPTION_ID, mDeps); in testBpfOffloadEnabledByResource() 400 new TetheringConfiguration(mMockContext, mLog, INVALID_SUBSCRIPTION_ID, mDeps); in testBpfOffloadEnabledByDeviceConfigOverride() 409 new TetheringConfiguration(mMockContext, mLog, INVALID_SUBSCRIPTION_ID, mDeps); in testBpfOffloadDisabledByResource() [all …]
|
D | BpfCoordinatorTest.java | 492 private BpfCoordinator.Dependencies mDeps = field in BpfCoordinatorTest 669 final BpfCoordinator coordinator = new BpfCoordinator(mDeps); in makeBpfCoordinator() 716 if (mDeps.isAtLeastS()) { in updateStatsEntry() 729 if (mDeps.isAtLeastS()) { in updateStatsEntriesAndWaitForUpdate() 749 if (mDeps.isAtLeastS()) { in updateStatsEntryForTetherOffloadGetAndClearStats() 757 if (mDeps.isAtLeastS()) { in clearStatsInvocations() 777 if (mDeps.isAtLeastS()) { in verifyTetherOffloadGetStats() 785 if (mDeps.isAtLeastS()) { in verifyNeverTetherOffloadGetStats() 794 if (!mDeps.isAtLeastS()) return; in verifyStartUpstreamIpv6Forwarding() 822 if (!mDeps.isAtLeastS()) return; in verifyStopUpstreamIpv6Forwarding() [all …]
|
/packages/modules/Connectivity/service/src/com/android/server/connectivity/ |
D | ClatCoordinator.java | 132 private final Dependencies mDeps; field in ClatCoordinator 398 mDeps = deps; in ClatCoordinator() 399 mNetd = mDeps.getNetd(); in ClatCoordinator() 400 mIngressMap = mDeps.getBpfIngress6Map(); in ClatCoordinator() 401 mEgressMap = mDeps.getBpfEgress4Map(); in ClatCoordinator() 402 mCookieTagMap = mDeps.getBpfCookieTagMap(); in ClatCoordinator() 414 isEthernet = mDeps.isEthernet(tracker.iface); in maybeStartBpf() 453 mDeps.tcQdiscAddDevClsact(tracker.v4ifIndex); in maybeStartBpf() 474 mDeps.tcFilterAddDevBpf(tracker.v4ifIndex, EGRESS, (short) PRIO_CLAT, (short) ETH_P_IP, in maybeStartBpf() 500 mDeps.tcFilterAddDevBpf(tracker.ifIndex, INGRESS, (short) PRIO_CLAT, in maybeStartBpf() [all …]
|
D | MultinetworkPolicyTracker.java | 123 private final Dependencies mDeps; field in MultinetworkPolicyTracker 183 mDeps = deps; in MultinetworkPolicyTracker() 215 mDeps.addOnDevicePropertiesChangedListener(handlerExecutor, in start() 250 return mDeps.getResourcesForActiveSubId(mResources, mActiveSubId) in configRestrictsAvoidBadWifi() 272 return 0 != mDeps.getResourcesForActiveSubId(mResources, mActiveSubId) in configActivelyPrefersBadWifi() 310 switch (mDeps.getConfigActivelyPreferBadWifi()) { in deviceConfigActivelyPreferBadWifi() 355 return mDeps.getResourcesForActiveSubId(mResources, mActiveSubId) in configMeteredMultipathPreference()
|
D | SatelliteAccessController.java | 53 private final Dependencies mDeps; field in SatelliteAccessController 80 mDeps.addOnRoleHoldersChangedListenerAsUser( in register() 118 mDeps = deps; in SatelliteAccessController() 178 mDeps.getRoleHoldersAsUser(RoleManager.ROLE_SMS, userHandle); in onRoleSmsChanged()
|
/packages/modules/Connectivity/tests/unit/java/com/android/server/ethernet/ |
D | EthernetNetworkFactoryTest.java | 90 @Mock private EthernetNetworkFactory.Dependencies mDeps; field in EthernetNetworkFactoryTest 109 mNetFactory = new EthernetNetworkFactory(mHandler, mContext, mNetworkProvider, mDeps); in initEthernetNetworkFactory() 113 when(mDeps.makeEthernetNetworkAgent(any(), any(), any(), any(), any(), any(), any())) in setupNetworkAgentMock() 142 }).when(mDeps).makeIpClient(any(Context.class), anyString(), any()); in setupIpClientMock() 151 when(mDeps.makeIpClientManager(any())).thenReturn(mIpClient); in setupIpClientMock() 170 when(mDeps.getTcpBufferSizesFromResource(eq(mContext))).thenReturn(""); in setupContext() 245 clearInvocations(mDeps); in createInterfaceUndergoingProvisioning() 273 verify(mDeps).makeEthernetNetworkAgent(any(), any(), ncCaptor.capture(), any(), in createAndVerifyProvisionedInterface() 278 clearInvocations(mDeps); in createAndVerifyProvisionedInterface() 321 when(mDeps.getNetworkInterfaceByName(TEST_IFACE)).thenReturn(mInterfaceParams); in testProvisioningLoss() [all …]
|
/packages/services/Mms/tests/robotests/src/com/android/mms/service/ |
D | MmsNetworkManagerTest.java | 74 @Mock MmsNetworkManager.Dependencies mDeps; field in MmsNetworkManagerTest 88 doReturn(1).when(mDeps).getPhoneId(anyInt()); in setup() 93 doReturn(NETWORK_ACQUIRE_TIMEOUT_MS).when(mDeps).getNetworkRequestTimeoutMillis(); in setup() 94 doReturn(NETWORK_ACQUIRE_TIMEOUT_MS).when(mDeps).getAdditionalNetworkAcquireTimeoutMillis(); in setup() 98 mMnm = new MmsNetworkManager(mCtx, TEST_SUBID, mDeps); in setup() 166 doReturn(100).when(mDeps).getNetworkRequestTimeoutMillis(); in testAvailableNetwork_networkUnavailable() 167 doReturn(100).when(mDeps).getAdditionalNetworkAcquireTimeoutMillis(); in testAvailableNetwork_networkUnavailable() 187 doReturn(100).when(mDeps).getNetworkRequestTimeoutMillis(); in testAvailableNetwork_newNetworkSuspendedEventuallyReleased() 188 doReturn(100).when(mDeps).getAdditionalNetworkAcquireTimeoutMillis(); in testAvailableNetwork_newNetworkSuspendedEventuallyReleased() 215 MmsNetworkManager mmsNetworkManager = new MmsNetworkManager(mCtx, TEST_SUBID, mDeps); in testHandleCarrierConfigChanged() [all …]
|
/packages/modules/Connectivity/framework/src/android/net/ |
D | NetworkStackBpfNetMaps.java | 58 private final Dependencies mDeps; field in NetworkStackBpfNetMaps 83 mDeps = deps; in NetworkStackBpfNetMaps() 84 mConfigurationMap = mDeps.getConfigurationMap(); in NetworkStackBpfNetMaps() 85 mUidOwnerMap = mDeps.getUidOwnerMap(); in NetworkStackBpfNetMaps() 86 mDataSaverEnabledMap = mDeps.getDataSaverEnabledMap(); in NetworkStackBpfNetMaps()
|
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/keepalive/ |
D | IkeNattKeepalive.java | 44 private final Dependencies mDeps; field in IkeNattKeepalive 73 mDeps = deps; in IkeNattKeepalive() 79 mDeps.createHardwareKeepaliveImpl( in IkeNattKeepalive() 139 mDeps.createHardwareKeepaliveImpl( in finishRestartingWithNewHardwareKeepalive() 173 mDeps.createSoftwareKeepaliveImpl( in restart() 256 mDeps.createSoftwareKeepaliveImpl(mContext, mDest, mSocket, mIkeAlarmConfig); in onHardwareOffloadError()
|
/packages/modules/Connectivity/service/src/com/android/server/net/ |
D | DelayedDiskWrite.java | 37 private final Dependencies mDeps; field in DelayedDiskWrite 50 mDeps = deps; in DelayedDiskWrite() 101 mDiskWriteHandlerThread = mDeps.makeHandlerThread(); in write() 135 mDeps.quitHandlerThread(mDiskWriteHandlerThread); in doWrite()
|
/packages/modules/Connectivity/service-t/src/com/android/server/ethernet/ |
D | EthernetNetworkFactory.java | 75 final Dependencies mDeps; field in EthernetNetworkFactory 119 mDeps = deps; in EthernetNetworkFactory() 164 ifaceName, hwAddress, mHandler, mContext, ipConfig, nc, mProvider, mDeps); in addInterface() 272 private final Dependencies mDeps; field in NetworkInterfaceState 315 mIpClient = mDeps.makeIpClientManager(ipClient); in onIpClientCreated() 422 mDeps = deps; in NetworkInterfaceState() 495 mDeps.makeIpClient(mContext, name, mIpClientCallback); in start() 504 sTcpBufferSizes = mDeps.getTcpBufferSizesFromResource(mContext); in start() 527 mNetworkAgent = mDeps.makeEthernetNetworkAgent(mContext, mHandler.getLooper(), in handleOnProvisioningSuccess() 551 if (null == mDeps.getNetworkInterfaceByName(name)) { in handleOnProvisioningFailure()
|
/packages/modules/Connectivity/service-t/src/com/android/metrics/ |
D | NetworkStatsMetricsLogger.java | 53 final Dependencies mDeps; field in NetworkStatsMetricsLogger 84 mDeps = new Dependencies(); in NetworkStatsMetricsLogger() 89 mDeps = deps; in NetworkStatsMetricsLogger() 158 mDeps.writeRecorderFileReadingStats(prefixToRecorderType(prefix), in logRecorderFileReading()
|
/packages/modules/Connectivity/service-t/src/com/android/server/net/ |
D | NetworkStatsService.java | 494 private final Dependencies mDeps; field in NetworkStatsService 640 mDeps = Objects.requireNonNull(deps, "missing Dependencies"); in NetworkStatsService() 641 mStatsDir = mDeps.getOrCreateStatsDir(); in NetworkStatsService() 646 final HandlerThread handlerThread = mDeps.makeHandlerThread(); in NetworkStatsService() 652 mContentObserver = mDeps.makeContentObserver(mHandler, mSettings, in NetworkStatsService() 654 mLocationPermissionChecker = mDeps.makeLocationPermissionChecker(mContext); in NetworkStatsService() 655 mInterfaceMapHelper = mDeps.makeBpfInterfaceMapHelper(); in NetworkStatsService() 656 mUidCounterSetMap = mDeps.getUidCounterSetMap(); in NetworkStatsService() 657 mCookieTagMap = mDeps.getCookieTagMap(); in NetworkStatsService() 658 mStatsMapA = mDeps.getStatsMapA(); in NetworkStatsService() [all …]
|
D | NetworkStatsFactory.java | 76 private final Dependencies mDeps; field in NetworkStatsFactory 164 mDeps = deps; in NetworkStatsFactory() 173 return mDeps.getNetworkStatsDev(); in readNetworkStatsSummaryXt() 213 final NetworkStats stats = mDeps.getNetworkStatsDetail(); in readNetworkStatsDetail()
|
/packages/modules/Connectivity/service/src/com/android/server/ |
D | ConnectivityService.java | 540 private final Dependencies mDeps; field in ConnectivityService 1774 mDeps = Objects.requireNonNull(deps, "missing Dependencies"); 1776 mSystemProperties = mDeps.getSystemProperties(); 1777 mNetIdManager = mDeps.makeNetIdManager(); 1789 mNetworkRequestStateStatsMetrics = mDeps.makeNetworkRequestStateStatsMetrics(mContext); 1842 mBpfNetMaps = mDeps.getBpfNetMaps(mContext, netd); 1843 mHandlerThread = mDeps.makeHandlerThread("ConnectivityServiceThread"); 1850 if (!mDeps.isAtLeastV()) { 1887 mProxyTracker = mDeps.makeProxyTracker(mContext, mHandler); 1891 mLocationPermissionChecker = mDeps.makeLocationPermissionChecker(mContext); [all …]
|
/packages/modules/NetworkStack/tests/unit/src/android/net/dhcp/ |
D | DhcpServerTest.java | 118 private Dependencies mDeps; field in DhcpServerTest 197 when(mDeps.makeLeaseRepository(any(), any(), any())).thenReturn(mRepository); in setUp() 198 when(mDeps.makeClock()).thenReturn(mClock); in setUp() 199 when(mDeps.makePacketListener(any())).thenReturn(mPacketListener); in setUp() 200 when(mDeps.isFeatureNotChickenedOut(eq(mContext), eq(DHCP_RAPID_COMMIT_VERSION))) in setUp() 202 doNothing().when(mDeps) in setUp() 208 new SharedLog(DhcpServerTest.class.getSimpleName()), mDeps); in setUp() 257 when(mDeps.isFeatureNotChickenedOut(eq(mContext), eq(DHCP_RAPID_COMMIT_VERSION))) in testDiscover_RapidCommit() 497 verify(mDeps, times(1)).sendPacket(any(), any(), any()); in getPacket()
|
/packages/services/Mms/src/com/android/mms/service/ |
D | MmsNetworkManager.java | 97 private final Dependencies mDeps; field in MmsNetworkManager 288 mDeps = dependencies; in MmsNetworkManager() 349 int networkRequestTimeoutMillis = mDeps.getNetworkRequestTimeoutMillis(); in acquireNetwork() 362 mPhoneId = mDeps.getPhoneId(mSubId); in acquireNetwork() 383 + mDeps.getAdditionalNetworkAcquireTimeoutMillis()); in acquireNetwork() 404 + mDeps.getAdditionalNetworkAcquireTimeoutMillis()); in acquireNetwork()
|
/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/ |
D | BpfCoordinator.java | 175 private final Dependencies mDeps; field in BpfCoordinator 475 mDeps = deps; in BpfCoordinator() 476 mHandler = mDeps.getHandler(); in BpfCoordinator() 477 mNetd = mDeps.getNetd(); in BpfCoordinator() 478 mLog = mDeps.getSharedLog().forSubComponent(TAG); in BpfCoordinator() 486 mConntrackMonitor = mDeps.getConntrackMonitor(mBpfConntrackEventConsumer); in BpfCoordinator() 490 mDeps.getNetworkStatsManager().registerNetworkStatsProvider( in BpfCoordinator() 592 if (!isUsingBpf() || !mDeps.isAtLeastS()) return; in startMonitoring() 614 if (!isUsingBpf() || !mDeps.isAtLeastS()) return; in stopMonitoring() 977 mtu = mDeps.getNetworkInterfaceMtu(ifaceName); in getMtu() [all …]
|
D | OffloadHardwareInterface.java | 77 private final Dependencies mDeps; field in OffloadHardwareInterface 177 mDeps = deps; in OffloadHardwareInterface() 313 mIOffload = mDeps.getOffload(); in initOffload() 329 final NativeHandle h1 = mDeps.createConntrackSocket( in initOffload() 331 final NativeHandle h2 = mDeps.createConntrackSocket( in initOffload()
|
/packages/modules/Connectivity/Tethering/tests/privileged/src/com/android/networkstack/tethering/ |
D | ConntrackSocketTest.java | 71 private OffloadHardwareInterface.Dependencies mDeps; field in ConntrackSocketTest 84 mDeps = new OffloadHardwareInterface.Dependencies(mHandler, mLog); in setUp() 85 mOffloadHw = new OffloadHardwareInterface(mHandler, mLog, mDeps); in setUp() 146 final NativeHandle handle = mDeps.createConntrackSocket( in testIpv4ConntrackSocket()
|
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/mdns/ |
D | MdnsSocketProviderTest.java | 116 @Mock private Dependencies mDeps; field in MdnsSocketProviderTest 144 doReturn(mTestNetworkIfaceWrapper).when(mDeps).getNetworkInterfaceByName(anyString()); in setUp() 151 doReturn(mLocalOnlyIfaceWrapper).when(mDeps) in setUp() 153 doReturn(mLocalOnlyIfaceWrapper).when(mDeps) in setUp() 155 doReturn(mTetheredIfaceWrapper).when(mDeps).getNetworkInterfaceByName(TETHERED_IFACE_NAME); in setUp() 157 .when(mDeps).createMdnsInterfaceSocket(any(), anyInt(), any(), any(), any()); in setUp() 158 doReturn(TETHERED_IFACE_IDX).when(mDeps).getNetworkInterfaceIndexByName( in setUp() 160 doReturn(789).when(mDeps).getNetworkInterfaceIndexByName( in setUp() 166 doReturn(mTestSocketNetLinkMonitor).when(mDeps).createSocketNetlinkMonitor(any(), any(), in setUp() 173 }).when(mDeps).createSocketNetlinkMonitor(any(), any(), in setUp() [all …]
|
/packages/modules/Connectivity/tests/unit/java/com/android/server/ |
D | NsdServiceTest.java | 192 @Mock Dependencies mDeps; field in NsdServiceTest 240 doReturn(false).when(mDeps).isMdnsDiscoveryManagerEnabled(any(Context.class)); in setUp() 241 doReturn(mDiscoveryManager).when(mDeps) in setUp() 244 doReturn(mSocketProvider).when(mDeps).makeMdnsSocketProvider(any(), any(), any(), any()); in setUp() 245 doReturn(DEFAULT_RUNNING_APP_ACTIVE_IMPORTANCE_CUTOFF).when(mDeps).getDeviceConfigInt( in setUp() 247 doReturn(mAdvertiser).when(mDeps).makeMdnsAdvertiser(any(), any(), any(), any(), any(), in setUp() 249 doReturn(mMetrics).when(mDeps).makeNetworkNsdReportedMetrics(anyInt()); in setUp() 250 doReturn(mClock).when(mDeps).makeClock(); in setUp() 255 verify(mDeps).makeMdnsSocketProvider(any(), any(), any(), cbMonitorCaptor.capture()); in setUp() 1115 doReturn(true).when(mDeps).isMdnsDiscoveryManagerEnabled(any(Context.class)); in setMdnsDiscoveryManagerEnabled() [all …]
|