Possible values:
und_v0, und_v1
What is it:
The model version of the LangId model file.
Who determines this value?
The textclassifier team. The model version is burnt to the model file.
Test: m
Test: atest TextClassifierServiceTest
Bug: 152490822
Change-Id: I0058536ee4e5d8e9c14e100b61683c67af28981d
Enforce a 1 second minimum cooldown and a 10 second maximum timeout on
pullers.
Test: bit statsd_test:*
Test: atest LibStatsPullTests
Test: atest GtsStatsdHostTestCases
Bug: 152543610
Change-Id: Ida0047235a7e56d7b700f1a7ab5cfbc2a147caeb
The enums correspond to pages and entries of TvSettings. Some enums that
are related to unreleased features are not included in this CL but will
be added when this CL is cherrypicked into upstream non-public
TV-specific branches.
The atom definition is reviewed and approved by Metrics council.
Metrics council review bug: 151768952
Bug: 150979527
Test: the Android tree still builds normally
Change-Id: I4258312c19aa4f2f0cd178bc5b5dc53e52c6c737
Merged-In: I4258312c19aa4f2f0cd178bc5b5dc53e52c6c737
Hold mLock when accessing mBatch and mHandlerLooper in ReportHandler.
Fixes: 147326028
Test: Take an incident report. Verify no race condition.
Change-Id: I9d6da0067731f253532f60e5abb12dfb238b5411
Overall flow of implementation:
1. parsing the config in MetricsManager to store the uids per atom. It
follows the mAllowedLogSources logic very closely
2. MetricsManager register itself as a PullUidProvider with the
PullerManager.
3. Metrics pass the config key when pulling (for both registering
receivers and normal pulls) , and the puller manager gets
the allowed uids from the PullUidProvider for that config.
4. PullerManager keys receivers by <atomId, configKey> so that it can
look up the uids for that atom using the PullUidProvider as well.
5. Added shell subscriber support. Hardcode a default of AID_SYSTEM for
them and also allow packages per atom. This involved adding a second
interface to Pull that simply accepts the uids, since I didnt want to
make the ShellSubscriber a PullUidProvider as well.
6. Change adb shell cmd stats pull-source to allow users to specify a
package. Default to AID_SYSTEM as well.
Notes:
The feature is flagged off right now, since configs do not pass in the
desired package. Another approach could be to hardcode in the current
mapping, but that doesn't work for OEM pulled atoms.
Test: m statsd
Test: bit statsd_test:* with useUids = false
Test: bit statsd_test:* with useUids = true
Bug: 144099783
Bug: 151978258
Change-Id: I4a7481d7402a52b9beb4ea28b102803f9e50e79f
Updating new version package with changing resource id,
Overlay idmap still retain same resource id and target path of prebuilt package.
Consequentially overlay can not apply to new update resource id.
As is : VerifyIdmap only verify uptodate of idmap.
To be : Verify change of target path.
Bug: 147794117
Bug: 150877400
Test: idmap2_tests
Change-Id: I2ed6b5ba49aeb1b24625866daefea56c9766baef
We recently added a new "Bundle extras" argument to insert(),
update(), delete(), and query(), so we should ensure that developers
working from the shell can populate these extras.
Uses binding logic that was already used for call() extras. Fixes
parsing logic to support keys or values that have escaped colons,
and fix bug to always parse as requested data type.
Bug: 150982673
Test: adb shell content query
--uri content://media/external/images/media/
--extra android\\\\:query-arg-match-trashed:i:3
Change-Id: I40a9a94e85e175e298b01688d3b075a89b2e3954
There is a potential injection by using screencap in case of user handled parameters.
"dumpstate" command launches "screencap", when "-p" is argument is set. At that moment, content of "-o" parameter generates a path with ".png" extension to define "screencap" argument.
"dumpstate" is often run as a service with "root" privileged such as defined in "dumpstate.rc". For instance "bugreportz" call "ctl.start" property with "dumpstatez".
Launching "dumpstate" with "-p" option and a user input as "-o" would result in a root command execution. SE Linux might protect part of this attack.
Cherry-pick from ag/10651695 with fix ag/10700515
Bug: 123230379
Test: please see commands #4 and #5
Change-Id: Icd88cdf4af153e07addb4449cdb117b1a3c881d3
I forgot to update Gauge and EventMetricProducer unit test files to use
the new socket schema.
The EventMetric tests were also incomplete so I added test code to
output the dump report and check its contents.
Test: bit statsd_test:*
Bug: 149590301 && 110561136
Change-Id: I685688285d9890cf7c5bd3ffc43f13cbbb8f93de
TestUseZeroDefaultBaseWithPullFailures was failing on hwasan builds
because the test had a reference to an Interval object that was
deleted. The test tried to get another Interval object and assign it to
the reference. However, what this really did is change the Interval
object that the reference referred to. Since that Interval object had
been deleted, hwasan failed the test.
This fixes the issue. Also clean up some usages of auto to make
the test more readable.
Test: bit statsd_test:* on blueline_hwasan
Bug: 152354576
Change-Id: I392740770715391c727d190b1ed8ba22cc01210f
Mark privacy-sensitive atoms with truncate_timestamp annotation.
Factor out annotation collation to a helper method.
Add truncate_timestamp annotation support in stats-log-api-gen.
Add writeAnnotation* calls in Java and native generated code for
atom id annotations.
TODO: remove kTruncatingTimestampAtoms from atoms_info.
TODO: use truncate_timestamp annotation inside statsd.
Bug: 151111680
Test: stats-log-api-gen-test
Test: m statslog-framework-java-gen
Test: m libstatsmetadata
Change-Id: I3db5f4ffbf959bd36c62f890cc88606912798d40
Also removed unused CreateEvent helper functions in metric_util.cpp
Test: bit statsd_benchmark:*
Bug: 149794614
Change-Id: I14bcc254c44773eb42f749305beadaaf23a19b2b
EncodedBuffer is used a lot in incidentd. EncodedBuffer uses malloc
internally to acquire memory. Frequently creating and destroying
EncodedBuffer creates memory fragmentation, leading to high memory
usage after taking an incident report.
Also fixes a few other places with lots of malloc/free operations.
This change:
* Creates a pool of EncodedBuffer in incidentd. The saving is
significant. It reduces EncodedBuffer creation from 3 per section to
3 per report.
* Replaces malloc with mmap inside EncodedBuffer. mmap is guaranteed
to be mem page aligned, so there will be no mem fragmentation after
destroying EncodedBuffer.
* Replaces new with mmap inside TombstoneSection
* Forks a process to execute LogSection, because liblog malloc & free
significant amount of memory
Result:
PSS before taking a report: 1295 KB
PSS after taking a report: 1336 KB
Bug: 150311553
Test: heapprofd
Change-Id: I83bd9c969b751c80b2f42747020799bd85d8aae6
We initialize 'mToken' instead of leaving it uninitialized, making
it much less likely to rollover. In additional, we change our
check to inequality, to handle rollover if that were to happen.
There is the (theoretical) possibility of exactly 2^32 other
requests being claimed between our claim and our check. It's
assumed that is essentially impossible and not a concern.
Test: TreeHugger
Bug: 150619687
Change-Id: Iee303e05082a6b3b31ed546bd62d3afe67c771d8
The API is simple enough, so just reimplement everything using the
C API directly.
Bug: 148940365
Test: treehugger
Change-Id: I0a75744e975e8d3c2a557e533eacd03200388ddc
Update statsd to take in times in milliseconds instead of nanoseconds.
Also make appropriate updates for graphics stats, odpm, subsystem sleep
state, and LibStatsPullTests
Test: atest LibStatsPullTests
Test: bit statsd_test:*
Bug: 150788562
Change-Id: I593552d6c50bb4dcb89ca9cc1c737781653e7cc5
First CL at ag/10697747. Sending ValueMetricProducer_test as multiple CLs to retain diff and make
it easier to review.
Updates from TestInvalidBucketWhenMultipleBucketsSkipped to TestSlicedStateWithPrimaryField_WithDimensions
Test: bit statsd_test:*
Bug: 149590301
Change-Id: I682a19ea6fe39dd750ca396c9de479befa658f0d