Commit Graph

6 Commits

Author SHA1 Message Date
Matt Buckley
354cc0a140 Add support for ADPF HintSession sendHint to JNI
* Add sendHint API to HintManagerService and PerformanceHintManager
 * Plumb relevant calls through the existing implementation
 * Extend existing tests to cover new API calls
 * Update the relevant build files to use power API v4

Bug: b/243973548
Test: atest PerformanceHintNativeTestCases
Test: atest FrameworksCoreTests:android.os.PerformanceHintManagerTest
Test: atest HintManagerServiceTest

Change-Id: Ice7ed8f32e877bd845afad77fcc6ae16f1a1b78c
2022-11-09 01:49:41 +00:00
Wei Wang
9f174f4bbb Send the hint immediately when actual > target
Send the hint immediately when actual duration is longer than target
duration.

Test: boot
Bug: 198379880
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I6c80940b27d65a1e34e40f61eef3f81990957711
2022-04-19 17:19:54 +00:00
Bo Liu
9acc558c29 adpf: Use one client token per process for all hint sessions
So it doesn't leak when gc is delayed in service process.

Update HintManagerService to allow multiple sessions tied to the same
token.

Bug: 218129784
Test: chrome no longer gets killed
Change-Id: I67a66041cc67d01e4cfcd3ded303a1bed6050f60
2022-03-01 12:04:06 -05:00
Bo Liu
2b739bbb63 Performance hint ndk APIs
Test: atest PerformanceHintNativeTestCases
Change-Id: I8f410cf5ee8cee90465d1ce48a42c9ff8bbe80c4
2021-11-10 19:22:22 -05:00
Bo Liu
d6a096006a ADPF: Handle preferred interval on unsupported device
The original java implementation just passed along whatever the server
returns which is -1 on unsupported devices. So do that here as well.

Test: PerformanceHintManagerTest passes on unsupported device
Bug: 194691581
Change-Id: I8ac07737e6ce52debf55478880d71f038f258056
2021-07-26 14:49:54 -04:00
Bo Liu
4426772eab Implement native PerformanceHint API
Test: atest PerformanceHintNativeTestCases
Bug: 194204196
Change-Id: Ie26e25e9ecf87046df92346dff54174934a8c73e
2021-07-22 11:31:49 -04:00