@Test public void testTearDownNetworkAgent_NoAgentForceNew() { mProxyNetworkAgent.mCurrentNetworkAgent = null; mProxyNetworkAgent.setUpNetworkAgent(REASON, COMPANION_NAME, null); assertEquals(1, mProxyNetworkAgent.mNetworkAgents.size()); assertNotNull(mProxyNetworkAgent.mCurrentNetworkAgent); NetworkAgentHelper.callUnwanted(mProxyNetworkAgent.mCurrentNetworkAgent); assertTrue(mProxyNetworkAgent.mNetworkAgents.isEmpty()); assertNull(mProxyNetworkAgent.mCurrentNetworkAgent); }
@MainThread protected void setUpNetworkAgent( @Nullable final String reason, @Nullable final String companionName, @Nullable final Listener listener) { DebugAssert.isMainThread(); doSetUpNetworkAgent(reason, companionName, mCurrentNetworkScore, listener, ProxyNetworkAgent.ALWAYS_CREATE_AGENT); }
ProxyNetworkAgent { @MainThread protected void setUpNetworkAgent( @Nullable final String reason, @Nullable final String companionName, @Nullable final Listener listener) { DebugAssert.isMainThread(); doSetUpNetworkAgent(reason, companionName, mCurrentNetworkScore, listener, ProxyNetworkAgent.ALWAYS_CREATE_AGENT); } }
ProxyNetworkAgent { @MainThread protected void setUpNetworkAgent( @Nullable final String reason, @Nullable final String companionName, @Nullable final Listener listener) { DebugAssert.isMainThread(); doSetUpNetworkAgent(reason, companionName, mCurrentNetworkScore, listener, ProxyNetworkAgent.ALWAYS_CREATE_AGENT); } protected  ProxyNetworkAgent(
            @NonNull final Context context,
            @NonNull final NetworkCapabilities capabilities,
            @NonNull final ProxyLinkProperties proxyLinkProperties); }
ProxyNetworkAgent { @MainThread protected void setUpNetworkAgent( @Nullable final String reason, @Nullable final String companionName, @Nullable final Listener listener) { DebugAssert.isMainThread(); doSetUpNetworkAgent(reason, companionName, mCurrentNetworkScore, listener, ProxyNetworkAgent.ALWAYS_CREATE_AGENT); } protected  ProxyNetworkAgent(
            @NonNull final Context context,
            @NonNull final NetworkCapabilities capabilities,
            @NonNull final ProxyLinkProperties proxyLinkProperties); @AnyThread void dump(@NonNull final IndentingPrintWriter ipw); }
ProxyNetworkAgent { @MainThread protected void setUpNetworkAgent( @Nullable final String reason, @Nullable final String companionName, @Nullable final Listener listener) { DebugAssert.isMainThread(); doSetUpNetworkAgent(reason, companionName, mCurrentNetworkScore, listener, ProxyNetworkAgent.ALWAYS_CREATE_AGENT); } protected  ProxyNetworkAgent(
            @NonNull final Context context,
            @NonNull final NetworkCapabilities capabilities,
            @NonNull final ProxyLinkProperties proxyLinkProperties); @AnyThread void dump(@NonNull final IndentingPrintWriter ipw);  }