3318 Commits

Author SHA1 Message Date
Suren Baghdasaryan
1fbaa1f2b2 Add min_score_adj into LmkKillOccurred event
Log min_score_adj when lmkd kills a process to determine the oom_score
levels that lmkd considers during the kill.
Accompanies Piper cl/236692672

Bug: 123024834
Change-Id: Ibfec13ef80ef1d74f5f224dde2e24970f7a88bfa
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-03-05 15:24:08 +00:00
Howard Ro
b52793ab2a Remove gaillard@google.com from OWNERS of statsd
Test: not needed for OWNERS change
Change-Id: I6c15067c86dc38784979d6da1265ceb0a3fc5ce5
2019-03-01 16:39:56 -08:00
Martin Stjernholm
afe98696e4 Preload libnativehelper.so which cannot be loaded through the Java classloader.
Test: atest CtsHardwareTestCases (between 2 and 4 failing tests, but that
  happens on clean ToT too; no dlopen failures)
Bug: 126601993

Change-Id: Icfe58fad93b97992e39758c02c92c488a13c717f
2019-03-01 19:40:26 +00:00
Harry Zhang
330403de24 Added a filegroup for statsd config proto definition.
This is used in other parts of the framework for serializing some
statsd text proto config at build time. The filegroup allows aprotoc
to access the definitions elsewhere in the source tree.

Bug: 120569785
Test: Build is not affected.
Change-Id: I82a5f8869a2d05ea27d205f471b9c5b5b875fefc
Merged-In: I0e37a9b9a1f22a5dcebbf07ccc5cad98cf76024c
2019-02-26 22:43:40 +00:00
vichang
c3ae401a98 Merge "Revert "Revert "Delay start of bootanimation until after the Runtime APEX is mounted.""" 2019-02-21 18:42:06 +00:00
vichang
a6bb8916b0 Revert "Revert "Delay start of bootanimation until after the Runtime APEX is mounted.""
This reverts commit 706bf3f6282644d0d536b88a1156fbf6c49d71d3.

Reason for revert: b/124939955. bootanimation depends on libandroidicu in the Runtime APEX.
Bug: 124939955
Change-Id: I2b5a9d74a5f0ae11978ff4b0850dd7e4becb9b88
2019-02-21 14:51:23 +00:00
Jeff Sharkey
d6b5de96c2 Merge "No-op flag to keep tests working in this branch."
am: 2144164526

Change-Id: I7723ff61f7c0f6f5f0bf560b2baa16ffda85dffb
2019-02-15 10:46:35 -08:00
Jeff Sharkey
cd75874398 No-op flag to keep tests working in this branch.
Bug: 124507818
Test: manual
Change-Id: I65ae1a55c420690e68f833674d4d09452a826302
Merged-In: I7973b123cf4fc08e8ce2b05bd4c23fa41b1cdcdf
2019-02-15 09:50:50 -07:00
Xin Li
07ec9dbec5 Merge "DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into stage-aosp-master" into stage-aosp-master 2019-02-14 22:11:32 +00:00
Xin Li
0e71b4f19b DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into
stage-aosp-master

Bug: 124234733
Change-Id: Ic4f67fde0835da0b1c363906cccef0d244e38393
2019-02-14 09:48:06 -08:00
Hui Yu
f57e401241 Manually merge 885aca1bbaa076b11914b9e4cb0d2a6d0c6fab3a to aosp-master
Bug: None.
Test: NA.
Change-Id: I04ebbaa3c2f939b139f0b8b6f25777383fd42375
Merged-In: Ifcc0c80f1da45c2ff89f7c88da6407ba777473e2
2019-02-13 20:32:27 +00:00
Hui Yu
539c545dc7 Merge "Revert "RESTRICT AUTOMERGE: Manually merge 885aca1bbaa076b11914b9e4cb0d2a6d0c6fab3a to aosp-master"" 2019-02-13 20:23:03 +00:00
Hui Yu
a558b05d53 Revert "RESTRICT AUTOMERGE: Manually merge 885aca1bbaa076b11914b9e4cb0d2a6d0c6fab3a to aosp-master"
This reverts commit a738111eeea622a25cb50ed7bcae5cbf0218b137.

Reason for revert: mistakenly used "RESTRICT AUTOMERGE" on the title.

Change-Id: I7ec9917887763912114405ba89eb5f0fac328d97
2019-02-13 20:10:27 +00:00
Treehugger Robot
661bb0414e Merge changes from topic "cut_dependency"
* changes:
  Revert "Delay start of bootanimation until after the Runtime APEX is mounted."
  Cut the static deps from libandroid_runtime to libnativeloader and libnativebridge
2019-02-13 02:17:35 +00:00
Hui Yu
a738111eee RESTRICT AUTOMERGE: Manually merge 885aca1bbaa076b11914b9e4cb0d2a6d0c6fab3a to aosp-master
To pick up statsd atom ProcessStartTime.

Bug: None.
Test: NA.
Change-Id: If6b99c0b6b501036ffde1e9a45194a039a8d7c73
Merged-In: Ifcc0c80f1da45c2ff89f7c88da6407ba777473e2
2019-02-12 19:17:44 +00:00
Jiyong Park
706bf3f628 Revert "Delay start of bootanimation until after the Runtime APEX is mounted."
This reverts commit d848183572d7c347937b871e9d341e0938d8764b.

Reason: the static deps to libnativeloader and libnativebridge no longer
exist

Bug: 123403798
Test: Device boots to the UI
Test: bootanimation is shown from the very beginning

Change-Id: I1a3f214b1d9a19520998c7d1f2d288465a831892
2019-02-12 19:35:45 +09:00
Jack He
e4ae0e7516 Atom: add more information to BluetootSocketConnectionStateChanged
* Add server_port field to track the server port number of a socket
* Add socket_role field to track whether the socket is a server listener
  or a connection socket
* Add uid field to track the owner of the socket

Bug: 112969790
Test: make, test drive with statsd
Change-Id: I0c86b724c748844009b8120befd454fb96137a61
2019-02-07 17:44:46 -08:00
Jack He
9c30c7c6ba Atom: Add BluetoothSocketConnectionStateChanged
* Logs when a Bluetooth socket's connection state is changed
* A Bluetooth socket can be:
  - RFCOMM socket
  - SCO socket
  - BR/EDR L2CAP socket
  - BLE L2CAP socket

Bug: 112969790
Test: make, test drive with statsd
Change-Id: I97b1e650e197a0dad1e2959e2f5b4dd98370d892
Merged-In: I97b1e650e197a0dad1e2959e2f5b4dd98370d892
(cherry picked from commit 815cdbaae0577654a6c019abbbd6d596e8cdb703)
2019-02-06 11:12:08 -08:00
Jack He
4d6abe6534 Atom: Add more Bluetooth atoms
* BluetoothHciTimeoutReported is logged when Bluetooth controller
  failed to respond to an HCI command in time
* BluetoothQualityReportReported is logged when Bluetooth controller
  sends a link quality report event to Android host due to bad link
  quality
* BluetoothManufacturerInfoReported is logged when we learn about
  manufactuer defined metadata for a device such as manufactuer name
  model number, software version, and hardware version
* BluetoothRemoteVersionInfoReported is logged when we learn about
  the manufactuer and Bluetooth version of remote Bluetooth controller
  and stack
* BluetoothSdpAttributeReported is logged when we learn about services
  provided by the remote device and their metdata such as protocol
  version and feature bitmask. Only profiles that use 16-bit UUIDs are
  logged
* BluetoothBondStateChanged is logged when Bluetooth bonding state is
  changed a a macro level such as none -> bonding, bonding -> bonded,
  and user interaction events such as passkey confirmation
* BluetoothClassicPairingEventReported is logged from native layer
  when Bluetooth classic pairing state changed due to HCI command
  or events. This is a more verbose level logging compared to
  BluetoothBondStateChanged
* BluetoothSmpPairingEventReported is logged from native layer when
  Bluetooth Security Manager Protocol based pairing state changed due to
  SMP command sent or received. Pairing failure reason code is also
  logged as a pre-defined enum

Bug: 112969790
Test: test drive with statsd
Change-Id: I94d1530758f79ce6d5f119426b1379c76517afec
Merged-In: I94d1530758f79ce6d5f119426b1379c76517afec
(cherry picked from commit 1021a6108132bf0d98676cae1afe98a1960f1375)
2019-01-28 17:30:05 -08:00
Jack He
924f346b45 Atom: Add A2DP playback related atoms to StatsLog
* BluetoothA2dpPlaybackStateChanged:
  - Logged when A2DP playback state changed for individual devices
* BluetoothA2dpCodecConfigChanged
  - Logged when A2DP codec configuration changed for individual devices
* BluetoothA2dpCodecCapabilityChanged
  - Logged when A2DP codec capability changed for individual devices
* BluetoothActiveDeviceChanged
  - Logged when A2DP/HFP/HEARNING_AID active device changed
* BluetoothA2dpAudioOverrunReported
  - Logs when A2DP failed send encoded data to the remote device fast
    enough such that the transmit buffer queue is full and we have to
    drop data
* BluetoothA2dpAudioUnderrunReported
  - Logs when A2DP failed to read from PCM source
* BluetoothDeviceRssiReported
  - Logged when remote device's RSSI level is reported by the controller
* BluetoothDeviceFailedContactCounterReported
  - Logged when ACL transmit queue was flushed by the controller
  - This is normally disabled unless we set automatic flush timeout was
    set to a non-zero value
  - However, when this event is reported, the connection quality must
    be very bad
* BluetoothDeviceTxPowerLevelReported
  - Logged when transmit power level is reported for a particular
    connection

Bug: 112969790
Test: make, testdrive with statsd
Change-Id: I7deb85567630fae75be733df21b45f9c6bcf9e17
Merged-In: I7deb85567630fae75be733df21b45f9c6bcf9e17
(cherry picked from commit c27040aea7775482f5a2e2d8d2c075b61c6c1ad8)
2019-01-28 17:29:49 -08:00
Treehugger Robot
1e02188bfe Merge "Add gaillard@ to owners." 2019-01-28 15:37:24 +00:00
Treehugger Robot
961a43eae2 Merge "Define Nfc statistic data atoms" 2019-01-24 20:25:57 +00:00
Olivier Gaillard
661d053916 Add gaillard@ to owners.
Test: n/a
Change-Id: I6f04ee34319c780cd9d7e6c842c3a3e9c29d0b0c
2019-01-24 11:36:13 +00:00
Jack Yu
6d421bc5e5 Define Nfc statistic data atoms
Test: Manual
Bug:116641110

Change-Id: Ia7e56c159d64804049abf39717e3eeae43373a76
Merged-In: Ib521a9f2d4d098022d973fe6c775231a518f3f49
2019-01-24 15:16:20 +08:00
Chiachang Wang
a3dd0a5050 Merge "Add NetworkStack into AidToUidMapping" 2019-01-24 04:26:44 +00:00
Chiachang Wang
69e41313cc Add NetworkStack into AidToUidMapping
Package name of NetworkStack may be different or be updated
further. Use AID_NETWORK_STACK in statsd for better
maintenance.

Bug: 123260425
Test: atest statsd_test
Change-Id: I18d58f03642b4a4465c23197162d239206cb1df4
2019-01-23 15:07:36 +08:00
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