Since watchprops would have to be rewritten anyway in the upcoming properties
rewrite, there seems little point in rewriting it for toybox first. Let's
see how many people actually use watchprops and decide whether it's worth
the effort...
Change-Id: I996e7209bc81633ee66602f09f130226336d9987
MODULE_LICENSE_BSD and NOTICE were removed as the license is no longer
different from the rest of system/core.
BUG: 23086670
Change-Id: I1e83ef2ecb9c721150f8aab283c9ff960337da8c
This builds:
* metrics_client: command line interface to log metrics.
* libmetrics: shared library used by services to log metrics.
* metrics_daemon: background daemon responsible for aggregating the
metrics log and upload it periodically.
BUG: 22879597
Change-Id: I79adc4953d5bfd541df955fbc77d3549f5bbd26b
This makes the import path less confusing:
* metrics/metrics_library.h is imported from the exported headers.
* metricsd/* for includes by the metrics daemon itself.
BUG: 22879597
Change-Id: I9f44ea3a548cae39d4546fcd724e8007f6dd4bd0
DBus is not setup in several targets and the metrics_daemon will crash
if it cannot connect to DBus.
Running metrics daemon without dbus allows us to test the daemon in any
target.
BUG: 22879597
Change-Id: Ica69c8e96c3df794a210a0fa3d44f85a98a660f0
The metrics uploader used to be disabled for non-official images to
avoid polluting the production data with possibly wrong measurements.
This is inconvenient for developers as they can only be sure that a new
metric was added properly until the changes reached a product device.
Instead, this CL change the metrics daemon to upload metrics iff the
consent file exists.
To ensure that testing data does not pollute the production data, we set
the channel to UNKNOWN and the version to 0.0.0.0 when the image is not
official (implied by channel and version missing).
BUG: 22879597
Change-Id: If03847090b732cc06270cbcc8b386b5f9e544a3d
Fix some issues to get crash_reporter to compile on Android.
C++ source:
* bits/wordsize.h is used for __WORDSIZE, but is unavailable for most
Android toolchain architectures. It instead is available in sys/cdefs.h
Flex source:
* The Flex compiler toolchain doesn't link against the default fl library
using -lfl. Thus there is no yywrap() function defined. Since the
default fl library implementation just returns 1 (true), instead add a
directive to disable yywrap.
* The index(..) function has been deprecated in favor of strchr(..)
* Add a directive to disable the "deprecated conversion from string constant
to 'char*'" warning in the generated code.
* Remove warning suppression for the input() function which doesn't get
generated with Flex v2.5.39 and the arguments passed in the build command.
Bug: 22874187
Change-Id: I6d7dcf5f801010aeae06db9f0628a6652ee269ee
Removed the ChromeOS specific code so that the code compiles. The code
removed is not needed when running on Android, and includes:
* Chrome collector
* ChromeOS build's gyp file
* ChromeOS-specific DBus calls
* ChromeOS-specific collector path logic
* Chrome bypass logic in user collector
Bug: 22672752
Change-Id: I3c7d87c971a181d8f73293519318e3602d142927
Instead of hardcoding system specific constants (like path) in
every file, consolidate them into the constants.h.
BUG: 22879597
Change-Id: I615be017774db629bf43398db7f70e9ef7263a52
Previously, the action, command, and service structs contained char*s
that referenced memory within the buffer returned by the strdup() of
the input buffer of parse_config. This prevented this entire memory
region from being freed, leaking contents that would never be referenced again.
The changes to convert the previous action, command, and service
structs to C++ classes created explicit ownership of the contents within
each class in the form of std::strings. With these changes, there are
no remaining references to the memory allocated by this strdup(), which
can now be freed.
This commit replaces the strdup() with std::vector<char> to allow for
the copied string to be freed when it goes out of scope instead of
relying on the C strdup() and free() functions.
Change-Id: Id0a5f711e33363082ba201afda6b26043998cb1c