Allow connectToCell multiple times

CtsNetTestUtils#connectToCell is happy to give an existing
cell network, so it doesn't make a lot of sense that it
demands only be called once per test unless you disconnect.
Some tests may face instability in the network and may
need to retry, but having the test itself know that
particular nook of the CtsNetTestUtils API is not very
seamless.

Instead, it's more useful to just unregister the callback
if it has been registered.

Test: CtsNetTestCases
Change-Id: I4dad570dcd2c25fb7ccd176769a805620fd8df59
diff --git a/tests/cts/net/util/java/android/net/cts/util/CtsNetUtils.java b/tests/cts/net/util/java/android/net/cts/util/CtsNetUtils.java
index f035f72..9d1fa60 100644
--- a/tests/cts/net/util/java/android/net/cts/util/CtsNetUtils.java
+++ b/tests/cts/net/util/java/android/net/cts/util/CtsNetUtils.java
@@ -357,7 +357,7 @@
 
     public Network connectToCell() throws InterruptedException {
         if (cellConnectAttempted()) {
-            throw new IllegalStateException("Already connected");
+            mCm.unregisterNetworkCallback(mCellNetworkCallback);
         }
         NetworkRequest cellRequest = new NetworkRequest.Builder()
                 .addTransportType(TRANSPORT_CELLULAR)