[SUBID01-1]Grow NetworkIdentity to include a new mSubId field

In the previous design of NSS and NPMS, those only had IMSI to identify
the cell network. Now the telephony has created the "subId" handle,
which is the preferred mechanism for identifying subscribers.

This commit adds NetworkStats support for subscriberId as a part of
the network identity key

Bug: 80526261
Test: atest NetworkTemplateTest NetworkStatsCollectionTest
            NetworkStatsServiceTest NetworkIdentityTest
Ignore-AOSP-First: merge conflict resolutions

(cherry-picked from ag/16826535)

Change-Id: I8549b11d0fcfc5a9426724d6b90de27b707cb77c
Merged-In: I8549b11d0fcfc5a9426724d6b90de27b707cb77c
This commit is contained in:
lifr
2021-11-18 02:37:28 +08:00
committed by Frank
parent 87db609348
commit 8ba46d804f
5 changed files with 51 additions and 13 deletions

View File

@@ -78,6 +78,7 @@ public class NetworkStatsObserversTest {
private static final String IMSI_1 = "310004";
private static final String IMSI_2 = "310260";
private static final int SUBID_1 = 1;
private static final String TEST_SSID = "AndroidAP";
private static NetworkTemplate sTemplateWifi = buildTemplateWifiWildcard();
@@ -224,7 +225,7 @@ public class NetworkStatsObserversTest {
identSet.add(new NetworkIdentity(
TYPE_MOBILE, TelephonyManager.NETWORK_TYPE_UNKNOWN,
IMSI_1, null /* networkId */, false /* roaming */, true /* metered */,
true /* defaultNetwork */, OEM_NONE));
true /* defaultNetwork */, OEM_NONE, SUBID_1));
return identSet;
}