This change includes a series of API review changes. The most
significant update is the addition of cancellation signals to
API methods where needed.
Renames some internal classes and interfaces to support the
API changes and to simplify tests and improve quality.
Test: numerous presubmits
Bug: 175830670
CTS-Coverage-Bug: 180419562
Change-Id: I9b1b950a2779fc902ecf4d6394e3c35171926700
Creates presubmit test mapping for BatteryStats-related
files.
These tests can be run manually via
atest FrameworksServicesTests:com.android.server.am.BatteryExternalStatsWorkerTest FrameworksServicesTests:com.android.server.am.MeasuredEnergySnapshotTest FrameworksServicesTests:com.android.server.am.BatteryStatsServiceTest FrameworksCoreTests:com.android.internal.os.BatteryStatsTests
Tests that currently fail are marked to be skipped;
they should be addressed by b/180015146.
This is accomplished by introducing a new annotation, @SkipPresubmit.
Test: treehugger presubmit
Bug: 180016384
Change-Id: If01beaa342468aeded660e5766a14391d3ee9bcc
The parameter was always true (it was a remnant of a previous
approach).
Test: atest FrameworksCoreTests:com.android.internal.power.MeasuredEnergyStatsTest
Bug: 174818228
Change-Id: I3be5392966c3455b2df145044809a581abbf245c
The PositionUpdateListener in BackgroundBlurDrawable is called from
a thread pool to update the position of the BlurRegion. After that,
in frame drawing callback (RenderThread), the Aggregator takes all
the settings in BackgroundBlurDrawable and dispatches them to SF.
However, while the RenderThread is working on frame N, the Ui thread
is working on frame N+1. So when the frame drawing callback is
called on RenderThread for frame N, BackgroundBlurDrawable
might already be holding settings for frame N+1.
In this CL, we fix that by making BackgroundBlurDrawable work only on Ui
thread, while BlurRegion lives only on RenderThread. Just before
drawing, we copy the state of BackgroundBlurDrawable into a BlurRegion.
So when render thread starts doing its thing for frame N, Ui thread can
start setting up BackgroundBlurDrawable for frame N+1. The settings for
frame N are already copied over to BlurRegion. In frame drawing
callback, we take the blur regions if there is a pending update and send
them to SF.
Bug: 167166562
Test: m && atest BlurAggregatorTest
Change-Id: Icec0fa8e97de30b7bad15b97f848ae642076652f
Rename the apis to be more consistent.
Also expose to test api.
Have the aosp mark that it supports the toggle features by default.
Test: atest CtsSensorPrivacyTestCases
Bug: 162549680
Change-Id: Ib38c16adfc5cec931347e1a1891618983d78248b
It is possible for old uids to be reported to BatteryStats
in updateCustomMeasuredEnergyDataLocked().
This can happen, e.g., if a uid was uninstalled between
successive custom energy updates, so that the uid did use non-zero
energy but BatteryStats doesn't care anymore since the uid is gone.
If this happens,
we don't want to recreate any removed Uid objects, so we need
to be careful to only consider Uids that aren't removed.
In practice, this method will only be called after the CPU update,
which means that BatteryStats should already know about all active
uids (assuming they used CPU). Therefore, there shouldn't be any
unknown uids actively using custom energy buckets at this point.
We therefore simply ignore any unknown uids (just log them), on
the assumption that they refer to removed uids or stopped users.
Test: atest BatteryStatsTests
Bug: 180030409
Change-Id: If4fee7a1d11b148ca16d464d6ce4720c5a251130
Revert "[sysuig] Integrate Monet color extraction to theme algorithm"
Revert submission 13554372-kahuna
Reason for revert: Colors on some wallpapers shifted, and Lucas found a couple big reasons why, would rather revert a revert tomorrow than fix forward today
Reverted Changes:
I2c3df9f71:[sysuig] Integrate Monet color extraction to theme...
I0fc60a134:[framework] Integrate new quantizers
Change-Id: I7eb8e4fde243bf62e8c750f88028db0a427560b5
This reverts commit bff33b8c31.
Reason for revert: cts tests on -user builds is broken
Bug: 147113465
Change-Id: I2edf200561f839e49e067403714ea6fa65bdc978
This reverts commit bff33b8c31.
Reason for revert: cts tests on -user builds is broken
Change-Id: I2edf200561f839e49e067403714ea6fa65bdc978
Merged-In: I2edf200561f839e49e067403714ea6fa65bdc978
We trade off increased cost of (rare) mutations of the set of "bad" apps
in order to make the core lookup "is this specific app bad?" lock-free.
Locking discipline turned out to be a dominant cost in a very hot code
path within the running system, even uncontended.
Bug: 175339368
Bug: 163297662
Test: atest ActivityManagerServiceTest
Change-Id: I8803a177d46b01b86897f1e8d0966eb2452849fd
Merged-In: I8803a177d46b01b86897f1e8d0966eb2452849fd
Also, combine WifePowerCalculator and WifiPowerEstimator: they
have a lot more in common than different.
Bug: 158137862
Test: atest WifiPowerCalculatorTest
Change-Id: Ib937102043a1fe04941ecfd09b5077b14058e6ef
Send broadcast to notify the CUJ events to who is interested in.
Bug: 171912046
Test: atest FrameworksCoreTests:InteractionJankMonitorTest
Test: atest FrameworksCoreTests:FrameTrackerTest
Change-Id: I91ab025385c635d15d7be6f7f12597e8900e2e5d
Move functionality related to CPU time_in_state tracking to the
KernelCpuBpfTracking class:
- when to attach the eBPF program to start tracking
- provide available CPU frequencies
- provide CPU cluster (policy) information
- unify the interface of KernelCpuTotalBpfMapReader with other readers
This removes the dependency on the power profile when reading the
information about available frequencies and clusters. It also reduces
the code duplication for transforming that information in
StatsPullAtomService.
Bug: 179485697
Test: existing tests pass
Test: atest CpuStatsTests
Test: cmd stats pull-source 10010
Test: cmd stats pull-source 10095
Test: cmd stats pull-source 10096
Test: cmd stats pull-source 10098
Test: atest FrameworksCoreTests
Change-Id: I17041014343da167b8bdf027ad83887e78ba5c2d