This patch changes how DnsEvents are logged in IpConnectivityMetrics.
The following changes are made:
- DnsEventBatch are not logged after 100 queries on the same network
- this allows to merge DnsEvent and DnsEventBatch into one class
- DnsEventBatch are not logged after a network disconnect
- this allows to remove the NetworkCallback
- DnsEvent are now logged similarly to ConnectStats when statistics are
flushed, in a direct call from IpConnectivityMetrics into
NetdEventListenerService, in a direct call from IpConnectivityMetrics
into NetdEventListenerService.
- this allows to remove the Parcelable implementation of DnsEvent
- transports information is added to DnsEvent.
Test: - simplified NetdEventListenerServiceTest covering dns logging
- updated IpConnectivityEventBuilderTest
- updated IpConnectivityMetricsTest
- $ runtest frameworks-net passes
- manually verified $ adb shell dumpsys connmetrics list proto
Bug: 34901696
Change-Id: Ia4b33fd4212741152662a2adbb0533bd1b4902ee
This patch also
- partially reverts commit f927f0c52e7df5b057e7d28888c3cfed164d241a
that exposed a getTransports method on NetworkCapabilities.
- moves enumerateBits to BitUtils (as unpackBits), and adds the
reverse packBit method.
Bug: 34901696
Test: manually looked at $ adb shell dumpsys connmetrics list
Change-Id: Id04f9080e7f75608deeb49306aec34941e71794c
After discussion in the cl we agreed to use "|" as a separator. However String.split() input arg is a regex and not a literal string, so that "|" will actually split the urls characters per characters.
Will revert and resubmit with a comma.
This reverts commit 0908daaaf00e6b56ebed0a0fce9c3e3fe183a06b.
Change-Id: Ifab25e41bec806fbc1d2c13ffd81d4ad91598c89
This patch regroups various hardcoded http codes into well defined
constants. This reduces risk of errors and makes the captive portal
logic clearer.
This patch also fixes the logging when a captive portal detection
probe fails, to take into account https ssl handshake failures: for
well-behaved portals it is expected that the https probe will fail,
however the error message was written before the introduction of the
https probe and had become ambiguous.
Test: built, flashed, tested manually with various portal networks
Bug: 36532213
Change-Id: Ia15f77e268cb414816fc52f92835289f9a9ce92b
This patch introduces a new settings value to specify more than one url
for the fallback http probe in addition to the existing settings value.
If more than one url exists, a network will rotate urls for the fallback
probe one by one everytime the fallback probe is sent.
Test: built, flashed, tested manually with various portal networks.
Bug: 36532213
Change-Id: Icaa1f95c5914e8840c83ccdf071047358a5b760f
- When the change to finish activities was made in ag/2067154, it exposed
an issue in pinned stacks where we would resume the next top activity
once the top activity finished pausing. Normally, the pinned stack is
not focusable, but since it has an alwaysFocusable menu activity it
becomes the focused stack and falls into this case.
Instead of finding the next top activity, we need to find the next top
focusable activity to resume, and fall through to focusing the top
activity in the next focusable stack if there is none.
Bug: 37199067
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testNoResumeAfterTaskOverlayFinishes
Change-Id: Ib79826ff38bb3beb38a40183ddc6819e5040bb27
See accompanying frameworks/native commit
"SurfaceFlinger: Add parent-less relative layering" for a full explanation.
Test: Manual of bug repro steps. Plus tests for new SurfaceControl functionality included in frameworks/native.
Bug: 36693738
Change-Id: Ic54598117c1f44a206d33f03d0cc463fbef43fcc
This patch changes how url configuration values for captive portal
detection are read: instead of re-reading the settings at every probe
detection, the settings are read once when the NetworkMonitor associated
to a network is created.
If the settings are updated, the new values are picked up by new
networks, but not by existing networks. Since captive portal detection
is most important when joining WiFi networks, the newest available
settings values will still be used.
This change prepares introducing further changes for rotating probe
urls. Especially it helps making the detection strategy stateful with
respect to the lifecycle of a single NetworkMonitor.
Test: built, flashed, tested manually with various portal networks
Bug: 36532213
Merged-In: I71cc8bb8b996462f27f50798d67bceee5ffb898d
(cherry picked from commit b03272c9b5d1b5c71ae591f0e38b1d139d11f19f)
Change-Id: I33ac2b52fea6099969c3fec9b60ba0131f9d672d
This patch adds probe type and url to all validation logs about web
probes sent for captive portal detection.
Test: built, flashed, looked at $ adb shell dumpsys connectivity
Bug: 36830206, 36532213
Merged-In: Iee2caaf6664f3d097f9d1888ccc5fece0a95994c
(cherry picked from commit d9ac87ed65aa12b93e0b70f5e8560562c850fde0)
Change-Id: I5ab8bb117d2bbad123136dfbbf78cbe84a7f688e