Specify which callback is unexpected in tests

Tests may be flaky due to the usage for assertNoCallback().
The method expects no any callback received. Based on the usage,
tests expect to not to receive certain callback, such as
onAvailable(). The network may update its linkproperties during
the test and trigger onLinkPropertiesChanged(). These callbacks
are ignorable in the tests. They should not fail the tests.

Replace the assertNoCallback to new assertNoCallbackThat with
callback type specified to deflake tests.

Bug: 192239030
Test: atest android.net.cts.ConnectivityManagerTest\
      --iterations 20
Change-Id: I1643c1ff15215c07e174dbcb664cfac2a38d5840
1 file changed