NetworkStatsService is the only consumer of the data coming from
NetworkStatsFactory, but the factory itself is instantiated and
owned by NetworkManagementService.
Move it into NetworkStatsService instead.
Test: atest FrameworksNetTests
Change-Id: I52df1e545c646927952579da22845a12d1d7563b
am: 09a8de5530 -s ours
am skip reason: change_id I99be7d312d020d242081971c7e522023bbbab072 with SHA1 844ea18005 is in history
Change-Id: I50b62b92261b7386d7a15ab0e876661e8c4b0bac
The "Connected" notification would be shown every time a network
validates after being identified as a captive portal. This causes issues
on networks that have auto-login mechanisms, as a high priority
notification would be shown even though the user was not interacting
with the phone.
The "Connected" notification is intended to confirm to the user that
they successfuly logged in (manually), so only show it after the user
opens the portal on the network.
Bug: 134124044
Test: Flashed, connected to portal: notification shown
Opened portal from command line + revalidate: no notification
Tests passing with change, failing without
Merged-In: I99be7d312d020d242081971c7e522023bbbab072
Merged-In: I7dc1b3a313b255fe89313efb9117bb160efdb533
(cherry picked from commit 0b5a4d862190320d285413b1feb921144fee8420)
Change-Id: I67c124cc34f09c2f186706b5cec839f60d00a90a
The "Connected" notification would be shown every time a network
validates after being identified as a captive portal. This causes issues
on networks that have auto-login mechanisms, as a high priority
notification would be shown even though the user was not interacting
with the phone.
The "Connected" notification is intended to confirm to the user that
they successfuly logged in (manually), so only show it after the user
opens the portal on the network.
Bug: 134124044
Test: Flashed, connected to portal: notification shown
Opened portal from command line + revalidate: no notification
Tests passing with change, failing without
Change-Id: I89e7a7f49019bd7e4686712c56e00bd786eb3ef3
NetworkStatsService uses an internal boolean to know when it has
started for the purpose of preventing access to other internal
variables before they are initialized.
However that boolean is set to true in systemReady() non-atomically
with respect to the initialization of the other variables it guards,
which can cause the system server to crash.
This patch fixes this concurrency bug by moving setting the internal
boolean flag and the variable it guards in one atomic synchronized
block.
This patch also removes code checking if bandwidth control is enabled,
because this is now always true.
Bug: 132767673
Test: Compiled.
Change-Id: Ia089b5767ce271d669879c975508654d4dd03429
am: ebdd783a9b -s ours
am skip reason: change_id I5413393529c4bad3a707df229307542486bcff33 with SHA1 336e846779 is in history
Change-Id: I116cea63ccbfd5346ca218486671abae5176c273
Auto-reconnecting to a network with no or limited Internet
connectivity is not useful. This is because such networks cannot
be used unless the user taps the notification and interacts with
the resulting dialog. But the notification is only shown if the
user manually connects to the network, not if the system
auto-connects to it.
Bug: 130683832
Bug: 130766237
Test: atest FrameworksNetTests
Change-Id: I5413393529c4bad3a707df229307542486bcff33
Merged-In: I5413393529c4bad3a707df229307542486bcff33
Also a few utilities that were in the way, and some opportunistic
cleanups.
Test: FrameworksNetTest NetworkStackTest
Change-Id: I385070e2044fd967cb18f1ffea9a86a4627b742e
am: e660a0a7e2 -s ours
am skip reason: change_id I408750fa0bceb0c1c26afb5fead4e44fb824fbc1 with SHA1 5b3b486b8f is in history
Change-Id: I6645b0b7be6f7d3b9e6fc2a547fad4df4e5e1cab
am: ca8b6ed19f -s ours
am skip reason: change_id I408750fa0bceb0c1c26afb5fead4e44fb824fbc1 with SHA1 5b3b486b8f is in history
Change-Id: I793a942dc543573951b0cc527b3252c23f181a29
am: 03e193c8a7 -s ours
am skip reason: change_id Ia3761f2e78d54866bb2e156d58004396bbc8adc3 with SHA1 ede0d5075b is in history
Change-Id: I5c37a44b17e75e439b7de21a3217237fad6e120b
This change also enables log when keepalive is started.
Bug: 134352656
Test: 1. atest android.net.cts.ConnectivityManagerTest#testSocketKeepaliveLimitTelephony
2. atest FrameworksNetTests
Change-Id: I408750fa0bceb0c1c26afb5fead4e44fb824fbc1
am: 2ae76cdbe8 -s ours
am skip reason: change_id I56c86b0c1912064d5a642991df32d2cefb6a8d5b with SHA1 a070aaa88f is in history
Change-Id: Ib3b27436b44e678f026ce5026abf23db2f50a4cf
This is still sent in an intent.
Bug: 131764329
Fixes: 131764329
Merged-In: I56c86b0c1912064d5a642991df32d2cefb6a8d5b
Change-Id: I64b9d632be97dc51e6085162371bb8c19f410258
(cherry picked from commit e546cb0bd16b7359feeb3c46ba52e64cf91ae4d3)
* changes:
Remove VPN info arrays from NetworkStats(Observer|Recorder)
NetworkStatsFactory: Take VPNs into account for network/battery stats
Remove duplicate line in clat_simple test file
Remove unused lastStats parameter
Revert "Revert "Take all VPN underlying networks into account when migrating traffic for""
am: 08793a3b64 -s ours
am skip reason: change_id Iad0e9a28670e96a3c953518a0d0ccd77e2f2fa80 with SHA1 6988872c91 is in history
Change-Id: I9094b83959e1f75f90edac095060240c129b73b0
This mostly serves to unindent code to make it locally more
readable. It is a functional no-op.
Bug: 135043192
Test: atest FrameworksNetTests
Merged-In: Iad0e9a28670e96a3c953518a0d0ccd77e2f2fa80
Change-Id: I80bebcd04c277f6e4b0665fe1253b2309e3bc535
(cherry picked from commit e1f5759319a4559b3cf89029449878dc56f92bb7)
This mostly serves to unindent code to make it locally more
readable. It is a functional no-op.
Bug: 135043192
Test: atest FrameworksNetTests
Change-Id: Iad0e9a28670e96a3c953518a0d0ccd77e2f2fa80
PARTIAL and NO_INTERNET may happen in the real world for
those transport types that provide internet. These two
notification types should be reasonable notificaitons, not a
terrible failure as the log. For Q, it may be too risky to
display more notifications with other information instead of
SSID. Thus, suppress the wtf log for these two notifications.
Bug: 135043192
Test: atest FrameworksNetTests
Change-Id: I35f3718fa93b403858587d918f0bc596f6c92f3e
Merged-In: I91b92249dc7905aadbc59df50c3bc6da30a8590e
Merged-In: Ia1c2a765b0fb0cc8d440c02533bdc15774a5a3ef
(cherry picked from commit ed0a54bd07ea1c9072459bafeaf796eaa4dad4c5)