3260 Commits

Author SHA1 Message Date
Tyler Gunn
8b68d7760f Add telecom test-commands for maintaining role overrides.
This allows for easier testing of role-dependencies for Telecom (since
RoleManager is not yet fully implemented).

Bug: 63966743
Test: Manual
Merged-In: I92fd86411d1312be2255ec0634f059cd8e4bfc26
Change-Id: I92fd86411d1312be2255ec0634f059cd8e4bfc26
2018-12-03 20:58:48 +00:00
Treehugger Robot
4d722cdbcd Merge "Refactor hid command, mitigate overflows" 2018-11-30 19:29:22 +00:00
Siarhei Vishniakou
6c6dd65deb Refactor hid command, mitigate overflows
Currently there are a few overflows possible in the hid command by
sending malformed json requests. Refactor the code to avoid these
overflows. These are mostly memcpy usage, where the size comes
(indirectly) from the size of the json array.
The json array must still be valid, because invalid json will produce an
earlier exception in the java layer.

Test: hid malformed_commands.json
The file "malformed_commands.json" can be found in the bug.
Bug: 111363077

Merged-In: I2f9dd31e0bfa2badc58779f40f4a80e025754cd2
(cherry picked from commit d54b70c8bfe393ef57445bd59962e6730b0b13c0)
Change-Id: I2f9dd31e0bfa2badc58779f40f4a80e025754cd2
2018-11-29 15:26:00 -08:00
Misha Wagner
4314aef811 Merge "Fix issue in CpuTimePerUid where microseconds are used as milliseconds" 2018-11-27 14:12:59 +00:00
Misha Wagner
6bc6c91584 Fix issue in CpuTimePerUid where microseconds are used as milliseconds
KernelUidCpuTimeReader reads microseconds, but they are written to a
millisecond field in atoms.proto. Introduced in ag/3693225.

See google3 change: cl/222044203

Test: build
Bug: 119853118
Change-Id: I170e996aa852e28a246a98226677907bb3560371
2018-11-21 11:13:01 +00:00
Dan Willemsen
c15cf1d02e Convert bootanimation to Android.bp
See build/soong/README.md for more information.

Test: cd frameworks/base/cmds/bootanimation; mma
Change-Id: I7e023ffc42f61ce9a215a958fbbd158a6a8352d7
Merged-In: I7e023ffc42f61ce9a215a958fbbd158a6a8352d7
(cherry picked from commit efc3e37c9b2dc1599cf75b49514665049951d7de)
2018-11-19 23:45:08 -08:00
Treehugger Robot
701001688f Merge changes I664fb325,I5e289469
* changes:
  switch to using android-base/file.h instead of android-base/test_utils.h
  Remove unused reference to android-base/test_utils.h
2018-11-19 20:25:30 +00:00
Dan Willemsen
a13b003b8b Convert screencap and libjni_pacprocessor to Android.bp
See build/soong/README.md for more information.

Test: m screencap libjni_pacprocessor
Change-Id: I976ec0fad591f30707b484722c972cd89b569163
2018-11-16 15:47:43 -08:00
Mark Salyzyn
d100107806 switch to using android-base/file.h instead of android-base/test_utils.h
Test: compile
Bug: 119313545
Change-Id: I664fb32522d01909c603d7b903475c4e9aea9223
2018-11-14 15:54:32 -08:00
Mark Salyzyn
7751045a3a Remove unused reference to android-base/test_utils.h
Test: compile
Bug: 119313545
Change-Id: I5e289469b40ccf5bf17982197a3cdefad1254f78
2018-11-14 15:53:27 -08:00
Risan
05c41e6a0a Introducing StubVolume in StorageManager
Bug: 110380403
Test: Tested in ARC++ (with Settings and vold changes in separate CLS)
- able to see the external storage under StorageSettings. Also tested
the sm command to print stubvolumes.

Change-Id: I7517260a40399bd9800424bb394512601f6af617
2018-11-08 21:48:35 +00:00
Colin Cross
054b0c0e06 Revert "Adapt to google::protobuf::uint64 type change"
This reverts commit fa6bc27df0820a362e0ceae7f9ea73e8a058fe47.

Change-Id: I9f778e6daa9ae0c6080016ab0bd1e6e414ae6061
2018-11-04 17:24:27 -08:00
Colin Cross
47046b80d2 Revert "Convert statsd_test and statsd_benchmark to proto lite"
This reverts commit e7908d7b624591c4cae55e66f5e603d061addd8f.

Change-Id: I585991ab1d5b35930bee6e32b82714aa11fbcb41
2018-11-04 17:24:26 -08:00
Colin Cross
fa6bc27df0 Adapt to google::protobuf::uint64 type change
Protobuf 3.5.2 redefines google::protobuf::uint64 from unsigned long
long to uint64_t, which is sometimes unsigned long and sometimes
unsigned long long.  Use PRIu64 to print it, and add an implementation
of ProtoOutputStream::write for long.

Bug: 117607748
Test: m checkbuild
Change-Id: I48912f58e2f63f4a98c3aefaa4f78cc2c719bb68
2018-11-02 11:35:48 -07:00
Colin Cross
e7908d7b62 Convert statsd_test and statsd_benchmark to proto lite
libplatformprotos for the device is compiled using proto lite, and
statsd_test and statsd_benchmark have protos that reference the
libplatformprotos.  With protobuf 3.5.2 compiling a full proto
against a lite proto doesn't work.  Convert them to lite.  Requires
adding the protobuf internal protos to the sources,
libprotobuf-cpp-lite does not contain the compiled version of
field_options.proto.

Bug: 117607748
Test: m checkbuild
Change-Id: I6a618c4118972c0e5ffb07a361ac6612b9069c5d
2018-11-02 11:35:48 -07:00
Colin Cross
05c9e5c24a Convert statsd and incidentd to Android.bp
See build/soong/README.md for more information.

Test: m checkbuild
Merged-In: I8c80878cec46c9299234c6f4c1e0e19efc0a221e
Change-Id: I8c80878cec46c9299234c6f4c1e0e19efc0a221e
2018-10-31 08:01:59 -07:00
Gopinath Elanchezhian
f469bd2f68 Merge "Add statsdprotolite in Android.bp" 2018-10-29 17:14:46 +00:00
gopinath
17593b0395 Add statsdprotolite in Android.bp
Bug: b/118482428

Test: make statsdprotolite
Change-Id: I5c27f3017be043b6809699158a94b32155163535
Merged-In: I857957e816506162496192fe0ad1da4dbdfd4efd
2018-10-26 23:16:39 +00:00
gopinath
9d426e141d allow statsd pull based on event trigger.
Bug: b/118482428

Test: make statsdprotolite
Change-Id: I5a40d5e6a409b65ca1639029d5da83c327ed1798
Merged-In: Ia15b1f209945f022edffb9ec5d673317d55d9e4f
2018-10-26 22:22:51 +00:00
Chih-Hung Hsieh
8767a4ede6 Allow implicit-fallthrough warnings locally.
It will be a global error by default.

Test: make checkbuild
Bug: 112564944
Change-Id: Ib23d0cc8b95a3734d5bd28f8c9d967df669cfdf8
Exempt-From-Owner-Approval: do not block on new warnings
2018-10-19 12:13:48 -07:00
Chih-Hung Hsieh
6c5b82f7c5 Fix implicit fallthrough warnings.
Test: make checkbuild
Bug: 112564944
Change-Id: Ia33bf816fb6b179ac0a5a6a20bcb50c11b47431d
2018-10-12 15:05:01 -07:00
Yangster
4ccebeadc7 Phone service state change atom.
Background: BatteryStatsService tracks the phone scanning time metric. In Q,
we are migrating the dumpsys-based collection to the new infra. This CL is to
instrument the new logging mechanism.

Test: statsd test
FIX: b/116748990

Change-Id: I3cf5e0026bfc6f594c5f7b524f14b3a43b702afb
2018-10-10 19:45:10 +00:00
Treehugger Robot
34bd3dfb39 Merge "statsd: Add AID mappings for iorapd" 2018-10-08 20:12:59 +00:00
Igor Murashkin
12bb16c955 statsd: Add AID mappings for iorapd
Bug: 117295673
Change-Id: Ie0c7a7bf823159492259ac1ec6680b45784afb84
2018-10-05 16:25:21 -07:00
Treehugger Robot
4593c78168 Merge "statsd: Add missing AIDs to UidMap" 2018-10-05 16:52:11 +00:00
Igor Murashkin
a1980ae12a statsd: Add missing AIDs to UidMap
Change-Id: I29f52727d344755a0c465105eb3a2c81b2bec700
2018-10-04 14:30:48 -07:00
Treehugger Robot
935f97ade5 Merge "Handling potential SIGPIPE signals." 2018-09-29 07:39:04 +00:00
Treehugger Robot
0119603e8e Merge "Increasing TombstoneSection timeout to 2 minutes." 2018-09-29 07:38:59 +00:00
Treehugger Robot
824f940195 Merge "Statsd atoms: restrict OEM fields 100000-199999" 2018-09-21 03:00:33 +00:00
Kweku Adams
4d4a23306a Handling potential SIGPIPE signals.
There are cases where dumping Java traces times out and then later tries
to write to a closed pipe, causing incidentd to crash. This introduces a
handler for the SIGPIPE signal so it doesn't crash due to a closed pipe.

Bug: 111729299
Test: lower section timeout to 5 seconds and make sure incident service
doesn't crash

Change-Id: I868aba1ae21a50ae76977e0e09e782cf94198473
(cherry picked from commit 5b763c13472effa7df25cc53a44d5bdae9392410)
2018-09-18 18:55:19 -07:00
Bookatz
76aafcfbea Statsd atoms: restrict OEM fields 100000-199999
The current wording seems to suggest allocating an infinite number of
fields, which is not future-proof.

Bug: 72866543
Test: N/A
Change-Id: I88732ea8695521a39f20524348547cfe50cbf776
2018-09-18 10:40:43 -07:00
Kweku Adams
10e38c9432 Increasing TombstoneSection timeout to 2 minutes.
Java trace dumps can take significantly longer than 30 seconds. Testing
suggests that 2 minutes should be ample time.

Bug: 111729299
Test: 'adb shell incident' and ensure the section doesn't time out.
Change-Id: I35e09fc1ca608122a1a352985ea3741f6ea0a344
(cherry picked from commit 0f7167947a6e3180da0964ec6187f9f01642fb6d)
2018-09-14 16:54:32 -07:00
Bookatz
ae6738ed2a Unifying source of statsd BleScan calls and cleaning it up.
Bug: 80308558
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases
Change-Id: I0b4a0b56631b4354b73f0fafea2c0dc7dff248d1
2018-09-13 18:48:10 +00:00
Treehugger Robot
0b8f17b3ba Merge "statsd: fix double close." 2018-09-05 18:16:46 +00:00
Josh Gao
3330d1208f statsd: fix double close.
Previously, fdopen was being called on a file descriptor that was owned
by a unique_fd without releasing. This leads to a double close, since
both fclose and the unique_fd destructor will try to close the fd.

Bug: http://b/113880863
Test: treehugger
Change-Id: I6f6f48d304861b5e4d7efee0d3ad0e30178a95a4
2018-09-04 11:12:04 -07:00
Kenneth Magic
93ca85a172 Update PageTypeInfoParser to be less restrictive.
The page block order is an independent variable from the free
page order table in the kernel, so the parser should not error
out if they do not match.

Bug: 110559361
Test: incident_helper_test
Change-Id: I08ad9c8f9b29cc15b80a89929f3a1fb6886852e6
Merged-In: I08ad9c8f9b29cc15b80a89929f3a1fb6886852e6
(cherry picked from commit 3abb43991685d0ba40e70dd5f81abe044f65b891)
2018-08-28 10:39:42 -07:00
Yi Kong
288f355e1a Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning.

Test: m
Bug: 68236239
Change-Id: Ic440b9fcb9be97c316448b764f7110ef1f7eb525
Merged-In: Ic440b9fcb9be97c316448b764f7110ef1f7eb525
(cherry picked from commit 08a8d728dbe379cd70974ba98d59017f5506e0e5)
2018-08-08 14:08:35 -07:00
Yao Chen
39c8fe12e4 Merge "Disable statsd and make StatsLog no-op if ro.statsd.enable=false" into pi-dev
am: 38b92986df

Change-Id: Ia90bed14900a2c944165aefe00661d3979c08aed
2018-06-07 14:53:43 -07:00
Yao Chen
38b92986df Merge "Disable statsd and make StatsLog no-op if ro.statsd.enable=false" into pi-dev 2018-06-07 21:10:16 +00:00
Yao Chen
cf3829a696 Disable statsd and make StatsLog no-op if ro.statsd.enable=false
Bug: 79324611
Test: manually tested on marlin_svelte
Change-Id: Ic7fbf86d7c295cb6b2f20e7f9a957d1ed74c42c0
2018-06-06 17:25:08 -07:00
Steven Moreland
a89ae86745 screencap: return instead of _exit.
_exit was being used instead of return in order to
work around a static destructor issue that has been
fixed.

Bug: 77934844
Test: screencap (and it doesn't crash)
Change-Id: I5dc25b0af5099993a94705ac9c7b439e68432824
2018-05-25 00:55:51 +00:00
Makoto Onuki
d8cf91c5f8 Merge "Tweak exemption for sync requests made by FG apps" into pi-dev
am: 621fd20f55

Change-Id: I31ae3e9e11b9defb7e6352830439484d7ec7ac01
2018-05-24 17:54:37 -07:00
Makoto Onuki
d5f25d2cd8 Tweak exemption for sync requests made by FG apps
Exemption given to a sync request made by a foreground app (including
PROCESS_STATE_IMPORTANT_FOREGROUND).
At the schedule time, we promote the sync adapter app for a higher bucket:
- If the device is not dozing (so the sync will start right away)
  promote to ACTIVE for 1 hour.
- If the device is dozing (so the sync *won't* start right away),
promote to WORKING_SET for 4 hours, so it'll get a higher chance to be started once the
device comes out of doze.
- When the sync actually starts, we promote the sync adapter app to ACTIVE for 10 minutes,
so it can schedule and start more syncs without getting throttled, even when the first
operation was canceled and now we're retrying.

Test: atest cts/tests/tests/syncmanager/
Test: Manual test with "requestsync -f" and "am set-standby-bucket", while checking
"dumpsys usagestats"
Test: settings put global app_idle_constants \
  exempted_sync_scheduled_nd_duration=1,exempted_sync_scheduled_d_duration=2,exempted_sync_start_duration=3
  and check "dumpsys usagestats" and make sure the constants are properly updated.
Fixes: 72443754

Change-Id: I233d8e4be85769150830bac798abc04810f4cc7b
2018-05-23 14:50:05 -07:00
Jaewan Kim
a31254bde1 Merge "Differentiate MediaController in a process for MediaSession" into pi-dev
am: 43688e8f2f

Change-Id: I8deb492fa82dcb2bec04d85a65a0aa267be830a4
2018-05-21 17:29:35 -07:00
TreeHugger Robot
43688e8f2f Merge "Differentiate MediaController in a process for MediaSession" into pi-dev 2018-05-22 00:11:49 +00:00
Yangster-mac
02b40158ab Merge "Add a field in config to disable/enable the string hashing in metric report." into pi-dev
am: 76cb7fe2f6

Change-Id: I4bb331330c505396427bb72ff7b69c2b6653ba97
2018-05-21 12:01:32 -07:00
Jaewan Kim
21c23e30b4 Differentiate MediaController in a process for MediaSession
MediaSession#getCurrentControllerInfo() can have more fine grained
differentiation for multiple MediaController in a package/process

Bug: 79728675
Test: Run CtsMediaTestCases
Change-Id: I81e94736e795ee5e7fbd28cb6cd834cc3a3b8f98
2018-05-19 08:36:51 +09:00
Yangster-mac
1c58f04cd3 Add a field in config to disable/enable the string hashing in metric report.
Statsd hashes (using its own hashing function) raw strings to reduce the
upload data size when there are duplicate strings in the report. And in cloud,
the clearcut translator would backfill the strings.

In a few droidfood users, we find the translator was unable to do that. While
debugging the root cause, we first decided to provide an option to disable
the hashing from the cloud.

Test: statsd unit test, CTS test, tested manually

BUG: b/79943763
Change-Id: If0359c8cf3f3cf83a2938db9ebf95ea7906f0b0c
2018-05-18 10:39:50 -07:00
Chenjie Yu
dcc56f980a Merge "ValueMetric pushed events should check condition" into pi-dev
am: 644c94f125

Change-Id: Ib8555c0664bceee108dc4f93bbeaaa9a146ef00a
2018-05-17 15:53:17 -07:00
Chenjie Yu
021e25307d ValueMetric pushed events should check condition
+ fix unit test flakiness

Bug: 79873404
Change-Id: I15b52a79b18c05603640781e4450e7b62fac24ba
Fix: 79873404
Test: unit test
2018-05-16 14:50:11 -07:00