@Test public void testSetUnMetered() { mProxyServiceHelper.setMetered(false); verify(mockCapabilities).addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED); verify(mockProxyNetworkAgent).sendCapabilities(anyObject()); }
@MainThread public void setMetered(final boolean isMetered) { DebugAssert.isMainThread(); if (isMetered) { mCapabilities.removeCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED); } else { mCapabilities.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED); } mProxyNetworkAgent.sendCapabilities(mCapabilities); }
ProxyServiceHelper { @MainThread public void setMetered(final boolean isMetered) { DebugAssert.isMainThread(); if (isMetered) { mCapabilities.removeCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED); } else { mCapabilities.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED); } mProxyNetworkAgent.sendCapabilities(mCapabilities); } }
ProxyServiceHelper { @MainThread public void setMetered(final boolean isMetered) { DebugAssert.isMainThread(); if (isMetered) { mCapabilities.removeCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED); } else { mCapabilities.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED); } mProxyNetworkAgent.sendCapabilities(mCapabilities); } ProxyServiceHelper(
            final Context context,
            final NetworkCapabilities capabilities,
            final ProxyLinkProperties proxyLinkProperties); }
ProxyServiceHelper { @MainThread public void setMetered(final boolean isMetered) { DebugAssert.isMainThread(); if (isMetered) { mCapabilities.removeCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED); } else { mCapabilities.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED); } mProxyNetworkAgent.sendCapabilities(mCapabilities); } ProxyServiceHelper(
            final Context context,
            final NetworkCapabilities capabilities,
            final ProxyLinkProperties proxyLinkProperties); @MainThread void startNetworkSession(@Nullable final String reason,
            ProxyNetworkAgent.Listener callback); @MainThread void stopNetworkSession(@Nullable final String reason); @MainThread void setMetered(final boolean isMetered); @MainThread void setNetworkScore(final int networkScore); @AnyThread int getNetworkScore(); @MainThread void setCompanionName(@Nullable final String companionName); @AnyThread void dump(@NonNull final IndentingPrintWriter ipw); }
ProxyServiceHelper { @MainThread public void setMetered(final boolean isMetered) { DebugAssert.isMainThread(); if (isMetered) { mCapabilities.removeCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED); } else { mCapabilities.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED); } mProxyNetworkAgent.sendCapabilities(mCapabilities); } ProxyServiceHelper(
            final Context context,
            final NetworkCapabilities capabilities,
            final ProxyLinkProperties proxyLinkProperties); @MainThread void startNetworkSession(@Nullable final String reason,
            ProxyNetworkAgent.Listener callback); @MainThread void stopNetworkSession(@Nullable final String reason); @MainThread void setMetered(final boolean isMetered); @MainThread void setNetworkScore(final int networkScore); @AnyThread int getNetworkScore(); @MainThread void setCompanionName(@Nullable final String companionName); @AnyThread void dump(@NonNull final IndentingPrintWriter ipw); static final int CAPABILITIES_UPSTREAM_BANDWIDTH_KBPS; static final int CAPABILITIES_DOWNSTREAM_BANDWIDTH_KBPS; }