@Test public void testClose_WasConnectedWithWifiInternet() { connectNetworkWithWifiInternet(); mCompanionProxyShard.close(); verify(mockProxyServiceHelper).stopNetworkSession(anyString()); verify(mockCompanionProxyShardListener).onProxyConnectionChange(DISCONNECTED, NETWORK_SCORE, false); }
@MainThread @Override public void close() { DebugAssert.isMainThread(); if (mIsClosed) { Log.w(TAG, logInstance() + "Already closed"); return; } updateAndNotify(SysproxyNetworkState.DISCONNECTED, Reason.CLOSABLE); mIsClosed = true; disconnectNativeInBackground(); mHandler.removeMessages(WHAT_START_SYSPROXY); maybeLogDebug("Closed companion proxy shard"); }
CompanionProxyShard implements Closeable { @MainThread @Override public void close() { DebugAssert.isMainThread(); if (mIsClosed) { Log.w(TAG, logInstance() + "Already closed"); return; } updateAndNotify(SysproxyNetworkState.DISCONNECTED, Reason.CLOSABLE); mIsClosed = true; disconnectNativeInBackground(); mHandler.removeMessages(WHAT_START_SYSPROXY); maybeLogDebug("Closed companion proxy shard"); } }
CompanionProxyShard implements Closeable { @MainThread @Override public void close() { DebugAssert.isMainThread(); if (mIsClosed) { Log.w(TAG, logInstance() + "Already closed"); return; } updateAndNotify(SysproxyNetworkState.DISCONNECTED, Reason.CLOSABLE); mIsClosed = true; disconnectNativeInBackground(); mHandler.removeMessages(WHAT_START_SYSPROXY); maybeLogDebug("Closed companion proxy shard"); } CompanionProxyShard(
            @NonNull final Context context,
            @NonNull final ProxyServiceHelper proxyServiceHelper,
            @NonNull final BluetoothDevice companionDevice,
            @NonNull final Listener listener,
            final int networkScore); }
CompanionProxyShard implements Closeable { @MainThread @Override public void close() { DebugAssert.isMainThread(); if (mIsClosed) { Log.w(TAG, logInstance() + "Already closed"); return; } updateAndNotify(SysproxyNetworkState.DISCONNECTED, Reason.CLOSABLE); mIsClosed = true; disconnectNativeInBackground(); mHandler.removeMessages(WHAT_START_SYSPROXY); maybeLogDebug("Closed companion proxy shard"); } CompanionProxyShard(
            @NonNull final Context context,
            @NonNull final ProxyServiceHelper proxyServiceHelper,
            @NonNull final BluetoothDevice companionDevice,
            @NonNull final Listener listener,
            final int networkScore); @MainThread @Override // Closable void close(); @MainThread void startNetwork(); @MainThread void updateNetwork(final int networkScore); void dump(@NonNull final IndentingPrintWriter ipw); }
CompanionProxyShard implements Closeable { @MainThread @Override public void close() { DebugAssert.isMainThread(); if (mIsClosed) { Log.w(TAG, logInstance() + "Already closed"); return; } updateAndNotify(SysproxyNetworkState.DISCONNECTED, Reason.CLOSABLE); mIsClosed = true; disconnectNativeInBackground(); mHandler.removeMessages(WHAT_START_SYSPROXY); maybeLogDebug("Closed companion proxy shard"); } CompanionProxyShard(
            @NonNull final Context context,
            @NonNull final ProxyServiceHelper proxyServiceHelper,
            @NonNull final BluetoothDevice companionDevice,
            @NonNull final Listener listener,
            final int networkScore); @MainThread @Override // Closable void close(); @MainThread void startNetwork(); @MainThread void updateNetwork(final int networkScore); void dump(@NonNull final IndentingPrintWriter ipw);  }