3288 Commits

Author SHA1 Message Date
Tyler Gunn
36c50ed28c Add get/set user selected outgoing phone account APIs.
Promoting getUserSelectedOutgoingPhoneAccount to a public API accessible
to the default dialer app, as well as to system priv apps such as the
settings app.

Promoting setUserSelectedOutgoingPhoneAccount to a system API accessible
to apps such as the settings app.

Add telecom shell commands to support changing the outgoing phone account
in CTS tests.

Bug: 119227574
Test: Manual
Test: Added and ran new CTS test
Change-Id: I204b2f01a1b6746aa35faf8aaacd30ebf53b9a5d
2019-01-22 07:46:06 -08:00
Martin Stjernholm
d848183572 Delay start of bootanimation until after the Runtime APEX is mounted.
It depends on libdexfile_external and libnative{bridge,helper,loader} which
are provided by the Runtime APEX.

Test: flash & boot
Test: atest CtsJdwpTestCases
Bug: 113373927
Change-Id: Id9a78f9adb4c928ab4c91fda0ee3ea4b13eed592
2019-01-21 10:55:30 +00:00
Jack He
22e4a1da50 Atom: Update BluetoothConnectionStateChanged atom
* Use salted hashed Bluetooth device identifier and deprecate old
  ofuscted_id
* Add BluetoothAclConnectionStateChanged and BluetoothScoConnectionStateChanged
  to track ACL and SCO connections

Bug: 112969790
Test: Bluetooth unit test, test drive with statsd
Change-Id: I5398e4caae751e1fe1d6a95fa3bc56d062eb6172
Merged-In: I5398e4caae751e1fe1d6a95fa3bc56d062eb6172
(cherry picked from commit d9837c8a9e9c91d9907ea10e67bf6c6581ba1b4b)
2019-01-16 16:11:45 -08:00
Jack He
522601435d Atom: Add BluetoothLinkLayerConnectionEvent atom
* Add this atom to report events related to Bluetooth link layer
  connection, including:
  - Obfuscated ID of remote device
  - Connection handle
  - Direction of the connection
  - Type of the connection
  - Associated HCI command and/or event
  - Status code associated with HCI command and/or event
  - Reason code associated with HCI command and/or event
* Add enum definitions for HCI commands and events as defined in the
  Bluetooth 5.0 specification
* Add enum definitions for link type and direction

Bug: 112969790
Test: make, test drive with statsd
Change-Id: I0fdc59274d49ad503e9ba9cf8f49c9d8872a4131
Merged-In: I0fdc59274d49ad503e9ba9cf8f49c9d8872a4131
(cherry picked from commit ab86dbd20cf17a1389d42135865eabfc4fc48604)
2019-01-16 11:51:20 -08:00
Chiachang Wang
67f2447feb Add data_stall_event.proto to atoms.proto
Test: Build pass
Bug: 120452078
Bug: 121185319
Change-Id: I5a428fb60d4c1eb4fe397426606e937f27eacbc3
Merged-In: I96f74d938663d579e4fea1eee6a4a250d7e21b3a
2019-01-15 15:14:00 +08:00
lifr
35a7cf0192 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
      116
      Got following metric data dump:pass for local test
Bug: 119862317

Change-Id: I83ee8500fac7f443711ced097cbd376feb801ccf
Merged-in: I4588cec0dea8a4c5a19847a32a6d53bfc5953be7
2019-01-15 12:44:33 +08:00
Xin Li
3a039ff763 Fix compile time warning.
In checkIncidentPermissions(), the intention of code is to bail out when
the caller do not have appropriate permission.

Logically, DEST_LOCAL and DEST_EXPLICIT should be checked separately.
In the current code, we would fall-through to DEST_EXPLICIT case, but
because permitted DEST_LOCAL callers (AID_SHELL and AID_ROOT) are also
permitted DEST_EXPLICIT callers, we will still get the Status:ok().

Test: build
Change-Id: I0f6121cb1aba7724306b99469f5ef97b4358ac7d
2019-01-09 23:26:13 +00:00
Jim Blackler
972a5c51f6 Add start time to LmkKillOccurred
To accompany Piper cl/222070329 and https://googleplex-android-review.git.corp.google.com/c/platform/system/core/+/5578724

Bug: 119854389
Test: Manual
Change-Id: Ib2af1b66d4649279fdcb97e7cdf8cdb92e361765
Merged-In: Ib2af1b66d4649279fdcb97e7cdf8cdb92e361765
(cherry picked from Ib2af1b66d4649279fdcb97e7cdf8cdb92e361765)
2019-01-04 11:36:41 +00: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
Chih-hung Hsieh
699692402a Merge "Fix/suppress statsd google-explicit-constructor warnings" 2018-12-21 16:35:19 +00: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
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
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
Hall Liu
c47570d5d0 Add the PhoneAccountSuggestionService
Add a service base class for phone acct suggestion. Also add associated
aidl plumbing and a new permission for the service to require.

Test: CTS to come
Bug: 111455117
Change-Id: I30d7d004bdddbab3dfbb5408c07775ea56d490fe
2018-12-17 15:27:32 -08:00
Chih-Hung Hsieh
a1b644e88c Fix performance-for-range-copy warnings
Bug: 30413223
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,performance*
Change-Id: Ie481e88025a7a1f3abde8ff63420d5ccd8577e52
2018-12-17 20:00:55 +00:00
Yao Chen
2822b4f42f Skip writing message field in an atom if it's empty
Test: unit test added
Bug: 120635548
Change-Id: I825b1ce526944a20fe65705508ad180ece37492c
Merged-In: I825b1ce526944a20fe65705508ad180ece37492c
(cherry picked from commit 8e6f9983009eadf32d05ad65e38906d3985bc9ba)
2018-12-15 13:52:27 -08:00
Yao Chen
046b51295e Adding tests and move launcher.proto
Test: statsd_test
Bug: 120635548
Change-Id: I0655f70098d78f8f6dc9381921c4a687d2195bd4
Merged-In: I0655f70098d78f8f6dc9381921c4a687d2195bd4
(cherry picked from commit 8c4338614513f59e53c2d7a164a05d309a470e81)
2018-12-15 13:52:06 -08:00
Hyunyoung Song
cc651c118e Add launcher.proto to atoms.proto
Test: blank
Bug: 113043444
Bug: 120635548
Change-Id: I7e0e72cdf68dcf195188dbab8fe2567fcbd5964e
Merged-In: I7e0e72cdf68dcf195188dbab8fe2567fcbd5964e
(cherry picked from commit c6d6b77ddc805d6e8f70ed16f0c73177840791e7)
2018-12-15 13:51:39 -08:00
Yao Chen
8b71c74894 Allow atoms to log fields in bytes format.
There are an increasing number of requests to log data in complex format to statsd, while the data
is not expected to be parsed or aggregated by statsd and only to be uploaded as events.

Instead of making an exception for each of these cases in a hard coded way, this CL add a feature to
annotate these field in atoms.proto and the stats-log-api-gen tool will produce byte array
interfaces for them.

Note that log_msg does not have byte array type, and only has string type, when statsd receives the
log, these fields are in string type. Only when the atom is written to proto, we will check if this
field should be bytes field and write it to protobuf in message format.

Change-Id: If53dd95c5826710c76d7fe982bf951a435dfc738
Merged-In: If53dd95c5826710c76d7fe982bf951a435dfc738
Fix: 118386797
Bug: 120635548
Test: unit test & manual test
(cherry picked from commit bbdd67d19f4912fbec00220b22e44c68eff5ab3f)
2018-12-15 13:51:08 -08:00
Treehugger Robot
a32f898720 Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master" 2018-12-13 05:45:20 +00:00
Chih-hung Hsieh
20b64c4bc7 Merge "Fix cert-dcl16-c clang-tidy warnings." 2018-12-12 02:58:22 +00:00
Xin Li
15b123ef45 DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
Bug: 120502534
Change-Id: Idc8bfb6d97a869b76cfb87ca1a494201baf9e8bd
2018-12-11 14:13:44 -08:00
Chih-Hung Hsieh
054dab1d47 Fix cert-dcl16-c clang-tidy warnings.
Bug: 120614316
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,cert-dcl16-c
Change-Id: I2dc262d3407aafa969e921236dc3fc3ae60eb9d4
2018-12-11 11:27:17 -08:00
sqian
6dcf8879cb Add Call redirection app in Telecom test-commands
Bug: 64959558
Test: Treehugger
Change-Id: I15cb3b766c4c5fbef4e50824ccda0f3328643cf9
2018-12-07 19:36:27 -08:00
Mike Ma
349377724e Merge "Change owners of incidentd" 2018-12-07 01:28:40 +00:00
Mike Ma
61b65dc245 Change owners of incidentd
Test: NA
Change-Id: Ic651a13bb145610de2b668b6b235228e1e5151c1
2018-12-06 13:44:44 -08:00
Kim Low
d47c0131eb Add support for UHID_GET_REPORT requests
Updated to support UHID_GET_REPORT requests mainly for CTS use.
All feature reports are assumed to be static and should be specified
along with the register json.

For example, in sony_dualshock4_register.json, add the following.
  "feature_reports": [
    {
      "id": 5,
      "data": [0x05, 0x1e, 0x00, 0x05, 0x00, 0xe2, 0xff, 0xf2, 0x22, 0xbe, 0x22, 0x8d, 0x22, 0x4f,
        0xdd, 0x4d, 0xdd, 0x39, 0xdd, 0x1c, 0x02, 0x1c, 0x02, 0xe3, 0x1f, 0x8b, 0xdf, 0x8c, 0x1e,
        0xb4, 0xde, 0x30, 0x20, 0x71, 0xe0, 0x10, 0x00, 0xca, 0xfc, 0x64, 0x4d]
    }
  ]

Test: Make sure build has hid-sony driver that's backported from >4.10.
    Run Dualshock4 CTS
        > atest cts/tests/tests/hardware/src/android/hardware/input/cts/tests/SonyDualshock4TestCase.java

Change-Id: Ib0d534d47c6aa6fcc11af68b913c3db1cfa72752
2018-12-06 09:35:27 -08:00
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