Recently cellular radio related values {"radio.active", "radio.scanning",
"radio.on"} are removed from power_profile.xml, which causes inaccurate
radio power usage. We use following formula to calculate radio
values from modem.controller values.
radio.active = average of modem.controller.rx and modem.controller.tx values
radio.scanning = 0 (since this is already included in radio.on bin 0)
<array name="radio.on"> <!-- Strength 0 to BINS-1 -->
<value>modem.controller.idle * 25 / 180 </value> <!-- none -->
<value>max(1, modem.controller.idle/256) </value> <!-- poor -->
<value>max(1, modem.controller.idle/256) </value> <!-- moderate -->
<value>max(1, modem.controller.idle/256) </value> <!-- good -->
<value>max(1, modem.controller.idle/256) </value> <!-- great -->
</array>
Bug: 79379255
Test: use debugger to observe correct mPowerRadioOn, mPowerBins,
mPowerScan are calculated. "adb shell dumpsys batterystats", looking for
"radio=" in "Estimated power use" section.
Change-Id: Ic65a5c8a35a5b1f4ba05ddc150e29b00bc62689f
After GPS power profile changed from a single value "gps.on" to a
"gps.signalqualitybased" array, we use the time gps stays in each
signal level to calculate the average gps power usage.
Bug: 79379255
Test: adb shell dumpsys batterystats, looking for "gps=" in per app
power usage section.
Change-Id: I93d17d5bd25324cc9f36a7a5502b088a44184621
ColorDisplayService doesn't start listening for changes until the end
of user setup, and color mode was previously unintialized at service
setup, so restored settings were ignored.
Bug: 79591550
Test: atest FrameworksServicesTest:ColorDisplayServiceTest
Change-Id: I00baed15e1248572d3dfd8f251dee7dc5a355a6c
This ensures that the more details activity displays information about
the correct app.
Change-Id: I0c0f71fff32c2c1c5f4597c8a4eab90ec54409ca
Fixes: 80070434
Test: manually verified
Previously the collapsed view could contain a message even before
the messaging imaging image and the display would look very distored.
This now makes sure that any groups with isolated messages always
are the last ones displayed.
Test: add group with image, adjust display settings to large
Change-Id: If9e69f72ce117687898dcaea591e61c6fb49ef46
Fixes: 78490082
The added utility methods are to enable increased
granularity in determinining the availability of gesture
settings dependant on Always on Display.
Bug: 79779562
Test: robotests
Change-Id: Ib54a867ca554d44ee4190706805fa8545aec9fa0
ActionBarOverlayLayout used to drop WindowInsets, extract the content insets
as a rect, and then dispatch a modified rect to the content view; this because
there was no way to retarget the WindowInsets to the content view, and the
WindowInsets were not truly immutable. That means however, that other kinds of
insets than the content insets do not get dispatched, such as the display cutout.
To fix this, we add APIs to inset WindowInsets, make them immutable. Note that
a similar change is needed for the support lib.
Bug: 79733300
Test: atest ActionBarOverlayLayoutTest
Change-Id: I6a69d8462163ca5e66fdb53f83def6bc4063f8aa
The main thread was recycling the objects before the hander could
pack up the binder call.
Change-Id: I4289bdcc5b940a0a8209fdd5d3df47972de0fa4b
Fixes: 72953296
Test: atest com.android.notification.functional.NotificationInteractionTests#testNotificationShadeMetrics
When sender symbol is number or special-char, use person avatar icon
with sendor name color tint.
Fixes: 73551742
Test: manual use different sender name and send message notification
Change-Id: I5e3080efc834bf09c1dae93ef8af06cf3df4d22d
Widgets get masked with separate remove views when suspended. Need to
update them with the correct pending intent. Moved around the logic
creating the suspended alert activity to make it reusable.
Test: Manually, "pm suspend <app-with-widget>", followed by tap on
widget
Existing tests pass:
atest GtsSuspendAppsTestCases
atest com.android.server.am.ActivityStartInterceptorTest
Bug: 79474038
Change-Id: Ic75ee762434bf92c54bda307e9cb6018f94a914c
Fixes splitscreen from the right for launching splitscreen from
fullscreen app including pixel launcher and 3rd party launchers. With
3rd party launchers, the experience is the same as Android O. With pixel
launcher since launcher and recents are merged, it will split to
minimized mode. When pixel launcher is used, the recents stack is
ignored.
Fixes: 73250406
Fixes: 78247419
Test: use split screen; invoke command with supportapp.apk in b/78247419
adb shell am broadcast -a launcher-acc --ei cmd 1
Change-Id: I70b0551c517465b3a059ff7d0641c27f71e8114e
- Stop using individual lock instances and use use the power manager lock.
- Make sure not to access external components with the lock held,
*except for settings provider*, which is already touched by the power manager
and the battery service
(I'm planning to re-organize things for Q: b/79580230)
Fixes: 79486713
Test: atest /android/pi-dev/frameworks/base/services/tests/servicestests/src/com/android/server/power/batterysaver/Battery*Test.java /android/pi-dev/frameworks/base/services/tests/servicestests/src/com/android/server/power/*Test.java
Test: Manual test with ./development/scripts/battery_simulator.py with toggling
battery saver on and off and then watch
adb logcat -b all | grep -P '(battery_saving_stats|battery_saver_mode)'
Change-Id: I8ecdfefe978de348ee979d765c82e3d8f0280082
Fix some bugs, add the ability to monitor state changes, improve
dumpsys output to help debugging, add a new check API that allows
the caller to get the real state.
Bug: 78480444
Test: atest FrameworksServicesTests:AppOpsServiceTest
Test: atest CtsPermissionTestCases:AppOpsTest
Change-Id: I3d41be9968c1d95a1456f4052da958ea64aa068d
Pass an explicit flag to the runtime when we need to profile the system
server. This ensures that we only start the ProfileSaver and allocate the
code cache when needed.
Test: manual, on a device with system server profiling enabled
Bug: 74081010
(cherry picked from commit 8eb891be6f)
Merged-In: I756682a9644796afb53f0c010d2bd2764ea5a828
Change-Id: I756682a9644796afb53f0c010d2bd2764ea5a828
In minimized mode there is only 1 split snap target compared to regular
portrait that has 30%, 50%, 70% targets. Update the accessibility options
for minimized mode to reflect the correct targets. Also removed the
middle target if there is only 1 split snap target.
Test: using talkback, see custom options on divider handle in minimized
mode
Fixes: 78304300
Change-Id: I8421499616cf0fe503c1f6a081a2151098640a9c
Current limitation is that we cannot distinguish between key events
from Window#injectInputEvent() and key presses from physical devices.
Bug: 79185725
Test: Manually verified with the test app, and Cts
Change-Id: I1c3da4a963238512eec8b57fbc2d825c7436b140
Certain apps use empty sender names, which looks very
broken. Let me do this one last workaround...
Change-Id: I958319d1e4f9387e5e05afb304c05bef55c3e2fb
Fixes: 73139872
Test: receive a message with empty sender, observe visually
Update the logic for system server profiles to work without disabling
SELinux policies.
Test: check that system_server profile is created without disabling
SElinux
Bug: 74081010
Change-Id: I8aa1e57da0f8059bcfb149fe7366d8278b4bf516
Updating a remoteInputHistory message to non-history
was generating a weird animation because we would
not reuse the view if the remoteInputHistory state
changed.
Bug: 77957392
Test: visual, observe normal animations
Change-Id: Iac869159411cc57c90476ef684a05e8547c14aa4
The historic message groups are now also gone,
not just the messages
Change-Id: Ib7a454809425c18f5c2fd5905b3dae9ec5ec846f
Fixes: 72556979
Test: visually, add historic messages, observe group is gone too
This also fixed the paddings for the bigtext layout
by remeasuring it after the initial measure.
Test: runtest systemui
Change-Id: I4b974645606691e6faf2b99b8e52c791e69ee6ea
Fixes: 79111092
A messaging group would still look visible if all of its children
were hidden, which is incorrect. We instead regard it as measured too
small.
Test: add message notification with smart reply, click on smart reply
Change-Id: If5174f95038bf16022d935fd05f337969984f0c2
Fixes: 78214933