Commit Graph

15650 Commits

Author SHA1 Message Date
Adam Bookatz
47fe2c6ade Merge "TEST_MAPPING for BatteryStats" into sc-dev 2021-02-26 17:11:40 +00:00
Galia Peycheva
656d774184 Merge "Fix synchronisation in BackgroundBlurDrawable" into sc-dev 2021-02-26 14:30:04 +00:00
Jeff Sharkey
869d848e45 Merge "Add OWNERS for long screenshots framework code" am: 79bed70aa2 am: 4df29fd76a am: 2b3fee42d8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1600453

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icb05293712e0b6127bda0e8e297e447956ee5aa1
2021-02-26 13:08:55 +00:00
Mark Renouf
20bd3d4935 Merge "Long screenshots framework update and API unhide" into sc-dev 2021-02-26 13:06:47 +00:00
Dmitri Plotnikov
02073550c0 Merge "Add UID time-in-state to UidBatteryConsumer" into sc-dev 2021-02-26 04:51:40 +00:00
Dmitri Plotnikov
f441fbf774 Add UID time-in-state to UidBatteryConsumer
Bug: 158137862
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryUsageStatsProviderTest
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryUsageStatsTest
Change-Id: I8fde2f754deaa0d2c4ebb06b9a2c99d60086bc23
2021-02-25 15:47:20 -08:00
Mark Renouf
8f1b73e183 Long screenshots framework update and API unhide
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
2021-02-25 23:02:17 +00:00
Adam Bookatz
b62859528e TEST_MAPPING for BatteryStats
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
2021-02-25 14:51:01 -08:00
Adam Bookatz
84fc40ad81 Merge "MeasuredEnergyStats - remove unused accumulate parameter" into sc-dev 2021-02-25 21:55:02 +00:00
TreeHugger Robot
2863f6a40d Merge "Convert WifiPowerCalculator to work with BatteryUsageStats" into sc-dev 2021-02-25 20:15:38 +00:00
Adam Bookatz
26b0a0864c MeasuredEnergyStats - remove unused accumulate parameter
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
2021-02-25 11:02:17 -08:00
Evan Severson
445abca30e Merge "Expose SensorPrivacy as SystemApi" into sc-dev 2021-02-25 18:29:43 +00:00
Galia Peycheva
d129f1e00e Fix synchronisation in BackgroundBlurDrawable
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
2021-02-25 18:33:33 +01:00
Zoey Chen
da74086ba4 Merge "[Telephony] Store correct value for multi-sim case - DataEnabled" into sc-dev 2021-02-25 13:31:04 +00:00
Alex Buynytskyy
414d9ecc26 API feedback: getVersion instead of isV2.
Bug: 181015045
Fixes: 181015045
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I623f73b834759d9a1c599d7c7f3ff585fa75c4aa
2021-02-25 02:06:08 +00:00
Adam Bookatz
0b905b1ef4 Merge "BatteryStats custom buckets: don't revive dead Uids" into sc-dev 2021-02-25 00:26:14 +00:00
Evan Severson
0f9d5aea50 Expose SensorPrivacy as SystemApi
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
2021-02-24 15:39:19 -08:00
Flavio Fiszman
491cbd85c8 Merge "Simplify onNotificationClear signature" into sc-dev 2021-02-24 22:32:17 +00:00
James O'Leary
7edf52d602 Merge "Revert^2 "[framework] Integrate new quantizers"" into sc-dev 2021-02-24 21:59:47 +00:00
Jeff Sharkey
2b3fee42d8 Merge "Add OWNERS for long screenshots framework code" am: 79bed70aa2 am: 4df29fd76a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1600453

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iab3982e777395a9579505ad90b143c3b6c04b6f3
2021-02-24 21:52:33 +00:00
Adam Bookatz
5bb1ec89d3 BatteryStats custom buckets: don't revive dead Uids
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
2021-02-24 21:30:59 +00:00
Jeff Sharkey
4df29fd76a Merge "Add OWNERS for long screenshots framework code" am: 79bed70aa2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1600453

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I916187da222fa9e100d9beb67866427b10481900
2021-02-24 20:59:35 +00:00
Jeff Sharkey
79bed70aa2 Merge "Add OWNERS for long screenshots framework code" 2021-02-24 19:42:32 +00:00
James O'Leary
9d3ad10eb9 Revert^2 "[framework] Integrate new quantizers"
96169052c4

Change-Id: Idefcf279b9fedeeaa29f75e705adfb60f0ad5c8a
2021-02-24 17:09:06 +00:00
Flavio Fiszman
462f2579d5 Simplify onNotificationClear signature
Change-Id: Ib944418dea78fb090c70206c34519f9248a02c04
Test: NotifCollectionTest and NotificationManagerServiceTest
Bug: 172575678
2021-02-24 13:31:45 +00:00
Zoey Chen
4d459c28db [Telephony] Store correct value for multi-sim case - DataEnabled
Bug: 180438087
Text: manual and make
Change-Id: I4bcb66d125be582f3392f4c5af1471849a0fe9b1
2021-02-24 18:22:36 +08:00
Treehugger Robot
1c12237ee3 Merge "Revert "Do not propogate test api access flags to Zygote."" am: 6faddabeb7 am: 1856a9efdd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1598954

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I35de41959fed409a49d101ea9ef3da5c4ced84b6
2021-02-24 04:07:23 +00:00
Treehugger Robot
1856a9efdd Merge "Revert "Do not propogate test api access flags to Zygote."" am: 6faddabeb7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1598954

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icd5c0eea7f0e595dc3f65ccfb20e7f6797280c0d
2021-02-24 03:00:41 +00:00
Wu Ahan
f6ed5fc57c Merge "Send broadcast to notify the events of a CUJ session" into sc-dev 2021-02-24 02:48:48 +00:00
Treehugger Robot
6faddabeb7 Merge "Revert "Do not propogate test api access flags to Zygote."" 2021-02-24 02:20:37 +00:00
Treehugger Robot
155808b3e2 Merge "Defer UID data removal until after reading is finished" am: ce2d40870e am: 7fddb382f7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1554529

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie0a26de931a690d5248d4449fa048a2abf2e7d71
2021-02-24 02:07:31 +00:00
Treehugger Robot
7fddb382f7 Merge "Defer UID data removal until after reading is finished" am: ce2d40870e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1554529

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I96787bdcf17949de0df847c92ffe49b790225e74
2021-02-24 01:49:38 +00:00
Lucas Dupin
e36c4de103 Merge "Revert "[framework] Integrate new quantizers"" into sc-dev 2021-02-24 01:00:49 +00:00
James O'Leary
96169052c4 Revert "[framework] Integrate new quantizers"
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
2021-02-24 00:33:02 +00:00
Treehugger Robot
ce2d40870e Merge "Defer UID data removal until after reading is finished" 2021-02-23 23:08:31 +00:00
TreeHugger Robot
9132e2def2 Merge "Revert "Do not propogate test api access flags to Zygote."" into sc-dev 2021-02-23 21:12:41 +00:00
James O'Leary
c7d315947d Merge "[framework] Integrate new quantizers" into sc-dev 2021-02-23 20:20:39 +00:00
TreeHugger Robot
36625c00f3 Merge "Make isAppBad() lock-free" into rvc-qpr-dev am: 460929b61e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13666974

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I908d468bcde96d5290fc73ca89db485402292a6b
2021-02-23 19:01:03 +00:00
satayev
cb9fb0aaaf Revert "Do not propogate test api access flags to Zygote."
This reverts commit bff33b8c31.

Reason for revert: cts tests on -user builds is broken

Bug: 147113465
Change-Id: I2edf200561f839e49e067403714ea6fa65bdc978
2021-02-23 18:28:32 +00:00
Taran Singh
6ba3501f98 Merge "Avoid IME restart for configChanges" into sc-dev 2021-02-23 15:04:42 +00:00
Tony Huang
f9a0ccc0e7 Merge "Make AppTransition animations sharable (2/n)" into sc-dev 2021-02-23 09:26:05 +00:00
satayev
ff8c375e95 Revert "Do not propogate test api access flags to Zygote."
This reverts commit bff33b8c31.

Reason for revert: cts tests on -user builds is broken

Change-Id: I2edf200561f839e49e067403714ea6fa65bdc978
Merged-In: I2edf200561f839e49e067403714ea6fa65bdc978
2021-02-23 04:06:39 +00:00
Christopher Tate
8a3e7201b5 Make isAppBad() lock-free
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
2021-02-22 17:47:16 -08:00
Mark Renouf
08b97003b3 Add OWNERS for long screenshots framework code
Change-Id: If7680b6d2124c63aa29421d5c2b717db8e5cbf1a
2021-02-22 19:53:46 -05:00
TreeHugger Robot
d2191dbad6 Merge "Further reduce LM memory cost" into sc-dev 2021-02-22 21:29:42 +00:00
Rafal Slawik
e4244b9d73 Merge "Manage time_in_state tracking from one place" into sc-dev 2021-02-22 19:44:45 +00:00
Dmitri Plotnikov
80c0c66edc Convert WifiPowerCalculator to work with BatteryUsageStats
Also, combine WifePowerCalculator and WifiPowerEstimator: they
have a lot more in common than different.

Bug: 158137862
Test: atest WifiPowerCalculatorTest

Change-Id: Ib937102043a1fe04941ecfd09b5077b14058e6ef
2021-02-22 11:35:14 -08:00
Ahan Wu
320858c56f Send broadcast to notify the events of a CUJ session
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
2021-02-22 19:24:56 +00:00
Soonil Nagarkar
7aa01124c4 Merge "Added attribution tag to note listener" into sc-dev 2021-02-22 17:25:24 +00:00
Rafal Slawik
e7f1410a90 Manage time_in_state tracking from one place
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
2021-02-22 10:37:58 +00:00