Loading src/java/com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java +7 −2 Original line number Diff line number Diff line Loading @@ -4259,7 +4259,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { // the only thing we can do here is splitting the usage into half rx and half tx. // Uid -1 indicates this is for the overall device data usage. vtDataUsageSnapshot.combineValues(new NetworkStats.Entry( NetworkStats.IFACE_VT, -1, NetworkStats.SET_FOREGROUND, getVtInterface(), -1, NetworkStats.SET_FOREGROUND, NetworkStats.TAG_NONE, NetworkStats.METERED_YES, isRoaming, NetworkStats.DEFAULT_NETWORK_YES, delta / 2, 0, delta / 2, 0, 0)); mVtDataUsageSnapshot = vtDataUsageSnapshot; Loading @@ -4282,12 +4282,17 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { // Since the modem only reports the total vt data usage rather than rx/tx separately, // the only thing we can do here is splitting the usage into half rx and half tx. vtDataUsageUidSnapshot.combineValues(new NetworkStats.Entry( NetworkStats.IFACE_VT, mDefaultDialerUid.get(), getVtInterface(), mDefaultDialerUid.get(), NetworkStats.SET_FOREGROUND, NetworkStats.TAG_NONE, NetworkStats.METERED_YES, isRoaming, NetworkStats.DEFAULT_NETWORK_YES, delta / 2, 0, delta / 2, 0, 0)); mVtDataUsageUidSnapshot = vtDataUsageUidSnapshot; } @VisibleForTesting(visibility = PRIVATE) public String getVtInterface() { return NetworkStats.IFACE_VT + mPhone.getSubId(); } @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @Override protected void log(String msg) { Loading tests/telephonytests/src/com/android/internal/telephony/imsphone/ImsPhoneCallTrackerTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -1337,7 +1337,7 @@ public class ImsPhoneCallTrackerTest extends TelephonyTest { if (rxBytes != 0 || txBytes != 0) { expectedStats = expectedStats.addEntry( new Entry(NetworkStats.IFACE_VT, UID_ALL, SET_FOREGROUND, new Entry(mCTUT.getVtInterface(), UID_ALL, SET_FOREGROUND, TAG_NONE, METERED_YES, ROAMING_NO, DEFAULT_NETWORK_YES, rxBytes, 0L, txBytes, 0L, 0L)); } Loading Loading
src/java/com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java +7 −2 Original line number Diff line number Diff line Loading @@ -4259,7 +4259,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { // the only thing we can do here is splitting the usage into half rx and half tx. // Uid -1 indicates this is for the overall device data usage. vtDataUsageSnapshot.combineValues(new NetworkStats.Entry( NetworkStats.IFACE_VT, -1, NetworkStats.SET_FOREGROUND, getVtInterface(), -1, NetworkStats.SET_FOREGROUND, NetworkStats.TAG_NONE, NetworkStats.METERED_YES, isRoaming, NetworkStats.DEFAULT_NETWORK_YES, delta / 2, 0, delta / 2, 0, 0)); mVtDataUsageSnapshot = vtDataUsageSnapshot; Loading @@ -4282,12 +4282,17 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { // Since the modem only reports the total vt data usage rather than rx/tx separately, // the only thing we can do here is splitting the usage into half rx and half tx. vtDataUsageUidSnapshot.combineValues(new NetworkStats.Entry( NetworkStats.IFACE_VT, mDefaultDialerUid.get(), getVtInterface(), mDefaultDialerUid.get(), NetworkStats.SET_FOREGROUND, NetworkStats.TAG_NONE, NetworkStats.METERED_YES, isRoaming, NetworkStats.DEFAULT_NETWORK_YES, delta / 2, 0, delta / 2, 0, 0)); mVtDataUsageUidSnapshot = vtDataUsageUidSnapshot; } @VisibleForTesting(visibility = PRIVATE) public String getVtInterface() { return NetworkStats.IFACE_VT + mPhone.getSubId(); } @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @Override protected void log(String msg) { Loading
tests/telephonytests/src/com/android/internal/telephony/imsphone/ImsPhoneCallTrackerTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -1337,7 +1337,7 @@ public class ImsPhoneCallTrackerTest extends TelephonyTest { if (rxBytes != 0 || txBytes != 0) { expectedStats = expectedStats.addEntry( new Entry(NetworkStats.IFACE_VT, UID_ALL, SET_FOREGROUND, new Entry(mCTUT.getVtInterface(), UID_ALL, SET_FOREGROUND, TAG_NONE, METERED_YES, ROAMING_NO, DEFAULT_NETWORK_YES, rxBytes, 0L, txBytes, 0L, 0L)); } Loading