SimplePredicates have a configurable initial value that can be set to
unknown or false. Previously, CombinationPredicates and MetricProducers
were automatically initialized with an unknown condition value instead
of being synced with the conditions of the SimplePredicates that they
rely on.
An initial condition cache is used to store initial conditions of
ConditionTrackers after they are initialized.
CombinationConditionTrackers evaluate their initial condition based on
the initial conditions of their child SimpleConditionTrackers.
MetricProducers also use the initial condition cache to set its
condition during initialization.
Added unit tests in SimpleConditionTracker_test to check that
SimpleConditionTrackers have the correct initial conditions based on
what the InitialValue is set to and the condition is updated properly
after the first few condition change events.
Added unit test in MetricsManager_test to check that all
ConditionTrackers and MetricProducers have the correct initial
conditions.
Test: m statsd_test && adb sync data && adb shell
data/nativetest64/statsd_test/statsd_test64
Bug: b/156762672
Change-Id: I9f6088f8c92fb18eb2ca8632aaa338fb0ed8e679
refactor to simplify the condition nesting in flushCurrentBucketLocked
Bug: 157155330
Test: atest statsd_test
Change-Id: Ieff0e8d8d65e1a4c9fc576e68fd7fa912849f806
This can result in more pull failures, but can prohibit slow pullers
from slowing down statsd.
Test: atest GtsStatsdHostTestCases
Test: atest statsd_test
Test: atest FrameworkStatsdTest
Bug: 154056912
Change-Id: Ie30bd3584d808bb11aaaf0fe2057c9adfb198644
Additional information are important to evaluate the impact of Virtual
A/B on devices especially related to OTA take rate.
In order to find a correlation between the OTA take rate and the storage
composition, the following metrics are added to the
UpdateEngineUpdateAttemptReported:
- super_partition_size_bytes: the size of the super partition,
- slot_size_bytes: the size of the current slot, and
- super_free_space_bytes: representing the free space in the super
partition.
Bug: 154016862
Bug: 157720191
Test: m
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I9a6146831a4d6254f8c4d1bfe0df9ca97ef15d34
Additional information are important to evaluate the impact of Virtual
A/B on devices especially related to OTA take rate.
Take rate is strictly related to the space that is temporarily allocated
in the /data partition (cow_file_size_bytes), as well as knowing if the
device has been upgraded to use Virtual A/B (is_vab_retrofit) or if the
feature was natively supported.
Add these new fields to the SnapshotMergeReported metric.
Bug: 154016862
Bug: 157720191
Test: m
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: Iae8310a8f5364ee94fc8ad6e55362d86cb0752d8
When ro.surface_flinger.max_graphics_{width|height} is
set the framebuffer size is limited by this property.
However the boot animation size matches the display active
mode size which can cause it to be off-center or partially
visible.
This change limits the boot animation surface size with
accordance with ro.surface_flinger.max_graphics_width.
Bug: 153991408
Test: manual
Change-Id: Idfd1c9adc1f6b10f44bc04ec2078dbc823f28ed6
This atom was meant to be a temporary atom which needs to be removed.
This is the right time for that.
Bug: 157708974
Test: make
Change-Id: I87e5bd4dd7b460574c17c685d56200a3c7b14292
Variables mNonSlicedConditionState and mUnSlicedPart both track the
unsliced condition in ConditionTrackers. However, they are used
inconsistently. These variables can be replaced with one variable and
duplicate logic can be cleaned up.
Bug: b/157079077
Test: m statsd_test && adb sync data && adb shell data/nativetest/statsd_test/statsd_test
Change-Id: I00b577e09a1fd703624eb61eabf2e1c6fee26731
When a state change occurs, metrics should only make certain updates if
the metric is active. This is already handled in CountMetricProducer and
DurationMetricProducer. In ValueMetricProducer, we will return
immediately if the metric is not active during a state change.
Test: m statsd_test && adb sync data && adb shell
data/nativetest/statsd_test/statsd_test
Bug: b/153101724
Change-Id: Ib2a96600a0f1acec054638515d606716cf0ca6b6
Set the current state key to a HashableDimensionKey with -1
(kStateUnknown) for each sliced state atom. Previously, the current
state key was being set to the DEFAULT_DIMENSION_KEY which is an empty
HashableDimensionKey.
Bug: 155487198
Test: make statsd_test && adb sync data && adb shell
data/nativetest/statsd_test/statsd_test
Change-Id: Icaa187ecae599407695d86eec6104d210aa98714
This change does three things:
1) If an overlay targets a package that does not declare an overlayable
and the overlay fulfills the actor policy, the overlay can override
any resource in the target,
2) The actor policy is now implicitly granted to overlays signed with
the same signature as the configurator that target white-listed
target packages regardless of whether or not the target defines an
overlayable.
3) If an overlay was previously granted the actor policy through the
mechanism specified in (2), the overlay will continue to fulfill
the actor policy even if the configurator is removed, changes
signature, changes to a different package, or the list of
configurator targets changes. If the overlay target package or
target overlayable name changes, the persisted setting will be
reset.
Bug: 157244814
Bug: 157266239
Test: atest OverlayManagerServiceImplTests
Test: idmap2_tests
Change-Id: Iff3937849ad898b1b2d74c2c632a4cdf7690fe10
Test: m
Test: manually verified that DeviceIdleModeStateChanged atom gets logged
before boot completes (using ag/11529814 to log)
Bug: 156913221
Change-Id: I3dbf154083f1cbe660625066dc50b6a8ffd60d7c
This ensures that only one helper thread is created per subscription.
Previously, there could be up to two.
+ fixes thread sleep duration if the pulled atoms have different pull
frequencies
+ rename attemptWriteToSocketLocked to attemptWriteToPipeLocked
Test: atest statsd_test
Test: atest CtsStatsdHostTestCases:ShellSubscriberTest
Test: manual testing on Android Studio
Bug: 156678125
Change-Id: I7074bbba5981a591a30e8b70a1ad1d83eadfcc30
Use DisplayEventReceiver to listen for display hotplug
events and resize the boot animation is display size
changes.
Bug: 156448328
Test: manually make sure the boot animation has correct
dimensions in the following cases
I. With boot animation file
1. scrcpy
2. start boot animation with
adb shell /system/bin/bootanimation
when no physical display is connected (= 480p
fake HWC display). Use the virtual display from
scrcpy to check the boot animation size.
3. connect a 1080p display
(HWC sends hotplug connect to change the display)
4. disconnect the real display
II. Same steps without boot animation file
(android logo should be displayed)
Merged-In: Ib3f0383686399669e8de10456092baaec607fa01
Change-Id: Ib3f0383686399669e8de10456092baaec607fa01