Merge "Fix NetworkTemplate generates non-metered carrier template" am: 481b2649f7

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2064758

Change-Id: Ia871baa3e17da9e4f5b189ca5d514d81e6bbb2a9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Junyu Lai
2022-04-19 10:33:07 +00:00
committed by Automerger Merge Worker

View File

@@ -393,8 +393,9 @@ public final class NetworkTemplate implements Parcelable {
//constructor passes METERED_YES for these types. //constructor passes METERED_YES for these types.
this(matchRule, subscriberId, matchSubscriberIds, this(matchRule, subscriberId, matchSubscriberIds,
wifiNetworkKey != null ? new String[] { wifiNetworkKey } : new String[0], wifiNetworkKey != null ? new String[] { wifiNetworkKey } : new String[0],
(matchRule == MATCH_MOBILE || matchRule == MATCH_MOBILE_WILDCARD) ? METERED_YES (matchRule == MATCH_MOBILE || matchRule == MATCH_MOBILE_WILDCARD
: METERED_ALL , ROAMING_ALL, DEFAULT_NETWORK_ALL, NETWORK_TYPE_ALL, || matchRule == MATCH_CARRIER) ? METERED_YES : METERED_ALL,
ROAMING_ALL, DEFAULT_NETWORK_ALL, NETWORK_TYPE_ALL,
OEM_MANAGED_ALL, NetworkStatsUtils.SUBSCRIBER_ID_MATCH_RULE_EXACT); OEM_MANAGED_ALL, NetworkStatsUtils.SUBSCRIBER_ID_MATCH_RULE_EXACT);
} }