summaryrefslogtreecommitdiff
path: root/include/powermanager
AgeCommit message (Collapse)Author
2025-03-10Refactor PowerHalController and add a binding for composition data Matt Buckley
This patch refactors some of the calls to use the "hal::" syntax used elsewhere for ADPF, and adds (currently unused) wrappers for sending composition data. Bug: 360908317 Flag: EXEMPT refactor Test: atest libpowermanager_test Change-Id: Ib9b2fec37b8e1431ba2c4ba0658db658f28429fa
2024-11-18Refactor initial support check to use SupportInfo Matt Buckley
This change makes the intial support check when APerformanceHintManager starts pass the SupportInfo object instead of just relying on the preferred rate Bug: 367803904 Test: atest PerformanceHintNativeTestCases Test: atest HintManagerServiceTest Flag: EXEMPT refactor Change-Id: Iba93310c58896a2b1d02c6156b4e67eaa766af5b
2024-11-17Add ADPF to PowerManager header OWNERS Matt Buckley
Change-Id: Iddc5808654664888952b7c8848bd66e89e15a97a Test: n/a Bug: none
2024-03-04Update PowerHAL wrapper support checking behavior Matt Buckley
- Updates support checks to check status for UNKNOWN_TRANSACTION - Adds PowerHintSessionWrapper class to check support on session methods - Ensures that wrapper methods check the HAL version number for support - Adds macros to cache returned wrapper call support status Bug: 324255931 Test: atest libpowermanager_test Test: atest libsurfaceflinger_unittest:PowerAdvisorTest Change-Id: I4b329e6b55c53198bb064a34e792be6336e66e27
2024-01-23Add support for new PowerHAL methods to PowerHalWrapper Matt Buckley
This patch adds FMQ support, createHintSessionWithConfig support, and refactors the class structure slightly to allow wrapper subclasses to share unsupported method logic with EmptyHalWrapper Bug: 317387260 Test: atest libpowermanager_test libsurfaceflinger_unittest libcompositionengine_test Change-Id: I53b67055b3ada4dc8576533a9b961ff5ec3367a5
2023-06-03Merge "Mock init of PowerHalController in test" into udc-qpr-dev am: ↵ TreeHugger Robot
30f0d321c6 am: 130b62c339 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/23483476 Change-Id: Iccc1ed5af5c07f9d4d3d1cd3b44df87efac9e5c5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-31Mock init of PowerHalController in test Xiang Wang
We have injected a MockedPowerHalController in PowerAdvisorTest, but it will always run init once, which will try to connect a real PowerHAL. This was resulting in a few error logs like SELinux denials. Bug: 280438886 Test: libsurfaceflinger_unittest Change-Id: Icbd0289cbeba95582eed01e61dcb748e2e167c24
2023-05-24Update power manager to use power ndk Xiang Wang
Bug: 280438886 Test: atest libpowermanager_test libsurfaceflinger_unittest libcompositionengine_test Change-Id: I6bc17035665d5654b6becf71aa4e29ab9351cae8
2022-10-13Extend PowerHalWrapper to support HIDL 1.2 and 1.3 Matt Buckley
* Added support for 1.2 and 1.3 HIDL calls to the PowerHalWrapper * Expanded the wrapper and loader tests to cover these new versions * Lightly tweaked the existing tests to make them more comprehensive Bug: b/244631171 Test: atest libpowermanager_test Change-Id: I5890106817b7cf243cdd21b3acf22ff7fcd8174e
2021-12-08Game Loading Time improvement by boosting CPU via ADPF Jim Blackler
Bug: 201769701 Test: atest android.gamemanager.cts.GameManagerTest Change-Id: I7b6d0a892281360afcdcf3c2cb60e3f9640dd518
2021-04-07ADPF: Plumb getAppSession throughout PowerHal wrapping Jimmy Shiu
Test: Manual test, run bouncy ball Test: atest libpowermanager_test:PowerHalWrapperAidlTest Test: atest libpowermanager_benchmarks Bug: 158791282 Change-Id: I0cf3420f3cf79f107347a640e6f14c1eeac60f23 Signed-off-by: Wei Wang <wvw@google.com>
2020-06-12Some fixes to power manager lib code Lais Andrade
- Run clang-format on all recently added files; - Move all new classes to android::power namespace and remove Power prefix from all classes and enums; - Add virtual function specifier to overrides of virtual members; - Add missing virtual destructors; - Remove namespaces and aliases from public api of header files; - Delete constructor and destructor of PowerHalLoader; - Add helper functions to convert hal results in wrapper implementations; - Merge test targets to single libpowermanager_test target; Bug: 150878220 Test: atest libpowermanager_test Change-Id: Ie2b5ad69f3b05d5f6b576671bc98e0f83b274152
2020-04-28Create controller for Power HAL handles. Lais Andrade
This controller is also a PowerHalWrapper and delegates each api call to the Power HAL currently connected. It is also responsible for reconnecting with it after any api call fails. This cl also introduces PowerHalConnector, to abstract away the logic to connect to a Power HAL. Bug: 150878220 Test: atest powermanager_test Change-Id: I24cd262ce40429cc1107a1f0184ed2719a7492d9
2020-04-19Create loader for Power HAL services Lais Andrade
Move logic to load underlying Power HAL services to a static class in services/powermanager, with tests. This can now be reused by BatteryStatsService and PowerManagerService, removing the dependency between them. Bug: 150878220 Test: atest powermanager_test Change-Id: I52eec130811d49111526f3e152faf4302518c5a8
2020-04-17Create wrappers for Power HAL. Lais Andrade
Create wrappers over existing HIDL Power HALs v1.0, v1.1, and AIDL Power HAL. All wrappers expose the same API that should be used by the PowerManagerService. Bug: 150878220 Test: atest powermanager_test Change-Id: I5edba6d51d3e18c5137c87b65bc9efa6c70ba7e8
2020-04-06Migrate power manager native services to AIDL. Chris Ye
Migrage power manager native service to AIDL. Use aidl compiler to generate native cpp header and source files from frameworks/base/core/java/android/os/IPowerManager.aidl, retire manually enrolled IPowerManager header and source files. Bug: 149479744 Test: atest PowerManagerServiceTest Change-Id: I3123a8803c334f7e82fe6da3df0202eb56786b1c
2020-02-19Create native version of Thermal Throttling API. Chris Ye
Create native thermal manager API of thermal mananger service. Export libthermal NDK library. Bug: 137151587 Bug: 136285293 Test: build, atest thermalmanager-test Change-Id: I1ec7c746f7e814c701b306e06fe08c3641c39e88
2019-03-12update enum for renamed api Salvador Martinez
This just updates the enum name to match the function. Test: system boots Bug: 117154042 Change-Id: I857570881715c97c23f1e2410cbd88874c0e0424
2017-05-03Correct PowerManager transaction IDs. Michael Wright
Test: build, compare to java aidl output Change-Id: I74022bf5a5e7f685a7dfaf99d6863f27d01be706
2016-09-27Fix trailing semicolon warnings Colin Cross
Remove semicolons after inline function definitions. The warnings were being hidden by the use of -isystem to include frameworks/native/include. Bug: 31752268 Test: m -j Change-Id: I1027e87f459c36a575cd04b3afb645736832b07b
2016-03-17Add user activity event type for accessibility. Phil Weaver
Bug: 19531976 Change-Id: I95096dbf252556e677a8a9f3bffe8abaab353ab4
2015-09-30Add more methods to IPowerManager. Daniel Erat
Add the full list of transaction IDs from IPowerManager.aidl to IPowerManager.h and make BpPowerManager support calling goToSleep, reboot, shutdown, and crash. These are currently needed by or likely to be needed by Brillo. Bug: 22122485 Change-Id: I19abd3587c9d53b28ec150210e07f97517ee4ff4
2015-09-15Update libpowermanager to expose enum and export headers. Daniel Erat
Move libpowermanager's transaction ID enum (needed when implementing BnPowerManager::onTransact()) into IPowerManager.h and update the library's Android.mk file to export its headers. Bug: 22122485 Change-Id: Ie97198c3d2ebe8e880125e19a001ef7162009858
2014-09-05Make IPowerManager native conform to .aidl for oneway Glenn Kasten
But provide a temporary escape hatch for AudioFlinger. This oneway option will be removed as soon as possible. Bug: 16408906 Change-Id: I20d6da1969ae05b96e72795463470eb4c1f8fbdc
2014-04-02PowerManager: add powerHint binder method Ruchi Kandoi
Change-Id: Ide1d50bb1580698b25296fbfc1cc63c3b21a00bc
2014-02-11Move inputservice over to frameworks/native Michael Wright
Add all of the underlying input system pieces, minux PointerController and SpriteController, to inputflinger. This is in preparation for moving input to its own process and the addition of the input HAL. Try 2. Change-Id: I5f571fe86eb570885ae994e1f0552fb558930346
2013-10-16Native counterpart of new power manager method Marco Nelissen
Change-Id: I54c0ed50a57ac870da91db8589a73a2c792dbd8d
2013-10-03Allow blaming a single uid for work done Marco Nelissen
This lets audioflinger assign blame for wakelocks to a single uid. Currently this is only used for recording wakelocks. b/10985160 Change-Id: Idc9adb22c29030010ac690d4cb95e7e7ea6b91e6
2013-05-20Power manager now takes calling package name arg. Dianne Hackborn
Change-Id: Iae57b8eb7abe4e66f0d2645db8cdf57acf7dcd3e
2012-03-28Move services/powermanager from frameworks/base to frameworks/native Colin Cross
Move services/powermanager into frameworks/native so audioflinger can use it. Note that this is not the same as a PowerManagerService, which is part of systemserver and handles turning the screen on and off, etc. This is just a binder interface to allow taking wakelocks. Change-Id: I6b6a8b41cdbad17e826fda45aab5f059f22fc64e