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

Commit 89d3afd5 authored by Kweku Adams's avatar Kweku Adams
Browse files

Clarify network validation code.

Clarify the code around loading and validating network capabilities and
transports.

Bug: 248307450
Test: N/A
Change-Id: I2b1daab240d2f812207d5296418ee66445dca045
parent 677d1884
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1095,6 +1095,8 @@ public final class JobStore {
            }

            if ((netCapabilitiesIntArray != null) && (netTransportTypesIntArray != null)) {
                // S+ format. No capability or transport validation since the values should be in
                // line with what's defined in the Connectivity mainline module.
                final NetworkRequest.Builder builder = new NetworkRequest.Builder()
                        .clearCapabilities();

@@ -1111,6 +1113,7 @@ public final class JobStore {
                }
                jobBuilder.setRequiredNetwork(builder.build());
            } else if (netCapabilitiesLong != null && netTransportTypesLong != null) {
                // Format used on R- builds. Drop any unexpected capabilities and transports.
                final NetworkRequest.Builder builder = new NetworkRequest.Builder()
                        .clearCapabilities();
                final int maxNetCapabilityInR = NET_CAPABILITY_TEMPORARILY_NOT_METERED;