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
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
- WuQuantizer, CelebiQuantizer, and WSMeansQuantizer for implementing
Celebi's weighted squared means algorithm for color extraction
- CentroidProvider interface added; allows easy switching of what
colorspace/dimensions is used for clustering during color extraction
Test: Run, switch between a bunch of wallpapers,
switch dark/light theme, repeat ad nauseum. Unit
tests in separate Android Studio project hosting
the library pass, will add those to Android in separate CL.
Fixes: 180641035
Change-Id: I0fc60a134f411845dab9d6c7d8553907849d0f8a
- dupin@ landed the folder & code in it originally
- good idea to move review off the plates of generic frameworks/base
OWNERS
Change-Id: I03a1e8ec00d5b658ee026a44038703e5b31ca52e
Handle onConfigurationChanged() in order to prevent restarting
InputMethodService everytime. We introduce a new API attribute
"configChanges" in InputMethod(attrs.xml) which when declared
by IME, will be responsible for handling mentioned
configuration changes.
Bug: 167948419
Test: atest InputMethodServiceTest
Manually:
1. Patch Ie91e7a8e06b80864ef9409031e8543858552d70d to use dual
display area.
2. Open applications with editors on both display areas.
3. Attach a debug point for IMS#onConfigurationChanged().
4. Make sure IMS#resetStateForNewConfiguration() is not called
when IME moves between these two identical DisplayAreas
Change-Id: Iff88b768c6b06cf5cf1fe9e97ee97f8f78e6f0bd
This "undoes" the rotation in incoming displayviewports
so that inputflinger always works in the orientation the display
grew-up in
It also modifies existing gesture-monitors to deal with unrotated
coordinates
This is behind a flag:
adb shell setprop persist.debug.per_window_input_rotation 1
Bug: 179274888
Test: phone should work like normal
atest MotionEventTest (coretests)
Change-Id: Iaa7ff7d62e9f756af2c9c622ec508c5e538ec8bd
BatteryStats needs the power_profile Cpu constants to smear the measured
CPU Cluster energies across UIDs. Using the CpuPowerProfileCalculator to
get the calculation decreases the chance of someone accidentally
diverging estimated and measured CPU power calculations.
Bug: 180079165
Test: tbd
Change-Id: I474cd019d177bd07f2ae48a47b83a82e4074ed4f
To properly attribute the new MeasureEnergy data for CPU, the cpu kernel
uid file reads needs to occur everytime the CPU MeasuredEnergy is read.
If throttling is necessary, it will need to be handled by
BatteryExternalStatsWorker for both the cpu kernel file reads and the
MeasuredEnergy read to make sure the data is in sync.
Bug: 180079165
Test: atest FrameworksCoreTests:com.android.internal.os.KernelCpuUidUserSysTimeReaderTest
Change-Id: I90ebad48d780872a611605689e0d25678da66f27
This CL cleans up some warnings in the ZygoteInit.java and
ZygoteServer.java files. These warnings were mostly about unused
variables, protection class changes, and dead code. Some changes
to code in Zygote.java and ZygoteConnection.java were needed due to
function signature changes.
Test: Built and booted image
Merged-In: I6ba33cfcb4729a75dbbd4f908f4b46110d3bb991
Change-Id: I6ba33cfcb4729a75dbbd4f908f4b46110d3bb991