Commit Graph

484571 Commits

Author SHA1 Message Date
Corina Grigoras
72c4151616 Merge "Add core scoped storage host test to test mapping." into mainline-prod 2020-10-12 16:49:16 +00:00
TreeHugger Robot
912dc1511c Merge "[RESTRICT AUTOMERGE] Fix VrDisplayTest failure" into rvc-dev am: 936cd3b3f1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12683367

Change-Id: I4ba52f8c4af8bb9718f6ab60a295203369e35068
2020-10-12 11:43:53 +00:00
Charles Chen
b0d222b4a1 [RESTRICT AUTOMERGE] Fix VrDisplayTest failure am: 8d71bdf3e6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12683367

Change-Id: I64a3654906a73f5d8f55673dde247c12a2891084
2020-10-12 11:43:51 +00:00
TreeHugger Robot
936cd3b3f1 Merge "[RESTRICT AUTOMERGE] Fix VrDisplayTest failure" into rvc-dev 2020-10-12 11:28:41 +00:00
Mark Chien
4c4f42a7f5 Merge changes I60ed5465,I70b49d0a into mainline-prod
* changes:
  Make the IP subnet persistent till reboot
  Make PrivateAddressCoordinator ignore vpn network
2020-10-12 10:03:26 +00:00
Jeffrey Huang
824bb62751 Merge "Prevent incorrect alert triggering" into mainline-prod 2020-10-10 02:08:05 +00:00
Jeffrey Huang
9975537547 Merge changes Ife0b17c2,If37e5c6c into mainline-prod
* changes:
  Remove dead code for AnomalyAlarm
  Remove alarm manager dependency from anomalyalarms
2020-10-10 01:04:31 +00:00
Jeffrey Huang
5694be8778 Merge "Delete more unused includes in statsd" into mainline-prod 2020-10-09 21:56:09 +00:00
Jeffrey Huang
d4ae64b9ea Merge "Fix print-logs" into mainline-prod 2020-10-09 21:55:50 +00:00
Jeffrey Huang
b6dd7bcc73 Merge "Increase event queue limit to 4000" into mainline-prod 2020-10-09 21:55:39 +00:00
Jeffrey Huang
802eb47994 Merge "Hold a wakelock while retrieving reports" into mainline-prod 2020-10-09 21:55:25 +00:00
Tej Singh
01b8e6df38 Remove dead code for AnomalyAlarm
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
2020-10-09 14:15:35 -07:00
Tej Singh
d9014e7314 Remove alarm manager dependency from anomalyalarms
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
2020-10-09 14:15:35 -07:00
Linus Tufvesson
9b95f61aeb Update javadoc for setLaunchDisplayId am: 334190f26e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12794770

Change-Id: If6e12055adfbe330ef00f36d661aaccd64bfded4
2020-10-09 21:15:15 +00:00
Jeffrey Huang
d94084112f Prevent incorrect alert triggering
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)
2020-10-09 17:44:42 +00:00
Tom Cherry
d868d17b4f Delete more unused includes in statsd
Test: build
Change-Id: Ie639f57f86c2573cd5e06a1fa9397487f4b3f235
Merged-In: Ie639f57f86c2573cd5e06a1fa9397487f4b3f235
(cherry picked from commit fd5b18820c)
2020-10-09 17:43:42 +00:00
Ruchir Rastogi
1a6164c94a Fix print-logs
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
2020-10-09 10:39:59 -07:00
Jeffrey Huang
1ea7ebd61d Increase event queue limit to 4000
Bug: 169089731
Test: m -j
Change-Id: I9fb8707a5eb190b5749af84e3eb65567b87439bc
Merged-In: I9fb8707a5eb190b5749af84e3eb65567b87439bc
(cherry picked from commit 29edf77b15)
2020-10-09 17:39:30 +00:00
Jeffrey Huang
c6f24fa5e0 Hold a wakelock while retrieving reports
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)
2020-10-09 17:39:03 +00:00
Linus Tufvesson
334190f26e Update javadoc for setLaunchDisplayId
.. to match behavior post I1f9662c2bd14b34e00fbc8ebb926538f0329c37a

Bug: 167593637
Test: Javadoc change only.
Change-Id: I4cb9fe4a5ae74b1474f9da39b6aeb3a374f8cf12
2020-10-09 09:54:40 +00:00
Tej Singh
ce72a1f884 Remove old puller code from uid sandboxing
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)
2020-10-08 18:23:37 +00:00
Chen Xu
51571f8993 Merge "area info update improvement" into mainline-prod 2020-10-08 17:50:15 +00:00
TreeHugger Robot
ffb4f52167 Merge "Do not re-initialize synthetic password" into rvc-dev am: 5ad4ec37a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12653063

Change-Id: Ie7c727d71e0d4032f74dfc87df02f9c3d89cb7af
2020-10-08 10:55:15 +00:00
TreeHugger Robot
5ad4ec37a0 Merge "Do not re-initialize synthetic password" into rvc-dev 2020-10-08 10:37:53 +00:00
TreeHugger Robot
a50be49dd4 Merge "Fix storing the wrong value of mLockdown in setting" into oc-mr1-dev am: 83739b6db9 am: a2a586a61a am: d29dc3d991 am: e7069bce3c am: f1c038465d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12735135

Change-Id: I33bc6c6b1c1ce5adffe1ef7ad84d18833d996240
2020-10-08 05:36:39 +00:00
TreeHugger Robot
f1c038465d Merge "Fix storing the wrong value of mLockdown in setting" into oc-mr1-dev am: 83739b6db9 am: a2a586a61a am: d29dc3d991 am: e7069bce3c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12735135

Change-Id: I0b180698048fb1c643d90f2d038d1df8d66fc671
2020-10-08 05:05:38 +00:00
TreeHugger Robot
e7069bce3c Merge "Fix storing the wrong value of mLockdown in setting" into oc-mr1-dev am: 83739b6db9 am: a2a586a61a am: d29dc3d991
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12735135

Change-Id: Ic730c4d98a309aadcde740d77582ffb7d788337f
2020-10-08 04:54:24 +00:00
TreeHugger Robot
d29dc3d991 Merge "Fix storing the wrong value of mLockdown in setting" into oc-mr1-dev am: 83739b6db9 am: a2a586a61a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12735135

Change-Id: Id5bfe41bdf8ce53c5da5e9d6322abf7f9df46837
2020-10-08 04:27:35 +00:00
Mark Chien
741959e1eb Merge "Remove double check interface by NetworkInterface" into mainline-prod 2020-10-08 04:17:59 +00:00
Mark Chien
19d19662f3 Merge "Fix TetheredClient callback fail in InProcessTethering" into mainline-prod 2020-10-08 04:17:35 +00:00
TreeHugger Robot
a2a586a61a Merge "Fix storing the wrong value of mLockdown in setting" into oc-mr1-dev am: 83739b6db9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12735135

Change-Id: I52b4099eca7e8c8069b7fd7446784aae1a0569bc
2020-10-08 04:10:10 +00:00
TreeHugger Robot
83739b6db9 Merge "Fix storing the wrong value of mLockdown in setting" into oc-mr1-dev 2020-10-08 03:40:59 +00:00
David Su
dbd9ded17e [automerger skipped] RESTRICT AUTOMERGE Implement sendBroadcastAsUserMultiplePermissions in BridgeContext. am: 752cb249a6 -s ours am: 816fd66d64 -s ours am: d840f0c7da -s ours am: 88ec485f39 -s ours am: 3b9f0fb6c3 -s ours am: 3ea188d4d2 -s ours am: 81373b0b89 -s ours
am skip reason: Change-Id I857ea00cc58a0abbb77960643f361dd6dd9c8b56 with SHA-1 e57c25a451 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12779618

Change-Id: I925e034e8140177ad0d3bfd1d30ced9f6ca10c9b
2020-10-08 02:35:58 +00:00
David Su
81373b0b89 [automerger skipped] RESTRICT AUTOMERGE Implement sendBroadcastAsUserMultiplePermissions in BridgeContext. am: 752cb249a6 -s ours am: 816fd66d64 -s ours am: d840f0c7da -s ours am: 88ec485f39 -s ours am: 3b9f0fb6c3 -s ours am: 3ea188d4d2 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12779618

Change-Id: Iff6123ae0567a9066158c2c4b7a07ec3508e1bd7
2020-10-08 02:13:39 +00:00
David Su
3ea188d4d2 [automerger skipped] RESTRICT AUTOMERGE Implement sendBroadcastAsUserMultiplePermissions in BridgeContext. am: 752cb249a6 -s ours am: 816fd66d64 -s ours am: d840f0c7da -s ours am: 88ec485f39 -s ours am: 3b9f0fb6c3 -s ours
am skip reason: Change-Id I857ea00cc58a0abbb77960643f361dd6dd9c8b56 with SHA-1 e57c25a451 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12779618

Change-Id: I85309b43227c6fcbea1310281ccf7b42981bf1ca
2020-10-08 01:46:19 +00:00
David Su
3b9f0fb6c3 [automerger skipped] RESTRICT AUTOMERGE Implement sendBroadcastAsUserMultiplePermissions in BridgeContext. am: 752cb249a6 -s ours am: 816fd66d64 -s ours am: d840f0c7da -s ours am: 88ec485f39 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12779618

Change-Id: I6c39f346377c9f591d4207b3c2288344470276e6
2020-10-08 01:25:05 +00:00
David Su
88ec485f39 [automerger skipped] RESTRICT AUTOMERGE Implement sendBroadcastAsUserMultiplePermissions in BridgeContext. am: 752cb249a6 -s ours am: 816fd66d64 -s ours am: d840f0c7da -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12779618

Change-Id: I36bdfb8c03950173e51ea9815a6fda619126aff8
2020-10-08 00:53:06 +00:00
David Su
d840f0c7da [automerger skipped] RESTRICT AUTOMERGE Implement sendBroadcastAsUserMultiplePermissions in BridgeContext. am: 752cb249a6 -s ours am: 816fd66d64 -s ours
am skip reason: Change-Id I857ea00cc58a0abbb77960643f361dd6dd9c8b56 with SHA-1 e57c25a451 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12779618

Change-Id: Idefd4af0be5dce2baf988135f3062029749dc95b
2020-10-08 00:24:07 +00:00
Mark Chien
ce9b47e542 Make the IP subnet persistent till reboot
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)
2020-10-08 00:21:26 +00:00
David Su
816fd66d64 [automerger skipped] RESTRICT AUTOMERGE Implement sendBroadcastAsUserMultiplePermissions in BridgeContext. am: 752cb249a6 -s ours
am skip reason: Change-Id I857ea00cc58a0abbb77960643f361dd6dd9c8b56 with SHA-1 e57c25a451 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12779618

Change-Id: I19aeca326d6f4faae382fb6a140acde81602eb3a
2020-10-08 00:11:38 +00:00
Chen Xu
8c4983fd63 area info update improvement
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
2020-10-07 21:28:50 +00:00
Treehugger Robot
5bd701b278 Make PrivateAddressCoordinator ignore vpn network
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)
2020-10-07 17:48:13 +00:00
Treehugger Robot
aaeaa420c2 Fix TetheredClient callback fail in InProcessTethering
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)
2020-10-07 17:46:29 +00:00
Treehugger Robot
3ec0bfd1ea Remove double check interface by NetworkInterface
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)
2020-10-07 17:44:55 +00:00
David Su
752cb249a6 RESTRICT AUTOMERGE Implement sendBroadcastAsUserMultiplePermissions in BridgeContext.
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
2020-10-07 14:41:24 +00:00
David Su
9aa9ebde67 [automerger skipped] Merge "Backport sendBroadcastAsUserMultiplePermissions to oc-dev" into oc-dev am: d1bcf628bd am: 60cf3eebd5 -s ours am: 615d6b6ba6 -s ours am: aeac5e7d30 -s ours am: 5c2b86fbed -s ours am: 4c94806e28 -s ours am: 008d947b59 -s ours
am skip reason: Change-Id I857ea00cc58a0abbb77960643f361dd6dd9c8b56 with SHA-1 ea7ef4ad2a is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12724292

Change-Id: Ic2f1047facd19ae8f7da52668705022e6ac9406a
2020-10-07 09:34:59 +00:00
David Su
008d947b59 [automerger skipped] Merge "Backport sendBroadcastAsUserMultiplePermissions to oc-dev" into oc-dev am: d1bcf628bd am: 60cf3eebd5 -s ours am: 615d6b6ba6 -s ours am: aeac5e7d30 -s ours am: 5c2b86fbed -s ours am: 4c94806e28 -s ours
am skip reason: Change-Id I857ea00cc58a0abbb77960643f361dd6dd9c8b56 with SHA-1 ea7ef4ad2a is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12724292

Change-Id: If5edb76ce859af8506a381856c6b3b0058aee541
2020-10-07 09:18:41 +00:00
David Su
4c94806e28 [automerger skipped] Merge "Backport sendBroadcastAsUserMultiplePermissions to oc-dev" into oc-dev am: d1bcf628bd am: 60cf3eebd5 -s ours am: 615d6b6ba6 -s ours am: aeac5e7d30 -s ours am: 5c2b86fbed -s ours
am skip reason: Change-Id I857ea00cc58a0abbb77960643f361dd6dd9c8b56 with SHA-1 ea7ef4ad2a is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12724292

Change-Id: Id637abc5705e488e2bc77122e052b9d3ea475ae3
2020-10-07 08:32:52 +00:00
David Su
5c2b86fbed [automerger skipped] Merge "Backport sendBroadcastAsUserMultiplePermissions to oc-dev" into oc-dev am: d1bcf628bd am: 60cf3eebd5 -s ours am: 615d6b6ba6 -s ours am: aeac5e7d30 -s ours
am skip reason: Change-Id I857ea00cc58a0abbb77960643f361dd6dd9c8b56 with SHA-1 ea7ef4ad2a is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12724292

Change-Id: Ic97189261040a3eef447064ceed038727fb11120
2020-10-07 08:16:39 +00:00
David Su
aeac5e7d30 [automerger skipped] Merge "Backport sendBroadcastAsUserMultiplePermissions to oc-dev" into oc-dev am: d1bcf628bd am: 60cf3eebd5 -s ours am: 615d6b6ba6 -s ours
am skip reason: Change-Id I857ea00cc58a0abbb77960643f361dd6dd9c8b56 with SHA-1 ea7ef4ad2a is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12724292

Change-Id: I7bedb3b7b8da1bdbe3f483b5186d7864ffc22f7a
2020-10-07 07:58:20 +00:00