Commit Graph

1388 Commits

Author SHA1 Message Date
Fredrik Roubert
0b4907e839 Add "ftp" to the list of URL schemes that get linkified.
Fixes: 152892738
Change-Id: I888c5b12ebb417309250a25dc70baedad2cf7d7c
2020-03-31 21:40:41 +02:00
Automerger Merge Worker
fd9c242128 Merge "Avoid a @Nullable Boolean" am: 81a42af40d
Change-Id: I5cf10a143bba4351efa2ea22fc5ccddb732f3044
2020-02-06 08:52:00 +00:00
Neil Fuller
b2d0306a00 Avoid a @Nullable Boolean
To avoid a @Nullable Boolean one method has been split into two. After
some changes in the last release this also removes an optional parameter
from the two new methods as it is now always null.

Bug: 148450671
Test: treehugger
Change-Id: I83be9647943c16ae30af4f8d032db428af1ad5fc
2020-02-05 17:13:31 +00:00
Automerger Merge Worker
0769745f70 Merge "Tidy up libcore.timezone APIs" am: 8e0e0e8535
Change-Id: I0e15ce478bfaffb5defd0cfdb0e414f85bcf7af6
2020-01-31 16:29:11 +00:00
Neil Fuller
8e0e0e8535 Merge "Tidy up libcore.timezone APIs" 2020-01-30 11:25:35 +00:00
Neil Fuller
c3e31d6ac5 Merge "Rename ZoneInfoDB -> ZoneInfoDb"
am: 402674f2a0

Change-Id: I3dca8a93ccbc0f5e6fd4905db82bec6d8e088164
2020-01-29 06:05:50 -08:00
Treehugger Robot
402674f2a0 Merge "Rename ZoneInfoDB -> ZoneInfoDb" 2020-01-29 14:00:45 +00:00
David Su
87a25e33dd Merge "CloseGuard: Fix JavaDoc code sample to use correct API"
am: 88d4019b82

Change-Id: Ia7a2358ca77ec0b25817f4b52c6793648933e2c4
2020-01-28 17:25:45 -08:00
Neil Fuller
4720cf0309 Tidy up libcore.timezone APIs
Tidy up the libcore.timezone APIs to make them as close as possible to
android.timezone. In future, these classes should be repackages to be
the actual android.timezone classes, so the APIs need to be in sync.

Bug: 148086409
Test: treehugger
Change-Id: Ia520abcf00e691f4a1b5549dafec44b76075e31a
2020-01-28 15:26:45 +00:00
Neil Fuller
f14b18e153 Rename ZoneInfoDB -> ZoneInfoDb
Rename ZoneInfoDB -> ZoneInfoDb to conform with coding standards.

Bug: 148086409
Test: treehugger
Change-Id: I2a5eca6bd013d3ca2ba93aabf36745f8873fc6fb
2020-01-28 13:49:48 +00:00
David Su
ab2c291b46 CloseGuard: Fix JavaDoc code sample to use correct API
The code sample in the JavaDoc shows
`CloseGuard.get()` to create a new CloseGuard,
which is incorrect.
The correct API is `new CloseGuard()`.

Bug: 148291235
Test: compiles
Change-Id: I1dd24fff150e671007b67c023b20e078557f2966
2020-01-27 14:41:16 -08:00
Mike Ma
cc7c338c48 Merge "Make ProtoOutputStream public"
am: 566f8f0195

Change-Id: Id322686c850a1aa273d31c60c86e4fe052390d21
2020-01-22 10:33:00 -08:00
Mike Ma
566f8f0195 Merge "Make ProtoOutputStream public" 2020-01-22 18:14:00 +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
Mike Ma
5f0652fc07 Make ProtoOutputStream public
Bug: 142279786
Test: atest ProtoInputStreamTests
Change-Id: I1f6eeb09898277a0975c2081630bfa849afc13ab
Merged-In: I1f6eeb09898277a0975c2081630bfa849afc13ab
2020-01-21 21:02:43 -08: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
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
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
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
Automerger Merge Worker
39d6ba888d Merge "Fix annotation / debugging" am: 69bbb1904f am: 1d866c0bf3
Change-Id: I01e7c1b39e2c1df26f9b64c441136ccfbedcc77f
2020-01-07 16:40:04 +00:00
Neil Fuller
4d10019960 Fix annotation / debugging
Fix copy and paste errors from commit 4ab8a199de -
the API is new so does not need @UnsupportedAppUsage and
the debug log was incorrect.

Bug: 140712361
Test: build only
Change-Id: I123f76d011d7505d3dc053cb48c40353f0579d17
2020-01-07 14:32:29 +00:00
Automerger Merge Worker
ef100e45fe Merge "Change NetworkTimeUpdateServiceImpl behavior" am: 48247d9223 am: f11a45b756
Change-Id: Ie3b6457ba196f7aa00ffb6e2fa77e5acbb926374
2020-01-07 10:30:35 +00:00
Neil Fuller
48247d9223 Merge "Change NetworkTimeUpdateServiceImpl behavior" 2020-01-07 10:07:08 +00:00
Automerger Merge Worker
afc127664e Log watchdog-initiated rollback reason am: 254b0d5a7f
Change-Id: I2487bca4fd0579c2f66de15da727ada54a26cfe1
2019-12-20 08:18:37 +00:00