This patch groups connect() events per netId. It adds netid and
transport information to serialized ConnectStatistics events.
Test: updated NetdEventListenerServiceTest
updated IpConnectivityMetricsTest
$ runtest frameworks-net passes
Bug: 34901696
Change-Id: I4769496383943e714a1d350c298e093c2ed57477
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
Since background fetch should be synchronized with life cycle of
Activities, so should not create new background thread inside this
method. Not to break existing apps, mark as deprecated and will be
removed from public API untile next release.
New API accepts Handler so that the developer can pass their own thread
.
Test: TBD
Bug: 37253785
Change-Id: I87fdc6a354a829db679253824f42489f25698fa0
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
Add a default prefix for local only hotspot that will be used to
generate WifiConfiguration objects. This prefix will have
random digits appended to reduce AP name collisions.
Bug: 36704909
Test: compiles
Change-Id: I2b9478a12de27cabe13ece2973bce7cd4976ba2f