summaryrefslogtreecommitdiff
path: root/core/java/android/window/TaskFpsCallback.java
Commit message (Collapse)AuthorAgeFilesLines
* Address API review feedback.Peiyong Lin2022-02-141-34/+7
| | | | | | | | | | | Avoid using nested callback classes, move the Executor to register function and update the Javadoc to emphasize unregister call is always expected even when a task is already destoryed. Bug: b/216628683 Test: atest TaskFpsCallbackTest Change-Id: I801898d082a6eeb6a6f991e3765795a270943d42
* Raise SurfaceControlFpsListener to System API.Peiyong Lin2022-01-211-0/+86
Previously the SurfaceControlFpsListener is a hidden API which only allows platform code access. This patch renames it to follow the callback convention and raises it to be a system API in order to allow system applications to access the FPS count of a task and its children. The FPS count access is guarded by a permission ACCESS_FPS_COUNTER. To follow the API convention and properly check the permission, the register/unregister callback APIs are moved to WindowManager and permission check is done in the System Server. Minor: Rename to SurfaceControlFpsCallback to TaskFpsCallback in order to follow the API naming convention. Bug: b/199920468 CTS-Coverage-Bug: b/199920468 Test: atest TaskFpsCallbackTest Change-Id: I6b0a0ad6500278b3da09059e9c2ede28d9a743aa