This reverts commit e521669b5d.
Reason for revert: Another CL will be uploaded which makes the APIs public, not @SystemApi.
Bug: 122169124
Change-Id: Ie9ed1067596fe1724879e81d768ac8252eda7841
* Add explicit to conversion constructors/operators
Bug: 28341362
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor
Change-Id: Ia6ada49250973d507ae8b10d8f0d7c2d47ee805c
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
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
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
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
Move static functions to anonymous namespaces: this is the contemporary
way to express the same thing.
Test: make idmap2_tests
Change-Id: I41ed387455996db1ac515d04eb560d179b5b5169
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
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
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
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
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
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