Support to query TYPE_WIFI usage with subscriberId
Previous the API ignores subscriberId when network type is WIFI. Allow caller to call querySummaryXXXX with TYPE: WIFI + subscriberId: IMSI to get carrier merged wifi usage which matches the wifi network with the given IMSI. Bug: 176396812 Test: atest -c NetworkStatsServiceTest Change-Id: Ia033521a24e2bb56182d74a41bb2b39710571782
This commit is contained in:
@@ -644,7 +644,10 @@ public class NetworkStatsManager {
|
|||||||
: NetworkTemplate.buildTemplateMobileAll(subscriberId);
|
: NetworkTemplate.buildTemplateMobileAll(subscriberId);
|
||||||
break;
|
break;
|
||||||
case ConnectivityManager.TYPE_WIFI:
|
case ConnectivityManager.TYPE_WIFI:
|
||||||
template = NetworkTemplate.buildTemplateWifiWildcard();
|
template = subscriberId == null
|
||||||
|
? NetworkTemplate.buildTemplateWifiWildcard()
|
||||||
|
: NetworkTemplate.buildTemplateWifi(NetworkTemplate.WIFI_NETWORKID_ALL,
|
||||||
|
subscriberId);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new IllegalArgumentException("Cannot create template for network type "
|
throw new IllegalArgumentException("Cannot create template for network type "
|
||||||
|
|||||||
Reference in New Issue
Block a user