Switch on the recording in device side. Metrics will be
collected in follow-up patches which can be independently
enabled/disabled.
This change also fix the fail in NetworkStatsCollectionTest
which caused by enabling this feature, where the rounding
problem happened when records are distributed into smaller
buckets and categorized into more NetworkIdentity.
Test: atest FrameworksNetTests
Bug: 129082217
Change-Id: If330e85330a4ff713dd420c98d42fa741eabd90a
Merged-In: If330e85330a4ff713dd420c98d42fa741eabd90a
(cherry picked from commit 2d4fa2c0fae8c2d79a25093d9f732a33c2f91dd4)
Add test for constructor and parcel
Test: atest CtsNetTestCasesLatestSdk:android.net.NattKeepalivePacketDataTest
on both Q and R devices
Bug: 151402211
Change-Id: I97015365604be1846e3ecbaf60ac99e334705565
Merged-In: I97015365604be1846e3ecbaf60ac99e334705565
Add test for constructor of KeepalivePacketData and
InvalidPacketException
Bug: 151109466
Test: atest CtsNetTestCasesLatestSdk:android.net.KeepalivePacketDataTest
on both Q and R devices
Change-Id: Ic9db4b9b83ff96c87f41c5f381763c3ee8dd27c8
Merged-In: Ic9db4b9b83ff96c87f41c5f381763c3ee8dd27c8
am skip reason: Change-Id I9495a198cf247e6c79100f7ac1edcea370b071de with SHA-1 8dd5ea04d6 is in history
Change-Id: I19399123661123386472ff3f39d268d85917cbe1
Currently, in NetworkStats, there are many methods to manipulate
the records. However, some methods are similar and ambiguous,
such as addEntry, addValues, setValues, addIfaceValues,
combineValues and combineAllValues.
Thus, properly grouping and renaming methods are necessary.
In this change, for methods that add one record conditionally,
name them addEntry.
addValues -> addEntry
Test: atest FrameworksNetTests ImsPhoneCallTrackerTest TetheringTests
Fix: 148895143
Change-Id: I9495a198cf247e6c79100f7ac1edcea370b071de
Merged-In: I9495a198cf247e6c79100f7ac1edcea370b071de
(cherry picked from ag/10700816)
am skip reason: Change-Id I801ddc49e283a254b9586700c9b597c0adb0d459 with SHA-1 cc38304ad8 is in history
Change-Id: I480e66ff5b65a1ba24ecffb288ba429c2f94219e
am skip reason: Change-Id I141393f229e772d2eb9f7c156849e379bd71b845 with SHA-1 0c88795cb5 is in history
Change-Id: I80ab45b6a34b66f1bed766b3e2fb72926325021e
* changes:
[SP25] Rename functions that add Entry conditionally
[SP24] Rename functions that add Entry unconditionally
[SP23] Address misc API review comment about NetworkStats
[SP21] Address comments for API council review about aosp/1172143
[SP20] Check signature permission when accessing network stats provider
am skip reason: Change-Id Ieea727ecee6cf358a53a215fd4b06233dfe967ea with SHA-1 22d0bfd7c4 is in history
Change-Id: I593e009d15d961fc44f5433cb8638aa7686d2b16
API Council feedback suggests renaming ConnectivityDiagnosticsCallback
'onConnectivityReport' function to be 'onConnectivityReportAvailable'.
Bug: 150598997
Test: atest FrameworksNetTests
Change-Id: Ieea727ecee6cf358a53a215fd4b06233dfe967ea
Merged-In: Ieea727ecee6cf358a53a215fd4b06233dfe967ea
am skip reason: Change-Id I7a443c368cf1ac470fbe40883ca24bc3143153b0 with SHA-1 a84aee7ad3 is in history
Change-Id: I9b0525df547a8f79b739df90f39c2aad412de2c2
am skip reason: Change-Id Ibe2874f2a5249432270aa1b9eb7d004bbba35ac2 with SHA-1 a830439b37 is in history
Change-Id: If88006f48fc2f25ca989d830a37d651a75f68448
Currently, in NetworkStats, there are many methods to manipulate
the records. However, some methods are similar and ambiguous,
such as addEntry, addValues, setValues, addIfaceValues,
combineValues and combineAllValues.
Thus, properly grouping and renaming methods are necessary.
In this change, for methods that add one record conditionally,
name them addEntry.
addValues -> addEntry
Test: atest FrameworksNetTests ImsPhoneCallTrackerTest TetheringTests
Fix: 148895143
Change-Id: I9495a198cf247e6c79100f7ac1edcea370b071de
Currently, in NetworkStats, there are many methods to manipulate
the records. However, some methods are similar and ambiguous,
such as addEntry, addValues, setValues, addIfaceValues,
combineValues and combineAllValues.
Thus, properly grouping and renaming methods are necessary.
In this change, for methods that add one record unconditionally,
name them insertEntry.
setIfaceValues -> insertEntry
addEntry -> insertEntry
Test: atest FrameworksNetTests ImsPhoneCallTrackerTest TetheringTests
Test: m doc-comment-check-docs
Bug: 148895143
Change-Id: I801ddc49e283a254b9586700c9b597c0adb0d459
Merged-In: I801ddc49e283a254b9586700c9b597c0adb0d459
(cherry picked from aosp/1256352)
Currently, printing a NetworkAgentInfo results in a very long
string. Make it a bit shorter by:
- Not printing a number of fields in NetworkInfo that are no
longer used.
- Instead of printing flags regardless of whether they are true
false, only print ones that are true. For example, this changes
everCaptivePortalDetected{true} lastCaptivePortalDetected{false} captivePortalValidationPending{false}
to:
everCaptivePortalDetected
- Only printing clat information if clatd is started.
Also, put the long and variable-length fields lp and nc at the
end of the output.
Test: manual
Change-Id: I3312286be307ef1762890cbc6b717f12ce5b2b92
am skip reason: Change-Id Ie30efa172f93a7557fb6ef56f4daf80e958c3787 with SHA-1 d884e63e61 is in history
Change-Id: I3f81a90e806947d60fb8fe4f4856491284a43ed0
am skip reason: Change-Id Ifde69b579cfe5b813766f676acb10e436e64a44c with SHA-1 1378facba4 is in history
Change-Id: Ia476746bb37fee381245f49a801bf9abb32ba04d
am skip reason: Change-Id I065525fdbd64b9509ef0f47bb35954d267c65fd2 with SHA-1 58d144f6ed is in history
Change-Id: I25e57f7208899f370a5131daa271dbf40ffcbe49