Commit Graph

3846 Commits

Author SHA1 Message Date
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
TreeHugger Robot
90761169e8 Merge "Fix some AppCompacted proto nits post google3 review." 2018-12-20 00:01:42 +00:00
TreeHugger Robot
fcfa0ee9bd Merge "Statsd dumpsys handles multiple and saved configs" 2018-12-19 23:47:29 +00:00
Hall Liu
25f0ff5d5a Add the PhoneAccountSuggestionService am: c47570d5d0 am: df448f5ea2
am: 08fd16b47c

Change-Id: I74aafb91fd233d28f6840f5bd1247c3663dc35aa
2018-12-19 15:09:58 -08:00
Hall Liu
08fd16b47c Add the PhoneAccountSuggestionService am: c47570d5d0
am: df448f5ea2

Change-Id: I7555d7dfbbf25fc35549d1a7cb29bbe3a83bebde
2018-12-19 14:18:47 -08:00
Hall Liu
df448f5ea2 Add the PhoneAccountSuggestionService
am: c47570d5d0

Change-Id: Ia7823ff16f1684db71845cb9d92434c448290c9a
2018-12-19 13:57:48 -08:00
Hall Liu
db5b77c275 Merge changes from topics "dialer-account-suggestion-3", "dialer-account-suggestion-2"
* changes:
  Enable CTS testing for phone account suggestions
  Add the PhoneAccountSuggestionService
2018-12-19 21:36:54 +00:00
TreeHugger Robot
a034692c81 Merge "StatsService allows uids to impersonate themselves" 2018-12-19 21:20:57 +00:00
Bookatz
c71d901dde Statsd dumpsys handles multiple and saved configs
Statsd dumpsys wasn't handling multiple configs properly. Also, doing a
dump would delete the data that had been saved to disk. This cl fixes
both those issues.

Test: run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.HostAtomTests#testDumpsysStats
Change-Id: I5f2f86c70fbcbc1407aae1b1ffeb7fbdb9f67d0e
2018-12-19 12:35:52 -08:00
Ben Murdoch
01720b82cf Fix some AppCompacted proto nits post google3 review.
Clarify some comments and tweak the names of some fields. Binary
structure of the proto remains intact.

Bug: 119988524
Bug: 120600464

Test: verified that statsd_testdrive still works with this atom
Change-Id: I90d8eb522fc23b2ff604bc1e69e4068dc2c4b73a
2018-12-19 18:03:44 +00:00
Chandan Nath
2ec8b91026 Merge "[Multi-user] Change more BackupManager AIDL methods to accept userId in methods" 2018-12-19 11:50:10 +00:00
TreeHugger Robot
7a17e757fb Merge "Fix statsd_test TestOnDumpReportEraseData" 2018-12-18 22:59:45 +00:00
Bookatz
d238657d69 StatsService allows uids to impersonate themselves
Previously, most StatsService calls only allow the caller to specify the
uid if it is Userdebug/EngBuild. This applied even if the caller was
just specifying its own UID; this cl allows such a case. It also allows
ROOT to impersonate SHELL.

Test: Manual testing on userdebug and userbuild devices.
Test: make statsd_test && adb sync data && adb shell data/nativetest64/statsd_test/statsd_test

Change-Id: I2685d13a8dc24d40b5dab8be9842f53be6888ba3
2018-12-18 14:51:08 -08:00