Commit Graph

1502 Commits

Author SHA1 Message Date
TreeHugger Robot
457318ef6d Merge "Fixes SparseSetArray#add return logic" 2020-01-23 16:39:49 +00:00
Al Sutton
c8f1f33ed4 Merge "Add feature flag for "no data" backup calls" 2020-01-23 07:31:51 +00:00
Automerger Merge Worker
ac3c3256aa Merge "Add new module-lib APIs for MTS testing" am: b9e3e9e34c am: 876c59823e am: 8c4c7d0039
Change-Id: I37488a81d4066d240bdc0a22dbd3c72cafd55749
2020-01-22 15:35:36 +00:00
Neil Fuller
876c59823e Merge "Add new module-lib APIs for MTS testing"
am: b9e3e9e34c

Change-Id: I3acc8118e444ba3255f393a622ea8405c03ffe03
2020-01-22 07:09:25 -08:00
Al Sutton
27c64a3bed Add feature flag for "no data" backup calls
This will allow us to turn off the new functionality while the
transport implementations are updated.

Bug: 147481066
Test: m -j RunBackupFrameworksServicesRoboTests
Change-Id: I8c0019ff80d94dd8d94299a7b03b78e3081f2b8e
2020-01-22 13:23:45 +00:00
Jay Aliomer
15d855465b Custom dark theme scheduling
allows the use to set the start and end automatic dark theme
activation within a day.
Fixes: 147649309
Test: atest UiModeManagerServiceTest UiModeManagerTest
Change-Id: Iaa3593d4e8863412e3703ce9f089b88dd4df1225
2020-01-21 14:13:23 -05:00
Neil Fuller
2551c033df Add new module-lib APIs for MTS testing
Several android.timezone classes have already been exposed for the
telephony module work, so these tests provide coverage for those.
Additional APIs have been exposed for MTS testing, i.e. to provide
greater confidence that the tzdata module data is correct / is
being read correctly.

Also, small changes to existing code to make them consistent with new
classes. Small docs improvements.

Bug: 147884233
Test: see system/timezone change
Change-Id: I047b29f17a41993f859947a6d6c3685896fe4cb6
2020-01-21 17:17:31 +00:00
Meng Wang
07bb82392d Merge "Expose logToRadioBuffer as system API" 2020-01-16 23:45:39 +00:00
Patrick Baumann
2c82a4b593 Fixes SparseSetArray#add return logic
Docs state that adding a key value pair that already exists will return
false, else true. The actual behavior is reverse. This change fixes
that.

Test: atest AppStateTrackerTest
Change-Id: I2593f2ba22b5972cccb1c0b3dc5aabb4ed65a023
2020-01-16 14:58:28 -08:00
Meng Wang
aa2ba8e941 Expose logToRadioBuffer as system API
Bug: 144374158
Test: make
Change-Id: I2d25a5844733ed7f1e0bb3f66d39f746f0f7acd8
2020-01-16 12:02:33 -08:00
Julia Reynolds
dcd70d6ec6 Allow conversations to be demoted out of the conversation space
Also default the flag to allow more notifications into that
space to on.

Test: atest
Bug: 137397357
Change-Id: I225f462879bdb28411cc631a3e259b4c71ba7394
2020-01-16 14:39:46 -05:00
TreeHugger Robot
e46c7474a2 Merge "Remove feature flag" 2020-01-16 15:10:17 +00:00
Muhammad Qureshi
91f03e0047 Merge "StatsEvent @SystemApi" 2020-01-16 01:22:35 +00:00
Xin Li
e13851556b DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp-without-vendor (6129114) into stage-aosp-master
Bug: 146167222
Change-Id: Ifeb003ec9b3bf824f04d31a117aea65d517241fb
2020-01-15 16:15:41 -08:00
Raff Tsai
e643911963 Remove feature flag
Bug: 141601408
Test: rebuild
Change-Id: If56d4f95413f029e3d4501d5daa129f6d78f9bca
2020-01-16 05:25:29 +08:00
Muhammad Qureshi
089d1bb28d StatsEvent @SystemApi
Make StatsEvent and StatsLog.write(StatsEvent) @SystemApi.

Bug: 146383532
Test: m

Change-Id: I15050734e757bdb622fb83e3ef244a6ebd26923b
2020-01-15 12:02:01 -08:00
TreeHugger Robot
9b10a80412 Merge "Flag to bypass shortcut req for "convo" notifs" 2020-01-14 03:50:40 +00:00
Steve Elliott
b8cede42e1 Flag to bypass shortcut req for "convo" notifs
Enabling this flag in

  Settings > System > Developer options > Feature flags

will bypass the ShortcutId requirement for MessagingStyle
notifications to be classified as "conversations". This exists in
order to test this style of notifications on real apps, before the API
exists for them opt-in for real.

Test: manual
Bug: 147591608
Change-Id: Ifaba2891f2101f1151053290c57f5249c13a46c1
2020-01-13 13:47:43 -05:00
Neil Fuller
845146b012 Make NtpTrustedTime safer / expand docs
This commit makes a number of changes:
1) Documents / enforces thread safety, removes or deprecates unsafe
check-then-do methods / adds a way to get the NTP query result
atomically.
2) Delays configuration lookup until point of use: the config can change
due to various possible config overlays, e.g. MCC-based config.

(1) is because the threading model is currently unclear / possibly
unsafe - it looks like NtpTrustedTime is supposed to be single threaded
but it's also a singleton so could be accessed from multiple threads.
If NtpTrustedTime were not a singleton things might be easier but the
@UnsupportedAppUsage makes it difficult to change now.
(2) is to address the same issue as https://r.android.com/1182530,
contributed by Luca Stefani.

Bug: 140712361
Test: build only
Merged-In: Ie09da9db5d853b59829886a020de21a88da5dd51
Change-Id: Ie09da9db5d853b59829886a020de21a88da5dd51
(cherry picked from commit 65f0f31bde)
2020-01-13 16:54:14 +00:00
Neil Fuller
65f0f31bde Make NtpTrustedTime safer / expand docs
This commit makes a number of changes:
1) Documents / enforces thread safety, removes or deprecates unsafe
check-then-do methods / adds a way to get the NTP query result
atomically.
2) Delays configuration lookup until point of use: the config can change
due to various possible config overlays, e.g. MCC-based config.

(1) is because the threading model is currently unclear / possibly
unsafe - it looks like NtpTrustedTime is supposed to be single threaded
but it's also a singleton so could be accessed from multiple threads.
If NtpTrustedTime were not a singleton things might be easier but the
@UnsupportedAppUsage makes it difficult to change now.
(2) is to address the same issue as https://r.android.com/1182530,
contributed by Luca Stefani.

Bug: 140712361
Test: build only
Change-Id: Ie09da9db5d853b59829886a020de21a88da5dd51
2020-01-13 16:49:20 +00:00
Treehugger Robot
9938c70fb5 Merge "Use new UnsupportedAppUsage annotation." 2020-01-13 13:05:17 +00:00
Automerger Merge Worker
00f335412b Merge changes I978ac321,I5675a80c,I56ef3cc4,I1cdaf002 am: 2ff0a7bd58 am: 3bb4823ce5
Change-Id: Iccbb591430093ac42fa813648fa4ece4b17a0ea3
2020-01-11 01:17:27 +00:00
Automerger Merge Worker
a6f8a96d6d Merge "Add JNI call for writing StatsEvent to statsd." am: 9e52462c48 am: a4bba9adf8
Change-Id: I22294b7a9a0eb15b82b865d6ad271b59af9ef9ba
2020-01-11 01:17:04 +00:00
Treehugger Robot
2ff0a7bd58 Merge changes I978ac321,I5675a80c,I56ef3cc4,I1cdaf002
* changes:
  Add --supportQ flag to java StatsLog codegen
  Support new socket schema in native codegen
  Move statsd metadata from statslog to atoms_info
  Fix StatsEvent memory usage for pulled events
2020-01-11 00:42:14 +00:00
Treehugger Robot
9e52462c48 Merge "Add JNI call for writing StatsEvent to statsd." 2020-01-11 00:41:30 +00:00
Automerger Merge Worker
874930a65d Merge changes I2159bf13,I93146faa am: baa778df4d am: 62dfd98234
Change-Id: Ifac52f18ce8e2bfa78b91d35d776a91324e44d44
2020-01-10 23:01:57 +00:00
Treehugger Robot
baa778df4d Merge changes I2159bf13,I93146faa
* changes:
  Fix error handling in StatsEvent
  Handle nulls in Java autogeneration
2020-01-10 22:46:51 +00:00
Automerger Merge Worker
ccb530f58f Merge changes Ied6a13be,Ia4818f62,I660a4384 am: c7483ff8bf am: fca0df0215
Change-Id: I190062aae1e366f3e522ee01b5e6027a375074fd
2020-01-10 22:41:08 +00:00
Treehugger Robot
c7483ff8bf Merge changes Ied6a13be,Ia4818f62,I660a4384
* changes:
  StatsEvent unit tests
  Change visibility of members in StatsEvent
  Make StatsEvent.newBuilder() static
2020-01-10 22:24:13 +00:00
Automerger Merge Worker
df1499d027 Merge "Add a copy of Rlog for the telephony mainline module" am: 00fe08f5bf am: 9fc52ab1fc
Change-Id: I6cb1ffe87de13320e7ac166e9392ecdc59f8027c
2020-01-10 22:20:16 +00:00
Automerger Merge Worker
900cf22e7d Merge changes Icaa2d90b,Ief489088 am: ec3e77e1d0 am: 8c517b7d1f
Change-Id: I3ccdf6338c2ef6f9e781e4e9c5380445548e5b85
2020-01-10 22:19:17 +00:00
Meng Wang
00fe08f5bf Merge "Add a copy of Rlog for the telephony mainline module" 2020-01-10 22:05:03 +00:00
Treehugger Robot
ec3e77e1d0 Merge changes Icaa2d90b,Ief489088
* changes:
  Add KeyValuePairs support to StatsEvent.
  Add StatsEvent.Builder
2020-01-10 21:34:35 +00:00
Automerger Merge Worker
9886a9c50b Merge "First draft of StatsEvent.java" am: 4e2e5a96b8 am: 2a6214ca33
Change-Id: I073a67675ec82623cdcfda7cbfaf0fb9ca3ee80d
2020-01-10 20:05:12 +00:00
Treehugger Robot
4e2e5a96b8 Merge "First draft of StatsEvent.java" 2020-01-10 19:32:27 +00:00
Makoto Onuki
eba9902300 Add a copy of Rlog for the telephony mainline module
Bug: 144374158
Test: boot
Merged-In: I5be0497a17d00152286fe3351bf58e75b675ceb6
Change-Id: I5be0497a17d00152286fe3351bf58e75b675ceb6
(cherry picked from commit 57e56f2d3c)
2020-01-10 11:05:43 -08:00
Automerger Merge Worker
aa58c0d5c3 Merge "Rename android.util.TimestampedValue to android.os" am: 641fa6730a am: fee904a5fb
Change-Id: Ib439759dbee692a624491267d07f72b0d754779d
2020-01-10 09:18:38 +00:00
Neil Fuller
35cc296228 Rename android.util.TimestampedValue to android.os
Rename android.util.TimestampedValue to android.os to avoid dependency
from android.util onto android.os, which is disallowed by lint.

Bug: 147012511
Test: boot
Merged-In: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
Change-Id: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
(cherry picked from commit d159015e54)
2020-01-09 15:34:43 +00:00
Artur Satayev
2d330f6fa8 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I288969b0c22fa3a63bc2e71bb5009fe4a927e154
Merged-In: I288969b0c22fa3a63bc2e71bb5009fe4a927e154
2020-01-09 15:08:18 +00:00
Muhammad Qureshi
2a4c0782b5 Fix StatsEvent memory usage for pulled events
Add usePooledBuffer flag to the Builder which determines whether to reuse
the Buffer's byte array in StatsEvent or use a copy.
The build() function also calls release() on the Buffer
if a copy of the Buffer's byte array is passed to StatsEvent.

Also, for pushed events, release the StatsEvent object and consequently,
the Buffer in StatsLog.write(StatsEvent)

Fixes: 145026572
Fixes: 144126444
Test: bit FrameworksCoreTests:android.util.StatsEventTest
Change-Id: I1cdaf0027b69281cb7cb6f3c8ca923d03829b4dd
Merged-In: I1cdaf0027b69281cb7cb6f3c8ca923d03829b4dd
2020-01-08 17:04:27 -08:00
Muhammad Qureshi
80e3e7a435 Add JNI call for writing StatsEvent to statsd.
Bug: 143978873
Test: m -j
Test: flashes successfully
Test: DocumentsUI(a Mainline module) is able to successfully log to statsd
Change-Id: I9cdc6151d8feb29a712532e50f143af9d52c8d94
Merged-In: I9cdc6151d8feb29a712532e50f143af9d52c8d94
2020-01-08 17:03:31 -08:00
Muhammad Qureshi
2dfca163ab Fix error handling in StatsEvent
Bug: 143286399
Test: bit FrameworksCoreTests:android.util.StatsEventTest
Change-Id: I2159bf138a307e45c44102a8feb7a69d0c793843
Merged-In: I2159bf138a307e45c44102a8feb7a69d0c793843
2020-01-08 17:02:52 -08:00
Muhammad Qureshi
771119546c Change visibility of members in StatsEvent
- Rename writeAttributionNode to writeAttributionChain
- Make Type Id, size limit constants public and @hide for testing
- Change visibility of StatsEvent package protected functions to public

Bug: 141696033
Test: m -j
Change-Id: Ia4818f621672d469390bf7654bdd317f0cd11692
Merged-In: Ia4818f621672d469390bf7654bdd317f0cd11692
2020-01-08 17:00:24 -08:00
Muhammad Qureshi
f340ab6921 Make StatsEvent.newBuilder() static
Bug: 141696033
Test: m -j
Change-Id: I660a4384f037327ba475e3badd7cba7fea7f77a5
Merged-In: I660a4384f037327ba475e3badd7cba7fea7f77a5
2020-01-08 16:59:51 -08:00
Muhammad Qureshi
a0a4cdf760 Add KeyValuePairs support to StatsEvent.
- Expose atom id in StatsEvent.
- Sync constants with native stats_event.

Bug: 143079343
Bug: 143286399
Test: m -j
Change-Id: Icaa2d90b40d5da7571444182ead03b54b7b25867
Merged-In: Icaa2d90b40d5da7571444182ead03b54b7b25867
2020-01-08 16:59:06 -08:00
Muhammad Qureshi
a56a853c9c Add StatsEvent.Builder
Use a builder to construct StatsEvent objects.
Make StatsEvent immutable.
Wrap socket byte array in a Buffer class with write methods for
primitives.
Implement socket schema at go/statsd-socket-doc
StatsEvent.java design doc at go/statsevent-java-doc

Bug: 141696033
Test: m -j
Change-Id: Ief4890882de66d5dcca71b3827ffa1f43ea628a8
Merged-In: Ief4890882de66d5dcca71b3827ffa1f43ea628a8
2020-01-08 16:58:20 -08:00
Muhammad Qureshi
ffca2a3597 First draft of StatsEvent.java
The actual APIs are subject to change once socket encoding is finalized
and StatsEvent needs to be marked as @SystemApi. This will be addressed
in a future CL.

Test: builds successfully
Bug: 141696033
Change-Id: I508fa3d2f84850438562d01c78155590819badca
Merged-In: I508fa3d2f84850438562d01c78155590819badca
2020-01-08 16:44:18 -08:00
Neil Fuller
540f003086 Merge "Rename android.util.TimestampedValue to android.os" 2020-01-08 19:35:27 +00:00
Makoto Onuki
f257d0141a Merge "Add a copy of Rlog for the telephony mainline module" 2020-01-08 18:40:43 +00:00
Neil Fuller
d159015e54 Rename android.util.TimestampedValue to android.os
Rename android.util.TimestampedValue to android.os to avoid dependency
from android.util onto android.os, which is disallowed by lint.

Bug: 147012511
Test: boot
Change-Id: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
2020-01-08 17:00:34 +00:00