Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 438a5205 authored by Xiang Wang's avatar Xiang Wang
Browse files

Add cpu user mode run time rate limiter per UID

To address security review feedback, we will only allow apps to
poll new CPU headroom if the CPU time executing in user mode has
elapsed for longer than the min interval. The check will only
happen if there is a cache miss, so any frequent polling calls
within the interval with same params and default calculation
window size will still be served from cache and require no proc
 stat file reads. Also a DEVICE_POWER permission check is used
 to skip the cpu time check for test and trusted apps.

Bug: 346604998
Bug: 373697764
Flag: android.os.cpu_gpu_headrooms
Test: atest HeadroomTest NativeSystemHealthTest
Change-Id: I752aa673a26feffdce0e8828a8ee34b6219fda10
parent 8de4fa32
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment