DEBUG context, perform extra runtime checks to validate the kernels and APIs are being used as intended. Get and SetElementAt will be bounds checked in this mode.
PROFILE context, Intended to be used once the first time an application is run on a new device. This mode allows the runtime to do additional testing and performance tuning.
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-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# RenderScript.ContextType\n\nAdded in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nContextType\n===========\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/renderscript/RenderScript.ContextType \"View this page in Java\") \n\n```\nclass ContextType\n```\n\n|---|---|----------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||\n| ↳ | [kotlin.Enum](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html)\\\u003c[android.renderscript.RenderScript.ContextType](#)\\\u003e ||\n| | ↳ | [android.renderscript.RenderScript.ContextType](#) |\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [RenderScript.ContextType.DEBUG](#ENUM_VALUE:DEBUG), [RenderScript.ContextType.NORMAL](#ENUM_VALUE:NORMAL), [RenderScript.ContextType.PROFILE](#ENUM_VALUE:PROFILE) |---------------------------------------------------------|----------------------------------------------------------------------------------------------------------| | [RenderScript.ContextType.DEBUG](#ENUM_VALUE:DEBUG) | DEBUG context, perform extra runtime checks to validate the kernels and APIs are being used as intended. | | [RenderScript.ContextType.NORMAL](#ENUM_VALUE:NORMAL) | NORMAL context, this is the default and what shipping apps should use. | | [RenderScript.ContextType.PROFILE](#ENUM_VALUE:PROFILE) | PROFILE context, Intended to be used once the first time an application is run on a new device. | |\n\n*** ** * ** ***\n\n| **This enum was deprecated in API level 31.**\n|\n| Deprecated in Java.\n\nContextType specifies the specific type of context to be created.\n\nSummary\n-------\n\n| Enum values ||\n|-------------------------------------------------------------------------------------------------------------------------------------|---|\n| [DEBUG](#ENUM_VALUE:DEBUG) DEBUG context, perform extra runtime checks to validate the kernels and APIs are being used as intended. |\n| [NORMAL](#ENUM_VALUE:NORMAL) NORMAL context, this is the default and what shipping apps should use. |\n| [PROFILE](#ENUM_VALUE:PROFILE) PROFILE context, Intended to be used once the first time an application is run on a new device. |\n\nEnum values\n-----------\n\n### DEBUG\n\nAdded in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val DEBUG : RenderScript.ContextType\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nDEBUG context, perform extra runtime checks to validate the kernels and APIs are being used as intended. Get and SetElementAt will be bounds checked in this mode. \n\n### NORMAL\n\nAdded in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val NORMAL : RenderScript.ContextType\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nNORMAL context, this is the default and what shipping apps should use. \n\n### PROFILE\n\nAdded in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val PROFILE : RenderScript.ContextType\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nPROFILE context, Intended to be used once the first time an application is run on a new device. This mode allows the runtime to do additional testing and performance tuning."]]