Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2a1b0ab7 authored by Benedict Wong's avatar Benedict Wong Committed by Automerger Merge Worker
Browse files

Merge "Set TRANSPORT_PRIMARY for VCN NetworkOffers and NetworkAgents" am: d92daec7 am: 697971f6

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1772025

Change-Id: I3d678a8d3315f884bacfd3052218416604bf3e2c
parents 09b6ee6b 697971f6
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -596,7 +596,12 @@ public class Vcn extends Handler {
    /** Retrieves the network score for a VCN Network */
    /** Retrieves the network score for a VCN Network */
    // Package visibility for use in VcnGatewayConnection and VcnNetworkProvider
    // Package visibility for use in VcnGatewayConnection and VcnNetworkProvider
    static NetworkScore getNetworkScore() {
    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. */
    /** Callback used for passing status signals from a VcnGatewayConnection to its managing Vcn. */
+2 −2
Original line number Original line Diff line number Diff line
@@ -87,8 +87,8 @@ public class VcnNetworkProviderTest {
                        eq(mVcnNetworkProvider),
                        eq(mVcnNetworkProvider),
                        argThat(
                        argThat(
                                score ->
                                score ->
                                        score.getLegacyInt()
                                        score.getLegacyInt() == Vcn.getNetworkScore().getLegacyInt()
                                                == Vcn.getNetworkScore().getLegacyInt()),
                                                && score.isTransportPrimary()),
                        any(),
                        any(),
                        any(),
                        any(),
                        cbCaptor.capture());
                        cbCaptor.capture());