This method is used in TrafficStats to obtain the snapshot for the
calling UID, so narrow it to only return data for that specific case.
We might be tempted to throw an exception or adjust the method
signature, but apps are using the raw AIDL in the greylist, so we
return them an empty NetworkStats if they ask about other UIDs.
Bug: 119672472
Test: manual
Change-Id: I3064630039f1d8473d6425dd663f17813a4ae3a1
am skip reason: Change-Id I0055f6b55c209a073ce997fc7a144477f9db7069 with SHA-1 5d0d638f54 is in history
Change-Id: Ifc2215c9893e017f41b0eb40b56cf9fd721f3df8
am skip reason: Change-Id I0055f6b55c209a073ce997fc7a144477f9db7069 with SHA-1 5d0d638f54 is in history
Change-Id: I767a4965451d5304f41ba0033ecffdbcb42f6a1f
am skip reason: Change-Id I0055f6b55c209a073ce997fc7a144477f9db7069 with SHA-1 5d0d638f54 is in history
Change-Id: I7ebe73a3ffffaae14a1f557a9f15136e460b2969
In current design, Rat type change in NSS is only for default
subscription. This is only correct for single sim project.
However, it does not correct for multi-sim scenarios such as
CBRS or DSDS, given that all data usage will be attributed
to the Rat type of default sub.
Thus, add a helper class to monitor subscription change event,
and register/unregister dynamically for Rat type change for
every subscription.
Note that unit test of the helper class will be addressed
in follow-up patch.
Test: m -j
Bug: 146415925
Change-Id: I0055f6b55c209a073ce997fc7a144477f9db7069
Merged-In: I0055f6b55c209a073ce997fc7a144477f9db7069
(cherry picked from ag/10977156 and fixed conflict)
am skip reason: Change-Id I0055f6b55c209a073ce997fc7a144477f9db7069 with SHA-1 5d0d638f54 is in history
Change-Id: I5249d1f1cec8cdeb9dfdf650c7c6d868bae68fec
In current design, Rat type change in NSS is only for default
subscription. This is only correct for single sim project.
However, it does not correct for multi-sim scenarios such as
CBRS or DSDS, given that all data usage will be attributed
to the Rat type of default sub.
Thus, add a helper class to monitor subscription change event,
and register/unregister dynamically for Rat type change for
every subscription.
Note that unit test of the helper class will be addressed
in follow-up patch.
Test: m -j
Bug: 146415925
Change-Id: I0055f6b55c209a073ce997fc7a144477f9db7069
Merged-In: I0055f6b55c209a073ce997fc7a144477f9db7069
(cherry picked from commit 306de26c138ec135846f2a74a952464cf00dce54)
am skip reason: Change-Id I690704b43cfd16de70c4c83916f6d750cf613f67 with SHA-1 6ec40a86dd is in history
Change-Id: Iead15065852fcac0881fc7717e79810c8e4742b9
am skip reason: Change-Id I40a76935d55712b8083ee1e17e137a8a4ef5e029 with SHA-1 5d9bc0c75e is in history
Change-Id: Id556fb50e76424bbffdf6f83cd87cfb87cd2aff3
am skip reason: Change-Id I690704b43cfd16de70c4c83916f6d750cf613f67 with SHA-1 6ec40a86dd is in history
Change-Id: I91c97fec88b2275764d5804523a39922c6257340
am skip reason: Change-Id I40a76935d55712b8083ee1e17e137a8a4ef5e029 with SHA-1 5d9bc0c75e is in history
Change-Id: If3793def11b38b66cc7dd788af82f6c0f394cd99
am skip reason: Change-Id I690704b43cfd16de70c4c83916f6d750cf613f67 with SHA-1 863f390810 is in history
Change-Id: I1a97a8cb46302c29425781b9252640c1eec4b50b
In current design, entries with zeros are preserved after
addition/subtraction. These entries are not very useful
and lead to difficulty of verifying the result of
addition/subtraction.
However, change the behavior in the original NetworkStats
is considered risky in current stage.
Thus, this change provide a function that could remove these
empty entries in tests.
Test: atest FrameworksNetTests
Bug: 152827872
Bug: 150644692
Change-Id: I40a76935d55712b8083ee1e17e137a8a4ef5e029
Merged-In: I40a76935d55712b8083ee1e17e137a8a4ef5e029
(cherry picked from commit 6c7bef3064dbe949b7b213036b8e70c125ddd343)
In current design, entries with zeros are preserved after
addition/subtraction. These entries are not very useful
and lead to difficulty of verifying the result of
addition/subtraction.
However, change the behavior in the original NetworkStats
is considered risky in current stage.
Thus, this change provide a function that could remove these
empty entries in tests.
Test: atest FrameworksNetTests
Bug: 152827872
Bug: 150644692
Change-Id: I40a76935d55712b8083ee1e17e137a8a4ef5e029
am skip reason: Change-Id I726e74f5c63a6ed456cb13ea259b58c7a33bec76 with SHA-1 eba72cd4ef is in history
Change-Id: I279ba57ed4ab65b0f792aab70d6d8bf0acd1cad2
am skip reason: Change-Id I55b63a748463a388e1e2991d2d5d6b3023545e60 with SHA-1 3fafd684c5 is in history
Change-Id: I7403a396513cbd4990c444971714a9215712e766
am skip reason: Change-Id I55b63a748463a388e1e2991d2d5d6b3023545e60 with SHA-1 3fafd684c5 is in history
Change-Id: I8e5cf4b83f05068ca2715b9715204af268320ca0
am skip reason: Change-Id Id53d14e5698e5fcc410868424176b00350c7ae79 with SHA-1 fd266f85b6 is in history
Change-Id: Ibd673f45a1f294c637a81e93b43d38c79f64f6ee
am skip reason: Change-Id Id53d14e5698e5fcc410868424176b00350c7ae79 with SHA-1 fd266f85b6 is in history
Change-Id: I55dc1361e00724cce808fec175d57281e88d28ac
am skip reason: Change-Id I55b63a748463a388e1e2991d2d5d6b3023545e60 with SHA-1 529e8aae25 is in history
Change-Id: I669f28648e3d6c912ab48df415e164def0c9a1a2
am skip reason: Change-Id I55b63a748463a388e1e2991d2d5d6b3023545e60 with SHA-1 529e8aae25 is in history
Change-Id: I192079b09c3fc9292fabc2208059f2c8698a9e4d
am skip reason: Change-Id I55b63a748463a388e1e2991d2d5d6b3023545e60 with SHA-1 529e8aae25 is in history
Change-Id: I10aae07c044231d9b6fcdd61488a146b21d8dd8f