* 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
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
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
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