Merge "Add metered filter for API: buildTemplateCarrier" into sc-dev
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user