Commit Graph

1343 Commits

Author SHA1 Message Date
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
Automerger Merge Worker
402f7eb3fb Merge "Use write_buffer_to_statsd within StatsLog_write" am: 634f6969c4 am: 4f32e393d0
Change-Id: Ie91b0cceab48051c53f8e7270a5a267c5778a82d
2019-12-20 00:24:50 +00:00
Muhammad Qureshi
bc1002d520 Use write_buffer_to_statsd within StatsLog_write
This CL is a partial cherrypick of ag/9686088. This is needed because new
changes to libstatssocket (that need to be cherrypicked into AOSP) wrap
#write_to_statsd() with #write_buffer_to_statsd().

Bug: 143978873
Test: m -j
Test: flashes successfully
Test: DocumentsUI(a Mainline module) is able to successfully log to statsd
Change-Id: I886331f728ccaa3d281b5683eb89179aa73596b6
Merged-In: I9cdc6151d8feb29a712532e50f143af9d52c8d94
2019-12-19 21:27:18 +00:00
Neil Fuller
4ab8a199de Change NetworkTimeUpdateServiceImpl behavior
This change moves some logic associated with time detection out of the
NetworkTimeUpdateServiceImpl and moves it to the TimeDetectorStrategy
called by the TimeDetectorService.

The TimeDetectorStategy implementation now decides when to use an
NTP-derived time instead. The logic implemented here is effectively the
same as it was: NITZ takes priority over NTP until the latest NITZ
signal becomes "too old".

The motivating reasons for the change:
1) The "what signal is used when several are available?" logic should be
in one place: the TimeDetectoryStrategy not scattered around the
platform. Centralizing will enable different strategies and time sources
to be introduced over time.

2) It will allow removal of the ACTION_NETWORK_SET_TIME intent in a
follow-up commit; this intent was used to coordinate the NTP vs NITZ
logic should no longer be required.

The "bonus" effect of this change is that NetworkTimeUpdateServiceImpl
becomes more general: It can now be the authority for the NTP time on a
device independently of how the system clock should be set. e.g. it
could be used in future to back the
AlarmManager.currentNetworkTimeMillis() API call.  Anything that needs a
"what is the best time according to NTP?" answer could use this service.

Note: The NetworkTimeUpdateServiceImpl still observes the AUTO_TIME
setting and will perform an NTP lookup "on demand" (if required) when
the user enables the setting. This should be a temporary state and
likely to be removed in future; knowledge of AUTO_TIME shouldn't be
required for the NTP info to be correct and if
NetworkTimeUpdateServiceImpl is doing the right thing.

Bug: 140712361
Test: atest com.android.server.timedetector
Test: atest android.app.timedetector
Change-Id: I4b2936a42c552c4dd4cb55010306bb81bca0c712
2019-12-19 19:21:47 +00:00
Automerger Merge Worker
16257918c9 Merge "Fix android.util.CloseGuard sample usage" am: 7381525076 am: 66b0e7d150
Change-Id: Ieec4a553744be7148938ee19cce23371597985e6
2019-12-18 18:35:59 +00:00
David Su
7381525076 Merge "Fix android.util.CloseGuard sample usage" 2019-12-18 18:19:58 +00:00
Gavin Corkery
254b0d5a7f Log watchdog-initiated rollback reason
To help with monitoring Mainline releases, log the reason
for a watchdog-initiated rollback. This may be due to
native crashes, app crashes, ANRs or explicit health check
failures.

Add a mapping from PackageWatchdog failure reason to the
new metrics.

Bug: 146415463
Test: atest PackageWatchdogTest
Test: atest StatsdHostTestCases
Change-Id: Ia3e73d955508297004591eac762555665c557b8a
Merged-In: Ia3e73d955508297004591eac762555665c557b8a
(cherry picked from commit dd1dabaef7)
2019-12-18 14:39:16 +00:00
David Su
0def143e45 Fix android.util.CloseGuard sample usage
Updated first sample with `Reference.reachabilityFence(this)`
to be consistent with the second sample.

Bug: 145831809
Test: none
Change-Id: I8c625de4f36a8cd52a3825021ff631db62f04662
2019-12-16 10:46:46 -08:00
Automerger Merge Worker
58745b4dcc Merge "Expose CloseGuard as a public API" am: 4314616565 am: 37f8e04de9
Change-Id: I42faa5840cb92a7c5c549e41f5cb03660165d9f4
2019-12-12 18:45:43 +00:00
David Su
4314616565 Merge "Expose CloseGuard as a public API" 2019-12-12 18:19:12 +00:00
David Su
0c472adb0d Expose CloseGuard as a public API
Wrap dalvik.system.CloseGuard and expose it as a
public API from android.util.

Bug: 145831809
Test: atest CloseGuardTest
Change-Id: Ia44c84a69a5fb693fb8bb1a075c18a60253cedfc
2019-12-10 13:46:24 -08:00
Neil Fuller
746d69afa5 Merge "Extend LocalLog to enable UTC timestamps" am: 9436134056
am: c74594a2e3

Change-Id: I417bf9581e3fbce9921e7893c1e63e6dd9a7b30b
2019-12-10 01:50:39 -08:00
Neil Fuller
a7453c69b2 Extend LocalLog to enable UTC timestamps
Extend LocalLog to enable UTC timestamps with elapsed realtime clock
info too.

Switch time-related usages over to using UTC timestamps. This will make
debugging a lot easier when the code doing the logging is responsible
for changing the system clock and default time zone.

Test: treehugger only
Bug: 140712361
Change-Id: Ic6b12f9032c0c3ebc48f12a970a7b4dd398e7fec
2019-12-09 17:02:44 +00:00
Sudheer Shanka
069e57e0aa Merge "Fix NetworkPolicyManager unit tests." am: da3518bc6b
am: 1381de466a

Change-Id: I474180a603338a1f980b327f183dac8131577330
2019-11-26 19:10:50 -08:00
Sudheer Shanka
2d1ab90aa2 Fix NetworkPolicyManager unit tests.
Bug: 137859686
Test: atest core/tests/coretests/src/android/net/NetworkPolicyManagerTest.java
Test: atest services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
Change-Id: I38a935c71bfb1f78739d508b400e43dc1b52bef5
Merged-In: I38a935c71bfb1f78739d508b400e43dc1b52bef5
(cherry picked from commit 6ec3caf218)
2019-11-27 02:50:03 +00:00
Charles Munger
d1c3f26e59 Merge "Deprecate TimingLogger" am: aec0ab99d4
am: 416618a591

Change-Id: Id637c04d15e48a928b7ff05a3133dbb5cf103656
2019-11-22 12:57:53 -08:00
Charles Munger
81c262b6d9 Deprecate TimingLogger
Bug: 144042891
Test: No behavior changes
Change-Id: I78af3549a2bf56eb709c52483c97acc5ddb15e87
2019-11-18 10:51:17 -08:00
Joshua Baxter
f23b8cedd7 Merge "docs: fix code example" into qt-dev am: 330701c156 am: e53e500eac
am: ce02f1c4ac

Change-Id: If0426ae0547b15b106dc3e7fdfff94e94904f9e8
2019-11-12 18:21:10 -08:00
Joshua Baxter
e53e500eac Merge "docs: fix code example" into qt-dev
am: 330701c156

Change-Id: I4f2ea4c128b2019d48b129f20bf8a800fc6b6fce
2019-11-12 18:04:50 -08:00
TreeHugger Robot
330701c156 Merge "docs: fix code example" into qt-dev 2019-11-13 01:26:15 +00:00
Joshua Baxter
145de3be7e Merge "docs: fix typo" into qt-dev am: aee0f9c343 am: bdaa73c0f9
am: 8c5d022296

Change-Id: Ibfb5b9a2add0e5cc5ceb6d1ec91afee432a726b5
2019-11-11 17:31:39 -08:00
Joshua Baxter
bdaa73c0f9 Merge "docs: fix typo" into qt-dev
am: aee0f9c343

Change-Id: Iba7623797bfd340fce0b24f6bbf669898feb8e26
2019-11-11 17:22:35 -08:00
Joshua Baxter
6b5e85dcb3 docs: fix code example
bug: 135556269

Change-Id: I9ba7a0f7de0322ba5e82413c0a95dffbef5a6236
test: make ds-docs
2019-11-11 21:55:05 +00:00
Joshua Baxter
9c69b40e2e docs: fix typo
bug: 119479852

Change-Id: I5c2c31432446ef6fccf3ac80e44a1660654375c0
Test: make ds-docs
2019-11-08 22:57:39 +00:00
Artur Satayev
fc46be7dbd Add @UnsupportedAppUsage annotations for greylist.
go/cleanup-greylist-txt

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

Bug: 137350495
Test: m

Change-Id: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
Merged-In: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
2019-11-08 16:17:13 +00:00
Neil Fuller
209c74f8b6 Merge "Make TimestampedValue Parcelable"
am: 81a705690b

Change-Id: I68edcf15ec9bef69a26267d9bf0c036e38ce93d4
2019-10-14 11:43:18 -07:00
Treehugger Robot
81a705690b Merge "Make TimestampedValue Parcelable" 2019-10-14 18:33:43 +00:00
Neil Fuller
def77b5cd5 Make TimestampedValue Parcelable
Make TimestampedValue Parcelable for simplicity.

TimetampedValue objects are not generally parcelable, depending on the
type of the value held. Previously, TimestampedValue did not implement
Parcelable to avoid committing to a general contract. Developers
parceling TimestampedValue objects were expected to call
TimestampedValue.writeToParcel() / TimestampedValue.readFromParcel()
explicitly when they knew it was safe to do so. This also meant that
TimestampedValues couldn't be used directly via AIDL.

This change makes TimestampedValue parcelable because it's more
familiar / convenient. Attempts to marshall a TimestampedValue that
contains a non-parcelable value will still throw a RuntimeException.

Bug: 140712361
Test: atest android.util.TimestampedValueTest
Change-Id: I8ca9c72f0433b380ce720cd813f650e743b3ddae
2019-10-10 10:16:41 +01:00
Iavor-Valentin Iftime
99d866acff Merge "API to detect which network interfaces support wake-on-lan"
am: 311fc569f3

Change-Id: I6239ae68559290e31f8c9384e0f973cfea30a1c7
2019-10-08 08:23:23 -07:00
Valentin Iftime
c86ebbaebc API to detect which network interfaces support wake-on-lan
Add a new method in LinkProperties, isWakeOnLanEnabled() which returns
true if network interface is defined in config_wakeonlan_enabled_interfaces
string-array (config.xml)

Bug: 132705025
Test: atest LinkPropertiesTest & atest ConnectivityServiceTest
Change-Id: I3f7803aafd2f8eaf8aa18419b21339e15d4b7a0b
2019-10-08 13:03:30 +02:00
TreeHugger Robot
ad324a3d7e Merge "Merge qt-r1-dev-plus-aosp-without-vendor (5817612) into stage-aosp-master" into stage-aosp-master 2019-09-11 20:31:32 +00:00
Xin Li
d57e959e71 Merge qt-r1-dev-plus-aosp-without-vendor (5817612) into stage-aosp-master
Bug: 135460123
Change-Id: I65906d82b14125c0893d5cde0cfebb73bf9e38ab
Merged-In: I1f2564837c33cd4c6c3db6aac3cbaf8c09707da9
2019-09-10 11:16:29 -07:00
Neil Fuller
1fb1a378d1 Track changes to CountryTimeZones API
Track changes to CountryTimeZones.lookupByOffsetWithBias()
API: the method now takes an extra argument: dstOffsetMillis,
which is unused in this case.

This commit also improves the parameter names to be more descriptive.

Bug: 139091367
Test: treehugger
Change-Id: I2090965640bb389ea41bde460f380f9ea8a6b176
2019-09-10 11:57:48 +01:00
Neil Fuller
21316e0b65 Simplify APIs exposed for time zone lookups
The libcore.timezone APIs may form the basis for some
new SystemApis. Before starting that process the API
surface is being rationalized to establish the core
use cases.

Test: Treehugger
Bug: 139091367
Change-Id: I6c8b791524d16223c414612913b22f4d70c27d61
Merged-In: I6c8b791524d16223c414612913b22f4d70c27d61
(cherry picked from commit 400efa36ef)
2019-09-10 10:08:19 +01:00
Hans Boehm
0e3a540d18 Merge "Move Half implementations to libcore to allow ART optimizations" am: 6bf381b5b1 am: eaad9ac3e2
am: 62a0694411

Change-Id: If244c0b7c851afe2f125014350ce1eb483b3afed
2019-08-15 15:01:03 -07:00
Hans Boehm
eaad9ac3e2 Merge "Move Half implementations to libcore to allow ART optimizations"
am: 6bf381b5b1

Change-Id: I14db6620050fe8f1bf592961a3472ed0dc6ef368
2019-08-15 14:22:03 -07:00
xueliang.zhong
e008d965ca Move Half implementations to libcore to allow ART optimizations
Move Half FP16 implementations to libcore, to allow ART compiler to
optimize these methods with intrinsic implementations.

For example, on ARM64 with ARMv8.2 FP16 half registers and instructions:
- Half toFloat/toHalf can be implemented with FCVT;
- Half floor/ceil/round can be implmented with FRINT(pna);
- Half max/min can be implmented with FMIN/FMAX.

Such fast Half FP16 intrinsics can help accelerate ColorLong ARGB
encoding/decoding in Android framework.

Change-Id: I6225ebf8aa825b0394ce8f13e12db317f5c6e3fd
2019-08-14 14:07:44 +00:00
bj1211jeon
85966252ef DO NOT MERGE: Add DENSITY_450 am: b38f168397
am: 99d0705722

Change-Id: I7b9bd8d7e715c6c492ad559967b8d9dfee3e7220
2019-06-14 18:09:58 -07:00
bj1211jeon
99d0705722 DO NOT MERGE: Add DENSITY_450
am: b38f168397

Change-Id: I594b671e05c9ba364583d7774454207fb4d89580
2019-06-14 17:45:45 -07:00
bj1211jeon
2153bd3920 DO NOT MERGE: Add DENSITY_450
am: b38f168397

Change-Id: Iae2867be2b3533da492ddfc79e3006fe385742d4
2019-06-14 17:41:26 -07:00
bj1211jeon
b38f168397 DO NOT MERGE: Add DENSITY_450
Add 450dpi as a supported screen density.
This change follows up below change Id : Iac673eae2d82c27d96e279c076454af2f5933208

Originally 600dpi was added to support sw384 with WQHD resolution,
though it was lack of for the cases when resolution is FHD resolution. (In case of other resolutions, there already exist 300 and 200 for HD and WVGA resolutions).

Bug: 78283907
Test: run android.dpi.cts.ConfigurationTest#testScreenConfiguration and android.app.cts.ActivityManagerMemoryClassTest#testGetMemoryClass
(cherry picked from commit 13ca0450ede3eedf7d34bbd0b69525cb6ebc63f1)

Change-Id: Ide0baba183c7dea962610d16f18fecbd0dc62567
2019-06-14 15:41:13 -07:00
Beverly
600211a639 Merge "Add feature flag to enable skip direction mapping" into qt-r1-dev
am: 79f7ac9922

Change-Id: I1f4561a0a1104fb64b763fc168f10430b449098f
2019-06-12 10:56:44 -07:00
Beverly
4844d722a9 Add feature flag to enable skip direction mapping
When this feature if enabled, users can change the directionality
of the skip gesture

Test: manual
Bug: 132788434
Change-Id: I43fb58c3abeafc36424b1ce6ef4140428de84f4e
2019-06-10 11:52:16 -04:00
Neil Fuller
d894c2498a Merge "Delete ByteStringUtils: it is no longer used" am: a677e4d5a0
am: ee2ded047a

Change-Id: I0752abd2b5e739f8fde780a07a5e417daa058ba7
2019-06-06 06:09:37 -07:00
Neil Fuller
48481e6f93 Delete ByteStringUtils: it is no longer used
The class has odd null handling and refuses to
encode odd numbers of bytes.

Bug: 124232146
Test: build only
Change-Id: Iefca8a870a12df6dec77147957cf4c8084daa506
2019-06-04 08:13:40 +00:00
PO HUNG CHEN
e743aeb922 Merge "Fix StrictModeTest#testNonSdkApiUsage" into qt-dev
am: 4f179bb174

Change-Id: Ic8177c57829e8f28b881c3347b1a4b93084c7fe4
2019-05-28 19:16:26 -07:00