Snap for 4620899 from 55a3fe78c3f642c873193c4fd1cf2fcc1849ea55 to pi-release
Change-Id: Id2dd2991781763dd72552cc35ffb13b7f896a8d6
This commit is contained in:
@@ -914,8 +914,10 @@ public class ConnectivityServiceTest {
|
||||
mock(INetworkPolicyManager.class),
|
||||
mock(IpConnectivityLog.class));
|
||||
|
||||
mService.systemReady();
|
||||
// Create local CM before sending system ready so that we can answer
|
||||
// getSystemService() correctly.
|
||||
mCm = new WrappedConnectivityManager(InstrumentationRegistry.getContext(), mService);
|
||||
mService.systemReady();
|
||||
mCm.bindProcessToNetwork(null);
|
||||
|
||||
// Ensure that the default setting for Captive Portals is used for most tests
|
||||
@@ -3412,8 +3414,10 @@ public class ConnectivityServiceTest {
|
||||
|
||||
@Test
|
||||
public void testNetworkCallbackMaximum() {
|
||||
final int MAX_REQUESTS = 100;
|
||||
final int CALLBACKS = 90;
|
||||
// We can only have 99 callbacks, because MultipathPolicyTracker is
|
||||
// already one of them.
|
||||
final int MAX_REQUESTS = 99;
|
||||
final int CALLBACKS = 89;
|
||||
final int INTENTS = 10;
|
||||
assertEquals(MAX_REQUESTS, CALLBACKS + INTENTS);
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@ import android.telephony.TelephonyManager;
|
||||
|
||||
import com.android.internal.net.VpnInfo;
|
||||
import com.android.internal.util.test.BroadcastInterceptingContext;
|
||||
import com.android.server.LocalServices;
|
||||
import com.android.server.net.NetworkStatsService.NetworkStatsSettings;
|
||||
import com.android.server.net.NetworkStatsService.NetworkStatsSettings.Config;
|
||||
|
||||
@@ -221,6 +222,9 @@ public class NetworkStatsServiceTest {
|
||||
|
||||
@After
|
||||
public void tearDown() throws Exception {
|
||||
// Registered by NetworkStatsService's constructor.
|
||||
LocalServices.removeServiceForTest(NetworkStatsManagerInternal.class);
|
||||
|
||||
IoUtils.deleteContents(mStatsDir);
|
||||
|
||||
mServiceContext = null;
|
||||
|
||||
Reference in New Issue
Block a user