Stay organized with collections
Save and categorize content based on your preferences.
VmPolicy
class VmPolicy
StrictMode
policy applied to all threads in the virtual machine's process.
The policy is enabled by setVmPolicy
.
Summary
Nested classes |
|
Creates VmPolicy instances.
|
Public methods
toString
fun toString(): String
Return |
String |
a string representation of the object. |
Properties
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.
[[["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-02-10 UTC."],[],[],null,["# StrictMode.VmPolicy\n\nAdded in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nVmPolicy\n========\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/os/StrictMode.VmPolicy \"View this page in Java\") \n\n```\nclass VmPolicy\n```\n\n|---|-------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.os.StrictMode.VmPolicy](#) |\n\n[StrictMode](/reference/kotlin/android/os/StrictMode) policy applied to all threads in the virtual machine's process.\n\nThe policy is enabled by [setVmPolicy](/reference/kotlin/android/os/StrictMode#setVmPolicy(android.os.StrictMode.VmPolicy)).\n\nSummary\n-------\n\n| Nested classes ||\n|---|------------------------------------------------------------------------------------------------------|\n| | [Builder](/reference/kotlin/android/os/StrictMode.VmPolicy.Builder) Creates [VmPolicy](#) instances. |\n\n| Public methods ||\n|----------------------------------------------------------------------------------|------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [toString](#toString())`()` \u003cbr /\u003e |\n\n| Properties ||\n|----------------------------------|-----------------------------------------------------------------------------------------|\n| static [StrictMode.VmPolicy](#)! | [LAX](#LAX:android.os.StrictMode.VmPolicy) The lax policy which doesn't catch anything. |\n\nPublic methods\n--------------\n\n### toString\n\nAdded in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun toString(): String\n```\n\n| Return ||\n|----------------------------------------------------------------------------------|----------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | a string representation of the object. |\n\nProperties\n----------\n\n### LAX\n\nAdded in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val LAX: StrictMode.VmPolicy!\n```\n\nThe lax policy which doesn't catch anything."]]