Anomaly alarms now rely on the flow of events into statsd's socket for
firing alarms. Remove the StatsCompanionService code path, which is
unused now.
Test: m
Bug: 161326200
Change-Id: Ife0b17c281984fc489ef46039cbf5aa7b1346bdb
Merged-In: Ife0b17c281984fc489ef46039cbf5aa7b1346bdb
Anomaly alarms, which are used for prediction-base duration metric
anomaly detection, currently use alarm manager for setting alarms. This
can result in excessive binder calls to SCS to set/cancel the alarms if
the duration metric that the alarm is based on gets stopped/started in
quick succession.
To resolve this without losing precision, we can instead rely on the
flow of events into the statsd socket for this prediction. The socket
receives events very frequently, so there should be minimal (if any)
loss of precision, and we can remove the binder call entirely.
One concern is that we used to hold a wakelock when the alarm fired
(since alarm manager would hold a wakelock), and we now lose this
ability.
Test: atest statsd_test
Test: atest AnomalyDetectionTests
Bug: 161326200
Change-Id: If37e5c6ccd8efa4e822c70a0444fa6b5a31bebca
Merged-In: If37e5c6ccd8efa4e822c70a0444fa6b5a31bebca
Alerts were being incorrectly triggered in pulled value metrics because
a diffed value is always assumed to be over one bucket interval, which
may not be true when multiple buckets are skipped.
Bug: 159390273
Test: atest statsd_test
Change-Id: Iada3df54ebb30353572a14e0db86bed49c5515b0
Merged-In: Iada3df54ebb30353572a14e0db86bed49c5515b0
(cherry picked from commit ec72e87563)
The VERY_VERBOSE_PRINTING flag guards print-logs functionality but is
not present in the prebuilt version of the statsd module. To fix
print-logs, we remove the flag (thereby allowing print-logs to work on
user, userdebug, and eng builds), but require that the caller have root
privileges.
Test: adb shell cmd stats print-logs && adb logcat -s statsd:I (only works
once root privileges are granted)
Bug: 159982879
Change-Id: I2201fc0538876d1d6dfd6ab7abfac43cccc1102f
Merged-In: I2201fc0538876d1d6dfd6ab7abfac43cccc1102f
This attempts to fix an issue where the device will go to sleep while
retrieving a report. If this happens a report may contain inconsistent
timestamps.
Bug: 167329914
Test: m -j
Change-Id: Ibee08d95043759aa1114274378e4d72336174010
Merged-In: Ibee08d95043759aa1114274378e4d72336174010
(cherry picked from commit e0f4b3da97)
.. to match behavior post I1f9662c2bd14b34e00fbc8ebb926538f0329c37a
Bug: 167593637
Test: Javadoc change only.
Change-Id: I4cb9fe4a5ae74b1474f9da39b6aeb3a374f8cf12
Uid sandboxing has been enabled for months now. Remove the old code that
ran before we flipped the flag.
Test: atest statsd_test
Bug: 152544281
Change-Id: Ib7cb79f368ef112774a278a2cf57fffc907a1099
Merged-In: Ib7cb79f368ef112774a278a2cf57fffc907a1099
(cherry picked from commit 75ad6c103f)
Make the IP subnet persistent if it do not conflict with upstream.
It allow client to reuse its IP that usually reduce DHCP procedure.
Bug: 168169687
Test: atest TetheringTests
Change-Id: Iddc5304730dce7b11c5d124b7eddce057d752bbd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1432958
Change-Id: I60ed54651034f21ca1cd253d272ac3478881b4e0
Merged-In: Iddc5304730dce7b11c5d124b7eddce057d752bbd
(cherry picked from commit 8cef61a1b2119caaabb9e672451f3a2ab07d589c)
when users disable areaInfo toggle from CBR, clear areaInfos and
notify listeners that area info updated so that settings and systemUI
could refresh the UI instead of showing outdated area info.
Bug: 162475765
Test: Manual
Change-Id: I8c2b29750817a71165adff3ee64c96249e9d7380
If vpn app make its netmask as 0, PrivateAddressCoordinator
would not able to find suitable address for tethering downstream.
Since tethering do not support vpn as upstream, just ignore vpn
in PrivateAddressCoordinator.
Bug: 166365863
Test: atest TetheringTests
atest CtsTetheringTest
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1413610
Change-Id: I70b49d0a10b80f378dcd2ba78b5bac848e40e5c9
Merged-In: Iabe265467044fea9fa437674ca29ffc7bcdefe3b
(cherry picked from commit 9cd671a4a2)
TetheredClient callback would additional check whether caller has
NETWORK_SETTINGS or {MAINLINE_}NETWORK_STACK permission, but it do not
grant for self accessing. InProcessTethering run in system server, so
the services in system server would fail to call TetheredClient callback.
Grant permission for self process.
Bug: 169231588
Test: atest CtsTetheringTest
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1435273
Change-Id: I8faacd26cc6f3e940af3a0147b84b693cb93503c
Merged-In: Ic04e44aef4df772c718ff25ed331bf02f5940c1d
(cherry picked from commit 4ac111af72)
NetworkInterface#getByName can not get the interface without IP addresses.
When setIncludeTestInterfaces(true) is called, the interface will be
placed in client mode, which will delete the link-local address. So calling
NetworkInterface#getByName to get test interface may not work before
switching to server mode.
Bug: 168215721
Test: atest CtsTethering
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440032
Change-Id: Idf1d18261c954e22989774ae97a12261551b31f6
Merged-In: Ice8adcce1c4b2c86bd219c701b2afa9ba2339f24
(cherry picked from commit ab364519ad)
sendBroadcastAsUserMultiplePermissions was added to Context.java.
Implementing in BridgeContext.
Fix oc-dev since BridgeContext is in frameworks/base/tools/layoutlib,
whereas in later branches the file is in frameworks/layoutlib
Test: Compile / build (actual usage is documented in other bugs)
Bug: 159373687
Change-Id: I8715b6fce7039268eb29914cb15f68ab922f4d3f
Merged-In: I857ea00cc58a0abbb77960643f361dd6dd9c8b56