Commit Graph

3874 Commits

Author SHA1 Message Date
Yu-Han Yang
8a1b51dcc5 Add GnssNiEvent logging
Bug: 122091220
Test: tested locally on device using statsd_testdrive

Change-Id: I45ab9a7b12e6e674f31bc2398d74fa827d6f8f61
2019-01-15 10:38:59 -08:00
TreeHugger Robot
3a13a85fd4 Merge "Log the fact that we don't have a prod key." 2019-01-15 17:42:10 +00:00
Brian Osman
40f4cb5d5e Merge "Switch to skcms-based factories and getters in SkColorSpace" 2019-01-15 15:11:34 +00:00
Mathew Inwood
610d096754 Log the fact that we don't have a prod key.
Hopefully this will never happen, but better to know if it does.

Test: atest SignedConfigHostTest
Bug: 122579497
Change-Id: I4ecdf94f7963728aecf17a448c7bfbc7dbd5f39e
2019-01-15 11:54:18 +00:00
Lalit Maganti
71d560440d Merge "statsd: add subscription id to Perfetto command line and fix printf bug" 2019-01-15 10:48:42 +00:00
Mathew Inwood
b375be5545 Add westworld logging to signed config.
This will allow verification of how well the feature works in prod, as
well as tracking real time usage once Q is released.

Test: atest CtsSignedConfigHostTests
Test: ./out/host/linux-x86/bin/statsd_testdrive 123

Bug: 110509075
Bug: 122350327
Change-Id: Ibada9490e18cbeee74e18aaa93ba9d0d7d03845e
2019-01-15 08:37:05 +00:00
Frank Li
423b715d48 Merge "correct enum_default_value_name on atoms.proto" 2019-01-15 03:18:58 +00:00
Brian Osman
be8fac26d7 Switch to skcms-based factories and getters in SkColorSpace
Test: Mechanical substitution, still builds.
Change-Id: I877e4edd61e81279830ffbbcfea18d721abf6943
2019-01-15 03:17:09 +00:00
Chih-Hung Hsieh
55773ba766 Suppress cert-dcl50-cpp tidy warnings.
Bug: 122832439
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,cert-dcl50-cpp
Change-Id: I7268617658632140e9d78faa9ad7b112ff3f6408
2019-01-14 11:09:03 -08:00
lifr
357b7cfc2d correct enum_default_value_name on atoms.proto
Test: run runtests.sh, make sure no missing test and get all pass
      run /out/host/linux-x86/bin/statsd_testdrive 103
      Got following metric data dump:pass for local test
Bug: 119862317

Change-Id: I4588cec0dea8a4c5a19847a32a6d53bfc5953be7
2019-01-15 02:05:45 +08:00
Lalit Maganti
e5755008ec statsd: add subscription id to Perfetto command line and fix printf bug
This CL adds the id of the subscription triggering Perfetto to the
command line invocation of Perfetto. This is useful to allow for
distinguishing between experiments in post-processing (since the same
alert can be attached to multiple subscriptions).

This also fixes a bug in the same place where the last character of ids
could be cut off if any of the ids are large negative numbers i.e. the
smallest possible int64 is 20 chars long (including the minus sign).
However there were only 19 available digits in the string buffers which
these ids were printed into (the 20th would be the null terminator).
Increase the buffer size by 5 characters to allow for some headroom just
incase we need some in the future.

Bug: 122822046
Change-Id: I9c3ac8cb8b203fd464eee2c72b1228f1a50448b1
2019-01-14 18:01:18 +00:00
Frank Li
2792f56b90 Merge "Correct the atoms.proto name" 2019-01-14 17:34:33 +00:00
Christian Brunschen
f86039e16e Adds Westworld logging of RescueParty reset events.
Adds the RescuePartyResetReported Atom, and uses it in RescueParty.java
to log when a reset is done.
Also adds a small test program that can be built and run manually in
order to test the flow of new log events.

Test: Ran the test program and verified that the events flow through a
local statsd.

Change-Id: I0202dd8c00441d0544aed7de1d6027160b4d9a2b
Bug: 121121998
2019-01-14 11:29:11 +00:00
Chiachang Wang
6ec5ba9a6c Merge "Add data_stall_event.proto to atom.proto" 2019-01-14 07:56:15 +00:00
lifr
030d23aa77 Correct the atoms.proto name
Test: run runtests.sh, make sure no missing test and get all pass
      run /out/host/linux-x86/bin/statsd_testdrive 103
      Got following metric data dump:pass for local test
Bug: 119862317

Change-Id: I4e003a0e392e15b71fb3ee3adf7de669ccf25d76
2019-01-14 15:44:33 +08:00
Chiachang Wang
f6bedc23ae Add data_stall_event.proto to atom.proto
Test: Build pass
Bug: 120452078
Bug: 121185319
Change-Id: I96f74d938663d579e4fea1eee6a4a250d7e21b3a
2019-01-14 11:54:32 +08:00
Chenjie Yu
f910b78004 Move procstats_pkg_proc into its own wrapper
We rely on atom messages having different types to make configs.

Test: manual
Change-Id: I40a7962f4a63e8b6c5c42f5ffec944e822408f03
2019-01-11 16:08:20 -08:00
TreeHugger Robot
d3dda315c3 Merge "Sort static overlays by priority" 2019-01-11 16:33:01 +00:00
Hyundo Moon
8cd0ae9041 Introduce ControllerCallbackLink
In order to avoid direct AIDL usages in framework, this CL introduces a
new public class ControllerCallbackLink which can prevent usages of
ISessionControllerCallback.

Bug: 122337578
Test: make update-api -j / make -j
      atest CtsMediaTestCases:android.media.cts.MediaSessionTest
      atest CtsMediaTestCases:android.media.cts.MediaControllerTest
Change-Id: Id674576aa071b7fdbd0082bf6189fef2af2d919b
2019-01-11 14:42:14 +09:00
Ryan Mitchell
ebc0b6a68e Sort static overlays by priority
Since static overlays are still managed by the native layer, we must
order the overlays during the initial scan so the are put into the
AssetManager in the correct order.

Bug: 121002654
Test: build_success and manual verification of ordering
Change-Id: Id46baed8f836c3b4b86d19d58aee5fd06ff0b762
2019-01-10 16:59:36 -08:00
Chavi Weingarten
6169956c05 Merge "Added shell command for some general input events" 2019-01-09 16:29:01 +00:00
Shawn Lin
4505ce946d Merge "Add phase 2 atoms for documentsui" 2019-01-09 06:17:26 +00:00
shawnlin
a75e82d709 Add phase 2 atoms for documentsui
Test: manual
Bug: 111552654

Change-Id: Iabf5e64871aafe885bf2b304a7a0c6e61c8c08da
2019-01-09 09:18:50 +08:00
TreeHugger Robot
95cb8e40ca Merge "Make PlaybackInfo implement Parcelable" 2019-01-09 00:27:30 +00:00
chaviw
3a567f17d3 Added shell command for some general input events
Added shell command for events DOWN, UP, and MOVE. This can be invoked
by calling 'adb shell input event <DOWN|UP|MOVE> <x> <y>'

This was needed to test transferTouchFocus, but can be useful for other
testing as well.

Test: 'adb shell input event <DOWN|UP|MOVE> <x> <y>'
Change-Id: If3e77b04c7172505e7fe8998b5b3c496044870bb
2019-01-08 10:39:45 -08:00
TreeHugger Robot
ee57097de9 Merge "Add support for secondary display with display ID" 2019-01-08 06:05:49 +00:00
Arthur Hung
58a3ba639f Add support for secondary display with display ID
- Add display ID parameter for input shell command.
- Do some code refactory to use BaseCommand.

Bug: 112338741
Test: adb shell input [-d display_id] command args
Change-Id: I7264c913f784a35b41458261e1c3356b30f34035
2019-01-07 16:55:12 +08:00
Hyundo Moon
98e819216c Make PlaybackInfo implement Parcelable
This CL makes MediaController.PlaybackInfo implement Parcelable, and
replaces ParcelableVolumeInfo with the class.

Bug: 122243794
Test: make update-api -j; make -j;
Change-Id: I89d3df721a43e8c1454dbb3bdcb0b34c943339ce
2019-01-07 15:23:04 +09:00
Yao Chen
5c5513f2c7 Merge "Add a timeout option in shell subscriber." 2019-01-04 17:51:45 +00:00
arangelov
fd9cdcbdee Add ManagedProvisioning to allowed log sources in statsd_testdrive.
Test: manual
Bug: 122346015
Change-Id: I3f4ec145bb331493efb850574a18a50bd893954c
2019-01-04 12:25:43 +00:00
Hyundo Moon
7053844db7 Revert "Introduce ControllerCallbackLink"
This reverts commit e521669b5d.

Reason for revert: Another CL will be uploaded which makes the APIs public, not @SystemApi.

Bug: 122169124
Change-Id: Ie9ed1067596fe1724879e81d768ac8252eda7841
2019-01-04 14:27:45 +09:00
Yao Chen
35cb8d6537 Add a timeout option in shell subscriber.
Test: cts added
Change-Id: I0fe854fcfd5535ed03e502a4cad3f57079b45381
2019-01-03 17:00:39 -08:00
Tej Singh
06ba0a7db0 Merge "Migrate statsd to thermal hal v2" 2019-01-03 22:55:41 +00:00
TreeHugger Robot
2f3f3b4939 Merge "Turn all warnings into errors" 2019-01-03 15:20:45 +00:00
Chih-hung Hsieh
419a2638a2 Merge "Fix/suppress bootanimation google-explicit-constructor warnings" am: 50ee220126 am: b737b4fdb3
am: 05ae400a06

Change-Id: I2380f3e0467e1b9c4a8c36f31a2c4c8f45e893b0
2019-01-02 12:14:41 -08:00
Chih-hung Hsieh
05ae400a06 Merge "Fix/suppress bootanimation google-explicit-constructor warnings" am: 50ee220126
am: b737b4fdb3

Change-Id: I6e34a9e6351f06d9015e8f061f6e4eb5d22ef391
2019-01-02 11:57:30 -08:00
Chih-Hung Hsieh
a08d2c2ee7 Fix/suppress bootanimation google-explicit-constructor warnings
* Add explicit to conversion constructors/operators

Bug: 28341362
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor
Change-Id: Ia6ada49250973d507ae8b10d8f0d7c2d47ee805c
2019-01-02 02:43:37 +00:00
Hyundo Moon
e521669b5d Introduce ControllerCallbackLink
In order to avoid direct AIDL usages in framework, this CL introduces a
new class ControllerCallbackLink which can prevent usages of
ISessionControllerCallback.

Bug: 122169124
Test: make update-api -j / make -j
      atest CtsMediaTestCases:android.media.cts.MediaSessionTest
      atest CtsMediaTestCases:android.media.cts.MediaControllerTest
Change-Id: I860ea56afc046dd91e065ef207d374c0aa490c8f
2018-12-31 15:05:15 +09:00
TreeHugger Robot
c3925ebc88 Merge "Directly update DEFAULT_INPUT_METHOD in UiAutomatorTestCase" 2018-12-25 05:07:10 +00:00
Yohei Yukawa
dc1c5157ae Directly update DEFAULT_INPUT_METHOD in UiAutomatorTestCase
This CL updates UiAutomatorTestCase so as not to rely on a special
undocumented rule that
  IInputMethodManager#setInputMethod(IBinder token, String id)
can accept null token when the caller has WRITE_SECURE_SETTINGS is
going to be deprecated.

Fix: 114481043
Test: make -j uiautomator.core
Change-Id: If338da51b2c9d62ca4528e6ead16ea711639b775
2018-12-24 20:15:08 -08:00
Adam Bookatz
89e8be4121 Merge "Statsd logs directly from Wifi & add Multicast tag" 2018-12-23 16:40:13 +00:00
TreeHugger Robot
3a26797631 Merge "Statsd: change power units from double to int64" 2018-12-22 02:20:20 +00:00
Todd Kennedy
044803f44d Turn all warnings into errors
Bug: 121388682
Test: idmap2 builds
Change-Id: I6992c4d9b123a5e3d6cea91b1c83a90e57266837
2018-12-21 15:28:45 -08:00
Todd Kennedy
e38816598f Merge "idmap2: fix clang-tidy warnings [modernize-*]" 2018-12-21 22:44:46 +00:00
Bookatz
3dbc13a98b Statsd: change power units from double to int64
Changes the units for the following atoms from mAh to nAs:

DeviceCalculatedPowerUse
DeviceCalculatedPowerBlameUid
DeviceCalculatedPowerBlameOther

and changes them from floats to int64s.

int64 is better supported in statsd. In particular, Anomaly Detection
currently works only for int64, not floats.

The loss in precision here should be minimal or none. These numbers come
from BatteryStats, which calculates them as follows:

BatteryStats reports time in microseconds (us) as a long.
PowerProfile reports current in mA as a double.
  On the power_profile.xml files I have seen, they only have three
  decimal places of precision. So uA precision should suffice.

Thus, the absolute smallest unit of charge BatteryStats can therefore
measure (assuming three digits in the PowerProfile) is nAs. Given that our
measurements are over much longer periods of time than a microsecond, we
should be very safe.

In terms of max value: a phone battery is typically around
4000mAh  ~ 10^13 nAs << max_int64 by many orders of magnitude.

Bug: 119111972

Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.UidAtomTests#testDeviceCalculatedPowerUse
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.UidAtomTests#testDeviceCalculatedPowerBlameUid

Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.validation.BatteryStatsValidationTests#testPowerUse
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.validation.BatteryStatsValidationTests#testPowerBlameUid

Change-Id: I1cfd0a05717d7d357b43dd2408c85096599516c7
2018-12-21 12:38:18 -08:00
Chenjie Yu
0bd73dbaac Puller refactor
1) Refactor pullers and add tests.

2) Add timeout to a puller.
mPullTimeoutNs is intrinsic to puller. A pull taking longer than this is
deemed failed and the data discarded.
A metric or StatsPullerManager requesting a pull should monitor the pull
and have deadlineNs. A successful pull may come later than desired due
to statsd processing delays.

3) Add unit tests to puller now that the base puller is more
complicated.

Bug: 118756964
Test: unit test
Change-Id: I0e5d47e2527391f7beef4b2d06bfd5c2f82f1179
2018-12-21 09:46:09 -08:00
Chih-hung Hsieh
93a828adb6 Merge "Fix/suppress statsd google-explicit-constructor warnings" am: 699692402a am: 32dc82a63a
am: b51d2df568

Change-Id: Ia694c1a5824eaecd984f9710926ea9cad4809354
2018-12-21 09:31:14 -08:00
Chih-hung Hsieh
b708a7953d Merge "Fix/suppress incident* google-explicit-constructor warnings" am: 6af0e228f3 am: 78085ba0a3
am: ee844ad9a2

Change-Id: I53c2fd3886e565d824e2765671fb7965f07bd08d
2018-12-21 09:24:28 -08:00
Chih-hung Hsieh
b51d2df568 Merge "Fix/suppress statsd google-explicit-constructor warnings" am: 699692402a
am: 32dc82a63a

Change-Id: I0dbf5428746a8e2bcf3413f65f8eefc2069741e6
2018-12-21 09:15:42 -08:00
Chih-hung Hsieh
ee844ad9a2 Merge "Fix/suppress incident* google-explicit-constructor warnings" am: 6af0e228f3
am: 78085ba0a3

Change-Id: Ie3676e133e4722762f44245a7a050971fa64105e
2018-12-21 09:10:22 -08:00