am skip reason: Change-Id Ic94da540afa479ed18f1b6fbda4ae3216c37476b with SHA-1 1e30781571 is in history
Change-Id: Ife89c4526d5e5f79c09fce585b2f124ea06ff28a
am skip reason: Change-Id If330e85330a4ff713dd420c98d42fa741eabd90a with SHA-1 dddf7d0a9a is in history
Change-Id: I5f7e58d16e30eae69c45a505ea2ee9e4a9802d91
am skip reason: Change-Id Ie2d229be0b6bd239f799989c070475c73a096d71 with SHA-1 00d94e3335 is in history
Change-Id: Ibdeeda75e0bd4f641b349b145b0c849bf2cb94c1
am skip reason: Change-Id Ic6b2f10f2c8b082820e0662eb9cee70d70d28cd6 with SHA-1 825f0828ac is in history
Change-Id: Idf27a0112486d2e0c5b3be419c01228820d8835e
Note that enabling/disabling would not take effect until device
reboot. This will be addressed in follow-up patch.
Test: 1. atest NetworkStatsServieTest SettingsBackupTest
2. adb shell settings put global netstats_combine_subtype_enabled 1|0
Bug: 146415925
Change-Id: Ic94da540afa479ed18f1b6fbda4ae3216c37476b
Merged-In: Ic94da540afa479ed18f1b6fbda4ae3216c37476b
(cherry picked from commit 550d61b8fa and
fix merge conflict in SettingsBackupTest)
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 ff1d70e364)
Add a NetworkTemplate build function that allows user to specify
subType. NetworkStats corresponding to the same group would
be retrieved.
Test: atest FrameworksNetTests
Bug: 129082217
Change-Id: Ie2d229be0b6bd239f799989c070475c73a096d71
Merged-In: Ie2d229be0b6bd239f799989c070475c73a096d71
(cherry picked from commit ec1c5fe86c)
Previously network stats could be recorded by different rat type.
However, the feature was disabled by ag/173504 since rat type
frequently flapping between HSPA+ and UMTS.
Given that this feature might be useful for collecting metrics,
re-implement it based on current architecture and reduce the
overhead introduced by frequently flapping by:
1. only react when rat type changes between 2G/3G/4G/5G.
2. reduce the number of records by only recording a subset
of rat type that represented for a given network class.
3. enforce 1 second rate limit if flapping too much.
Note that the feature is still disabled but will be enabled
in follow-up patches.
Test: manual test
Bug: 129082217
Change-Id: Ic6b2f10f2c8b082820e0662eb9cee70d70d28cd6
Merged-In: Ic6b2f10f2c8b082820e0662eb9cee70d70d28cd6
(cherry picked from commit 20f4805aad)
Note that enabling/disabling would not take effect until device
reboot. This will be addressed in follow-up patch.
Test: 1. atest NetworkStatsServieTest SettingsBackupTest
2. adb shell settings put global netstats_combine_subtype_enabled 1|0
Bug: 146415925
Change-Id: Ic94da540afa479ed18f1b6fbda4ae3216c37476b
Merged-In: Ic94da540afa479ed18f1b6fbda4ae3216c37476b
(cherry picked from commit c4f77ac90bf2e48a655ad19b162fe74a23bf3fb0)
This CL adds a setIncludeTestInterfaces method to EthernetManager
that, when called, causes the Ethernet service to recognize and
manage test interfaces created by TestNetworkManager.
Bug: 150644681
Test: Tested by EthernetTetheringTest in same topic
Change-Id: I86eef7a93267f800dbfc8eafd307effa76a344ca
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 a NetworkTemplate build function that allows user to specify
subType. NetworkStats corresponding to the same group would
be retrieved.
Test: atest FrameworksNetTests
Bug: 129082217
Change-Id: Ie2d229be0b6bd239f799989c070475c73a096d71
Merged-In: Ie2d229be0b6bd239f799989c070475c73a096d71
(cherry picked from commit e19045cc4ab1f2cd133ce5dc0c3a38e3275417ad)
Previously network stats could be recorded by different rat type.
However, the feature was disabled by ag/173504 since rat type
frequently flapping between HSPA+ and UMTS.
Given that this feature might be useful for collecting metrics,
re-implement it based on current architecture and reduce the
overhead introduced by frequently flapping by:
1. only react when rat type changes between 2G/3G/4G/5G.
2. reduce the number of records by only recording a subset
of rat type that represented for a given network class.
3. enforce 1 second rate limit if flapping too much.
Note that the feature is still disabled but will be enabled
in follow-up patches.
Test: manual test
Bug: 129082217
Change-Id: Ic6b2f10f2c8b082820e0662eb9cee70d70d28cd6
Merged-In: Ic6b2f10f2c8b082820e0662eb9cee70d70d28cd6
(cherry picked from commit 15ab452e7e3f00289fbedbdb86c512ad560dda7e)
am skip reason: Change-Id I9495a198cf247e6c79100f7ac1edcea370b071de with SHA-1 544bc807a4 is in history
Change-Id: I214ca8cb07535dbe33be18aa9a49d31811451ff5
am skip reason: Change-Id I9495a198cf247e6c79100f7ac1edcea370b071de with SHA-1 544bc807a4 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 e7c6c25653 is in history
Change-Id: Ib807d1cf6bf4c2a9be054bf5df7377f540201c63
am skip reason: Change-Id Id1b8f41be79f847ad73197ff0e18258b6ee8a730 with SHA-1 c7e8100faa is in history
Change-Id: Ie5456b60b60dbd10b6245a971a1f908184549782
am skip reason: Change-Id I141393f229e772d2eb9f7c156849e379bd71b845 with SHA-1 9a4eeaea2f is in history
Change-Id: I47afb9f93dc191b4e04e4d5bd5ff4a1cfd566b02
am skip reason: Change-Id Idfebd0a1988c3dcfd812d87e30f6a2034d6fbf6b with SHA-1 f2b6d74356 is in history
Change-Id: If3e435581158764085240c431845c7873bac9258
am skip reason: Change-Id I801ddc49e283a254b9586700c9b597c0adb0d459 with SHA-1 e7c6c25653 is in history
Change-Id: I480e66ff5b65a1ba24ecffb288ba429c2f94219e
am skip reason: Change-Id Id1b8f41be79f847ad73197ff0e18258b6ee8a730 with SHA-1 c7e8100faa is in history
Change-Id: Ia71c3307443fc1d994fd07dcf20d5ca32d145765
am skip reason: Change-Id I141393f229e772d2eb9f7c156849e379bd71b845 with SHA-1 9a4eeaea2f is in history
Change-Id: I80ab45b6a34b66f1bed766b3e2fb72926325021e
am skip reason: Change-Id Idfebd0a1988c3dcfd812d87e30f6a2034d6fbf6b with SHA-1 f2b6d74356 is in history
Change-Id: I41bb8c1d96e494f4e54ab59138f1257cc23f05c7
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)
This change add several javadoc for NetworkStats and its Entry
class. Also remove IFACE_ALL constant accordlingly.
Test: atest FrameworkNetTests
Test: m doc-comment-check-docs
Bug: 148895143
Change-Id: Id1b8f41be79f847ad73197ff0e18258b6ee8a730
Merged-In: Id1b8f41be79f847ad73197ff0e18258b6ee8a730
(cherry picked from aosp/1256351)
Currently, registerNetworkStatsProvider requires the
UPDATE_DEVICE_STATS permission. This is a privileged permission
so it can be granted to preinstalled apps. Thus, apps like
GmsCore, or preinstalled apps will be able to update network stats.
This change checks for a new permission that would only allow
signature apps to declare that. Also check
MAINLINE_NETWORK_STACK permission to allow NetworkStack process
to use it.
Test: adb shell dumpsys netstats
Test: atest FrameworksNetTests
Bug: 149652079
Change-Id: Iaecbf10a7610461bd52e315659006c7332c416e6
Merged-In: Iaecbf10a7610461bd52e315659006c7332c416e6
Merged-In: Idfebd0a1988c3dcfd812d87e30f6a2034d6fbf6b
(cherry picked from commit e9e8d8f9ff096c1723eba1d74b17bb7cade7f23b)
am skip reason: Change-Id Ie023c8371785fc239c54eacbf056141c2e9e3444 with SHA-1 050c7de093 is in history
Change-Id: I574c5bfe597d008a8775978b37fa0f5d1d9dd67d
am skip reason: Change-Id Ie023c8371785fc239c54eacbf056141c2e9e3444 with SHA-1 9d4e21f0be is in history
Change-Id: Ic360dcd155ac43a7131db8a8bcfbfb1d0cbfae5e
am skip reason: Change-Id Ie023c8371785fc239c54eacbf056141c2e9e3444 with SHA-1 9d4e21f0be is in history
Change-Id: Ie4565f23be593f4ed5f398ffd320eb8897fd9736