Use isAtLeast* from deps

CSTest and CSAgentWrapper need to agree on what the current
version is

Test: CSTest*
Change-Id: If78047c36ce213a531207d25b410e870691fbb98
This commit is contained in:
Chalard Jean
2023-10-12 10:44:05 +09:00
parent 02193c0cce
commit 5efbcf7bab

View File

@@ -98,7 +98,7 @@ class CSAgentWrapper(
nmCbCaptor.capture())
// Create the actual agent. NetworkAgent is abstract, so make an anonymous subclass.
if (SdkLevel.isAtLeastS()) {
if (deps.isAtLeastS()) {
agent = object : NetworkAgent(context, csHandlerThread.looper, TAG,
nc, lp, score.value, nac, provider) {}
} else {
@@ -112,7 +112,7 @@ class CSAgentWrapper(
}
private fun onValidationRequested() {
if (SdkLevel.isAtLeastT()) {
if (deps.isAtLeastT()) {
verify(networkMonitor).notifyNetworkConnectedParcel(any())
} else {
verify(networkMonitor).notifyNetworkConnected(any(), any())