MeasuredEnergyStats now supports a variable number of
'buckets', including both the standard buckets (fixed number)
and additional custom buckets (variable number) whose meaning
is unknown to BatteryStats (but is enumerated as an 'ordinal').
This will be used to store per-uid energy data from custom
power components.
Test: atest MeasuredEnergyStatsTest
Test: atest com.android.internal.os.BatteryStatsTests
Bug: 179107328
Bug: 174186358
Change-Id: I0022ac6940daca5f1e7d0e502eed01effa71f796
Also remove redundant PlatformIdle stats section from history details
Bug: 173132005
Bug: 178315485
Test: Ran device to drain battery then checked dumpsys batterystats
Test: Verified that Historian could correctly parse the bugreport
Change-Id: I65c1824695dd026231f83664b00f72912dee2164
Use measured screen energy usage (where available)
in battery reporting in BatteryStatsHelper, including
total and per-app screen energy usage.
Regardless of the data source (measured screen power usage vs.
estimating from screen time), the blame on apps is 'smeared',
meaning that it is apportioned (after-the-fact) based on each
app's foreground usage. That does not change here.
Also fixes a mistake in Uid.getScreenOnEnergy().
Future followups to do
1. Make getMeasuredOrEstimatedPower more universal (as more
PowerCalculators follow suit)
2. Support for BatteryUsageStats
3. Deal with voltage properly
4. Toggle whether to report the measured energy on/off.
Test: atest BatteryStatsHelperTest
Bug: 174818228
Change-Id: I0eaa4bc594cb31b4a26b5488b08114cbf80e3884
Merged-In: I0eaa4bc594cb31b4a26b5488b08114cbf80e3884
(cherry picked from commit 30594e82d5)
This CL makes the blur behind functionality a public API. As part of
this change, we change its previous name (windowBackgroundBlurRadius) to
windowBlurBehindRadius. This avoids a name clash with the Window
background blur, which only blurs the area of the window. Blur behind
blurs everything behind the window (similar behaviour to the dim).
This CL exposes WM.LP.blurBehindRadius and, in addition, undeprecates an
old flag - FLAG_BLUR_BEHIND. FLAG_BLUR_BEHIND enables the blur behind
and blurBehindRadius specifies how dense the blur will be.
In addition, we expose two xml attributes on the Window -
windowBlurBehindEnable and windowBlurBehindRadius. The usage is similar
to the dim api.
Bug: 167166562
Bug: 177524486
Test: m && test app
Change-Id: If2fcde644c5bcca112495ca99ee66bae909877db
Merged-In: If2fcde644c5bcca112495ca99ee66bae909877db
The flow has been replaced by @ChangeId ALLOW_TEST_API_ACCESS, making
old approach obsolete.
Bug: 147113465
Test: atest CameraEvictionTest#testBasicCamera2ActivityEviction
Merged-In: I0bf109fa78212d6d71ba85d25f80e27e8e7cd900
(cherry picked from commit a27cd30535)
Change-Id: I0e58b6924744590afaadec6a6230aa9d552b2f6f
Exempt-From-Owner-Approval: cp
Revert "Add permission check for blurs in SurfaceFlinger"
Revert "Remove public usages of FLAG_BLUR_BEHIND"
Revert "Add pid and uid to SF::setClientStateLocked"
Revert "Add USE_BACKGROUND_BLUR to cts expected permissions"
Revert submission 13350963-blur_system_api
Reason for revert: This topic made blurs a system api. API council voted against that and we will instead aim to make it public for S. None of these changes are relevant in that case.
Reverted Changes:
I3683db296:Remove public usages of FLAG_BLUR_BEHIND
I23b21b603:Add USE_BACKGROUND_BLUR to cts expected permission...
Id21f03793:Add pid and uid to SF::setClientStateLocked
If5d8344a5:Add permission for blur SystemApi
I70d1e1715:Add permission check for blurs in SurfaceFlinger
Icf98c3607:Make window background blurs SystemApi
I0b881ec6e:Make BackgroundBlurDrawable a SystemApi
Bug: 177523043
Test: m
Change-Id: I0f7bcf34db2986d8d5e08b115a611e8e07db5917
Merged-In: I0f7bcf34db2986d8d5e08b115a611e8e07db5917
Revert "Add permission check for blurs in SurfaceFlinger"
Revert "Remove public usages of FLAG_BLUR_BEHIND"
Revert "Add pid and uid to SF::setClientStateLocked"
Revert "Add USE_BACKGROUND_BLUR to cts expected permissions"
Revert submission 13350963-blur_system_api
Reason for revert: This topic made blurs a system api. API council voted against that and we will instead aim to make it public for S. None of these changes are relevant in that case.
Reverted Changes:
I3683db296:Remove public usages of FLAG_BLUR_BEHIND
I23b21b603:Add USE_BACKGROUND_BLUR to cts expected permission...
Id21f03793:Add pid and uid to SF::setClientStateLocked
If5d8344a5:Add permission for blur SystemApi
I70d1e1715:Add permission check for blurs in SurfaceFlinger
Icf98c3607:Make window background blurs SystemApi
I0b881ec6e:Make BackgroundBlurDrawable a SystemApi
Bug: 177523043
Test: m
Change-Id: Iee4b89b06508c7dc3b7266452bb0b987f8670fac
Merged-In: Iee4b89b06508c7dc3b7266452bb0b987f8670fac
1. Create a wider path
2. Allow dots to be a different color
3. Draw dots over the path instead of below
Bug: 170729566
Test: manual, visual refresh only
Change-Id: I5c191893132eba89d6e55047d7500efa4aa95a29
Also adds IntDef Action annotation to clarify which methods expect the
ACTION_* arguments.
Test: manual - configure threshold through adb and trigger a trace
Bug: 161781469
Change-Id: I7497901138f71049362927c0491d1ab208df3db3
Changes so that:
1) PiP now can be stashed when the user releases/let go of input when
PiP is currently floating on top of the left/right edge of the device.
Currently, 1/3 of the PiP needs to be off-screen in order for stash to
happen.
2) Stashing is now allowed from one edge to the other (e.g. user flings
from left to right, right to left), with VERY high velocity (>=
18000.f).
Bug: 178752503
Test: Let go of PiP when off screen, stashes
Test: fling from left to right with extremely high velocity, stashes
Change-Id: Ia0b701b75f598965d79b07b10f09118f80562f09
Add KEY_NOT_CONVERSATION into default allowed adjustments list and add
DeviceConfig to enable it
Bug: 173106605, 178151392
Test: tested on device
Change-Id: I9a34fc3aadadde785bfce2bdf2ff35b0cc0b0ec6
(cherry picked from commit 6fe1741d37)
Comply following methods to IVoidResultCallback to emulate
current behavior and apply them to one-way.
-. startProtoDump
-. startImeTrace
-. stopImeTrace
Bug: 163453493
Test: atest CtsInputMethodTestCases
Test: 1) Enable the Winscope Trace tile
2) Do some actions like open keyboard
3) Disable the Winscope Trace tile
4) Grad a bugreport and verify trace on go/Winscope
Change-Id: I3eafbc28ed3acf3ba859885bf201cb06b3149b94
The estimated energy used by the screen is
smeared over all apps based on their foreground time.
This calculation is performed by BatteryStatsHelper after
most of its other processing.
In this cl, we move that logic to the ScreenPowerCalculator,
which is actually responsible for calculating the total and
app screen energy blaming. This also allows other power calculators
for screen usage (such as actual screen energy measurements) to
be hooked up in the future, without BSH worrying about whether to
smear.
Note: Smeared energy is not included in the app's total energy usage
until the very end; prior to that, it is recorded in a special field
BatterySipper.screenPowerMah. This is NOT changed in this cl.
NOTE: The actual smearing algorithm is NOT altered in this cl.
Test: atest BatteryStatsHelperTest
Bug: 174818228
Bug: 162379528
Change-Id: I30b436b736e96071a1e4167d37512d250119665c
Merged-In: I30b436b736e96071a1e4167d37512d250119665c
(cherry picked from commit 3754504f4b)
Move some animation functions in AppTransition to new
TransitionAnimation class for wm-shell using.
Bug: 175053726
Test: build
Change-Id: I7eef67359fd4532f7e4d97c787d5288362a32f13
Use the same checkWifiOnly method in BatteryUsageStatsProvider and other
battery stats logic.
Bug: 174436414
Test: atest
Change-Id: I6ae21c579a063c3dd65726620b7a6c9e9f09a957
Instead of classifying interfaces by network type in BatteryStats,
classify them based on the transports array provided by the
NetworkAgent.
Network types are deprecated and transports should be used instead. This
change allows BatteryStats to stop depending on unstable APIs such as
isNetworkTypeMobile.
This change also updates nullability annotations in ConnectivityService
and NetworkAgentInfo to show that the NetworkCapabilities are non-null
(as provided by the network agent) when calling
noteNetworkInterfaceTransports.
Bug: 174436414
Test: atest
atest ConnectivityServiceTest#testBatteryStatsNetworkType \
--rerun-until-failure 40
Merged-In: I4e928fac8a57a9b1fc758a44af2a5719b8c871b8
Change-Id: I4e928fac8a57a9b1fc758a44af2a5719b8c871b8