Merge "Set TRANSPORT_PRIMARY for VCN NetworkOffers and NetworkAgents" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
9eee7d3f29
@@ -596,7 +596,12 @@ public class Vcn extends Handler {
|
||||
/** Retrieves the network score for a VCN Network */
|
||||
// Package visibility for use in VcnGatewayConnection and VcnNetworkProvider
|
||||
static NetworkScore getNetworkScore() {
|
||||
return new NetworkScore.Builder().setLegacyInt(VCN_LEGACY_SCORE_INT).build();
|
||||
// TODO(b/193687515): Stop setting TRANSPORT_PRIMARY, define a TRANSPORT_VCN, and set in
|
||||
// NetworkOffer/NetworkAgent.
|
||||
return new NetworkScore.Builder()
|
||||
.setLegacyInt(VCN_LEGACY_SCORE_INT)
|
||||
.setTransportPrimary(true)
|
||||
.build();
|
||||
}
|
||||
|
||||
/** Callback used for passing status signals from a VcnGatewayConnection to its managing Vcn. */
|
||||
|
||||
@@ -87,8 +87,8 @@ public class VcnNetworkProviderTest {
|
||||
eq(mVcnNetworkProvider),
|
||||
argThat(
|
||||
score ->
|
||||
score.getLegacyInt()
|
||||
== Vcn.getNetworkScore().getLegacyInt()),
|
||||
score.getLegacyInt() == Vcn.getNetworkScore().getLegacyInt()
|
||||
&& score.isTransportPrimary()),
|
||||
any(),
|
||||
any(),
|
||||
cbCaptor.capture());
|
||||
|
||||
Reference in New Issue
Block a user