Commit Graph

3858 Commits

Author SHA1 Message Date
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
Chih-hung Hsieh
699692402a Merge "Fix/suppress statsd google-explicit-constructor warnings" 2018-12-21 16:35:19 +00:00
Mårten Kongstad
0eba72a4dd idmap2: fix clang-tidy warnings [modernize-*]
Bug: 120024673
Test: mmm frameworks/base/cmds/idmap2; check output
Change-Id: I8768169fb7b541eb6b1aa3311c46a710eb71aac9
2018-12-21 08:16:09 -08:00
TreeHugger Robot
0b83fbf20e Merge "idmap2: fix clang-tidy warnings [readability-*]" 2018-12-21 05:34:52 +00:00
TreeHugger Robot
d76666276a Merge "idmap2: fix clang-tidy warnings [misc-*]" 2018-12-21 05:22:32 +00:00
TreeHugger Robot
b9c1e748e2 Merge "idmap2: move static functions to anonymous namespaces" 2018-12-21 04:39:47 +00:00
Mårten Kongstad
cf28136041 idmap2: fix clang-tidy warnings [misc-*]
Bug: 120024673
Test: mmm frameworks/base/cmds/idmap2; check output
Change-Id: I48c1cf25d2f1cf243dca67ec9d7e8fd50e6f9f32
2018-12-20 15:30:49 -08:00
Mårten Kongstad
b877902199 idmap2: fix clang-tidy warnings [readability-*]
Bug: 120024673
Test: mmm frameworks/base/cmds/idmap2; check output
Change-Id: I1565afac8d34e4347d8c946228d1134211e8b435
2018-12-20 15:29:06 -08:00
Chih-Hung Hsieh
3227aabea6 Fix/suppress statsd google-explicit-constructor warnings
* Add explicit to conversion constructors/operators
* Remove redundant explicit of copy constructors

Bug: 28341362
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor
Change-Id: Ifd0ca9a1afe4a2cb0456a36c69bee1633af5a93a
2018-12-20 15:17:33 -08:00
Mårten Kongstad
744ccfe9d4 idmap2: move static functions to anonymous namespaces
Move static functions to anonymous namespaces: this is the contemporary
way to express the same thing.

Test: make idmap2_tests
Change-Id: I41ed387455996db1ac515d04eb560d179b5b5169
2018-12-20 15:01:09 -08:00
Mårten Kongstad
3c9bc617ca idmap2: improve Android.bp
Improve Android.bp in a few ways:

  - add cc_defaults
  - remove the tidy_flag "-warnings-as-errors=*"

A note on warnings-as-errors: the default set of tidy checks are
inherited from the lists in build/soong/cc/config/tidy.go. This set is
modified by the local Android.bp's tidy_checks. If a new check is
enabled as default, and idmap2 specifies warnings-as-errors, idmap2 will
potentially break the build. In light of this, keep warnings as
warnings.

Also add a few non-default tidy checks. This version of idmap2 doesn't
compile cleanly: fixes will come in future CLs.

Also exempt the auto-generated code from IIdmap2.aidl from clang-tidy by
containing it in a separate cc_library_static block.

Bug: 120024673
Test: mmm frameworks/base/cmds/idmap2
Change-Id: I589fce792075a44a77b79117aa16b63ef0bec142
2018-12-20 14:55:49 -08:00
Chih-Hung Hsieh
7a88a938d2 Fix/suppress incident* google-explicit-constructor warnings
* Add explicit to conversion constructors/operators
* Remove redundant explicit of copy constructors

Bug: 28341362
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor
Change-Id: I26a11bb798d25605577269ed340e97afc8566960
2018-12-20 13:45:04 -08:00
Ben Murdoch
7b58df821a Refactor statsd_testdrive to support recording N atoms at the same time.
Found this useful in my testing.

Test: make and run statsd_testdrive

Change-Id: I3a9ff22119e79e89890c59be514f9f778aaced73
2018-12-20 19:06:12 +00:00
TreeHugger Robot
534cd89ea8 Merge "Allow events from AID_LMKD in statsd_testdrive." 2018-12-20 17:34:12 +00:00
Ben Murdoch
d36cbf9548 Allow events from AID_LMKD in statsd_testdrive.
Test: ran statsd_testdrive for atom 51 (lmk_kill_occurred), saw events
Change-Id: I2b9c9817813dcf4c0c7fd69a984726c6ef24db20
2018-12-20 11:45:15 +00:00
lifr
157fc55403 Define DNS statistic data atom in atoms.proto file
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: I691e46ffe4cb30696d35018032d4a7f7628045d9
2018-12-20 11:09:02 +08:00
Tej Singh
b6070b9c1c Migrate statsd to thermal hal v2
Part 1 of 2 in migrating statsd to thermal hal v2. Updates the
temperature puller to use thermal hal v2.

Bug: 119228310
Test: adb shell cmd stats pull-source 10021 on blueline. Received 8 cpu
temps, 2 gpu, 1 skin, 1 battery, 1 usb, and 1 npu. Did not receive any
bcl or power amplifier

Change-Id: I8804e282ea928c1815c2a29e72728edf9a053988
2018-12-19 19:05:51 -08:00