Stay organized with collections
Save and categorize content based on your preferences.
OnJankDataListener
interface OnJankDataListener
Listener interface to be informed about SurfaceFlinger's jank classification for a specific surface.
Summary
Public methods |
abstract Unit |
Called when new jank classifications are available.
|
Public methods
onJankDataAvailable
abstract fun onJankDataAvailable(jankData: MutableList<SurfaceControl.JankData!>): Unit
Called when new jank classifications are available. The listener is invoked out of band of the rendered frames with jank classification data for a batch of frames.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-03-13 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-13 UTC."],[],[],null,["# SurfaceControl.OnJankDataListener\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnJankDataListener\n==================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/view/SurfaceControl.OnJankDataListener \"View this page in Java\") \n\n```\ninterface OnJankDataListener\n```\n\n|-----------------------------------------------------|\n| [android.view.SurfaceControl.OnJankDataListener](#) |\n\nListener interface to be informed about SurfaceFlinger's jank classification for a specific surface.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onJankDataAvailable](#onJankDataAvailable(kotlin.collections.MutableList))`(`jankData:` `[MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\u003c[SurfaceControl.JankData](/reference/kotlin/android/view/SurfaceControl.JankData)!\u003e`)` Called when new jank classifications are available. |\n\nPublic methods\n--------------\n\n### onJankDataAvailable\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onJankDataAvailable(jankData: MutableList\u003cSurfaceControl.JankData!\u003e): Unit\n```\n\nCalled when new jank classifications are available. The listener is invoked out of band of the rendered frames with jank classification data for a batch of frames.\n\n| Parameters ||\n|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `jankData` | [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\\\u003c[SurfaceControl.JankData](/reference/kotlin/android/view/SurfaceControl.JankData)!\\\u003e: This value cannot be `null`. |"]]