Merge changes Ie68356a4,I2b63c24b

* changes:
  Attempt to deflake NetworkAgentTest#testRejectedUpdates.
  Fix a couple of JavaDoc errors in NetworkAgentInfo.
This commit is contained in:
Treehugger Robot
2022-02-22 10:41:37 +00:00
committed by Gerrit Code Review
2 changed files with 3 additions and 3 deletions

View File

@@ -883,7 +883,7 @@ public class NetworkAgentInfo implements Comparable<NetworkAgentInfo>, NetworkRa
/** /**
* Returns the number of requests currently satisfied by this network of type * Returns the number of requests currently satisfied by this network of type
* {@link android.net.NetworkRequest.Type.BACKGROUND_REQUEST}. * {@link android.net.NetworkRequest.Type#BACKGROUND_REQUEST}.
*/ */
public int numBackgroundNetworkRequests() { public int numBackgroundNetworkRequests() {
return mNumBackgroundNetworkRequests; return mNumBackgroundNetworkRequests;
@@ -1028,7 +1028,7 @@ public class NetworkAgentInfo implements Comparable<NetworkAgentInfo>, NetworkRa
* when a network is newly created. * when a network is newly created.
* *
* @param requestId The requestId of the request that no longer need to be served by this * @param requestId The requestId of the request that no longer need to be served by this
* network. Or {@link NetworkRequest.REQUEST_ID_NONE} if this is the * network. Or {@link NetworkRequest#REQUEST_ID_NONE} if this is the
* {@code InactivityTimer} for a newly created network. * {@code InactivityTimer} for a newly created network.
*/ */
// TODO: Consider creating a dedicated function for nascent network, e.g. start/stopNascent. // TODO: Consider creating a dedicated function for nascent network, e.g. start/stopNascent.

View File

@@ -472,7 +472,7 @@ class NetworkAgentTest {
@Test @Test
fun testRejectedUpdates() { fun testRejectedUpdates() {
val callback = TestableNetworkCallback() val callback = TestableNetworkCallback(DEFAULT_TIMEOUT_MS)
// will be cleaned up in tearDown // will be cleaned up in tearDown
registerNetworkCallback(makeTestNetworkRequest(), callback) registerNetworkCallback(makeTestNetworkRequest(), callback)
val agent = createNetworkAgent(initialNc = ncWithAccessUids(200)) val agent = createNetworkAgent(initialNc = ncWithAccessUids(200))