android_packages_modules_Co.../tests/net/java/com/android/server
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Chalard Jean 01b6ba4053 Move NetworkAgent#register to a new method.
Calling IPC in a constructor is unusual and confusing, and can be
considered bad form. There are multiple reasons for this :
• Users can't obtain an instance of the class without calling the
  constructor, but they can't always afford an IPC where they need
  this, forcing them to know about the implementation detail and
  sometimes design around it.
• On a related but generalized note, constructors should usually
  be fast for the same range of reasons.
• Having a separate method to register the agent simply gives more
  flexibility to the app.
• It's also a lot easier to test.
But also we can't fix it without an update to the API, so here it is.

Another reason for doing this is consistency with the NetworkProvider
API.

Bug: 138306002
Bug: 139268426
Test: atest FrameworksNetTests FrameworksWifiTests FrameworksTelephonyTests
Change-Id: I1ee5c7b1353d581e487c8a8a159009bebd781643
2020-01-20 12:54:52 +09:00
..
connectivity Merge "Replace StringNetworkSpecifier & subId with TelephonyNetworkSpecifer" am: b2ff467a3a am: b5d058e25d am: 0fee898931 2020-01-15 18:39:33 +00:00
net [SP04] add unit test for NetworkStatsProvider 2020-01-13 14:43:06 +08:00
ConnectivityServiceTest.java Move NetworkAgent#register to a new method. 2020-01-20 12:54:52 +09:00
IpSecServiceParameterizedTest.java Add IPsec checks for IPSEC_TUNNEL feature 2019-05-08 00:11:28 +00:00
IpSecServiceRefcountedResourceTest.java Fix remove-before-add for IpSecService RefcountedResource 2019-04-09 21:37:26 +00:00
IpSecServiceTest.java Revert "Add NATT keepalive resources and methods into IpSecService" 2019-05-10 00:58:18 +08:00
LegacyTypeTrackerTest.kt Add tests for the legacy broadcast 2019-11-19 21:08:44 +09:00
NetIdManagerTest.kt Add NetIdManagerTest 2019-09-04 15:57:58 +09:00
NetworkManagementServiceTest.java Cleanup NetworkManagementService for Netd commnads binder migrartion 2019-03-20 20:02:24 +08:00
NsdServiceTest.java Migrate frameworks/base/tests/net/ to androidx.test 2019-03-05 09:05:47 -08:00