@Test public void testSendNetworkScore_NoAgent() { mProxyNetworkAgent.mCurrentNetworkAgent = null; mProxyNetworkAgent.setNetworkScore(NETWORK_SCORE); verify(mockNetworkAgent, never()).sendNetworkScore(NETWORK_SCORE); }
@MainThread protected void setNetworkScore(final int networkScore) { DebugAssert.isMainThread(); if (mCurrentNetworkScore != networkScore) { mCurrentNetworkScore = networkScore; if (mCurrentNetworkAgent != null) { if (Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "Set network score for current network agent:" + mCurrentNetworkAgent.netId + " score:" + mCurrentNetworkScore); } mCurrentNetworkAgent.sendNetworkScore(mCurrentNetworkScore); } else { Log.d(TAG, "Setting network score with future network agent"); } } }
ProxyNetworkAgent { @MainThread protected void setNetworkScore(final int networkScore) { DebugAssert.isMainThread(); if (mCurrentNetworkScore != networkScore) { mCurrentNetworkScore = networkScore; if (mCurrentNetworkAgent != null) { if (Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "Set network score for current network agent:" + mCurrentNetworkAgent.netId + " score:" + mCurrentNetworkScore); } mCurrentNetworkAgent.sendNetworkScore(mCurrentNetworkScore); } else { Log.d(TAG, "Setting network score with future network agent"); } } } }
ProxyNetworkAgent { @MainThread protected void setNetworkScore(final int networkScore) { DebugAssert.isMainThread(); if (mCurrentNetworkScore != networkScore) { mCurrentNetworkScore = networkScore; if (mCurrentNetworkAgent != null) { if (Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "Set network score for current network agent:" + mCurrentNetworkAgent.netId + " score:" + mCurrentNetworkScore); } mCurrentNetworkAgent.sendNetworkScore(mCurrentNetworkScore); } else { Log.d(TAG, "Setting network score with future network agent"); } } } protected  ProxyNetworkAgent(
            @NonNull final Context context,
            @NonNull final NetworkCapabilities capabilities,
            @NonNull final ProxyLinkProperties proxyLinkProperties); }
ProxyNetworkAgent { @MainThread protected void setNetworkScore(final int networkScore) { DebugAssert.isMainThread(); if (mCurrentNetworkScore != networkScore) { mCurrentNetworkScore = networkScore; if (mCurrentNetworkAgent != null) { if (Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "Set network score for current network agent:" + mCurrentNetworkAgent.netId + " score:" + mCurrentNetworkScore); } mCurrentNetworkAgent.sendNetworkScore(mCurrentNetworkScore); } else { Log.d(TAG, "Setting network score with future network 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 setNetworkScore(final int networkScore) { DebugAssert.isMainThread(); if (mCurrentNetworkScore != networkScore) { mCurrentNetworkScore = networkScore; if (mCurrentNetworkAgent != null) { if (Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "Set network score for current network agent:" + mCurrentNetworkAgent.netId + " score:" + mCurrentNetworkScore); } mCurrentNetworkAgent.sendNetworkScore(mCurrentNetworkScore); } else { Log.d(TAG, "Setting network score with future network agent"); } } } protected  ProxyNetworkAgent(
            @NonNull final Context context,
            @NonNull final NetworkCapabilities capabilities,
            @NonNull final ProxyLinkProperties proxyLinkProperties); @AnyThread void dump(@NonNull final IndentingPrintWriter ipw);  }