Merge "Add metered filter for API: buildTemplateCarrier" am: 7486607f4b am: 937568499f

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

Change-Id: I46d8d8f0d9b83fb0a817a3455cbbc28d558b871c
This commit is contained in:
Les Lee
2021-05-18 13:57:06 +00:00
committed by Automerger Merge Worker

View File

@@ -274,11 +274,14 @@ public class NetworkTemplate implements Parcelable {
}
/**
* Template to match all carrier networks with the given IMSI.
* Template to match all metered carrier networks with the given IMSI.
*/
public static NetworkTemplate buildTemplateCarrier(@NonNull String subscriberId) {
public static NetworkTemplate buildTemplateCarrierMetered(@NonNull String subscriberId) {
Objects.requireNonNull(subscriberId);
return new NetworkTemplate(MATCH_CARRIER, subscriberId, null);
return new NetworkTemplate(MATCH_CARRIER, subscriberId,
new String[] { subscriberId }, null /* networkId */, METERED_YES, ROAMING_ALL,
DEFAULT_NETWORK_ALL, NETWORK_TYPE_ALL, OEM_MANAGED_ALL,
SUBSCRIBER_ID_MATCH_RULE_EXACT);
}
private final int mMatchRule;