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,["# android.os.strictmode\n=====================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/os/strictmode/package-summary \"View this page in Java\")\n\nExceptions\n----------\n\n|--------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [CleartextNetworkViolation](/reference/kotlin/android/os/strictmode/CleartextNetworkViolation) | \u003cbr /\u003e |\n| [ContentUriWithoutPermissionViolation](/reference/kotlin/android/os/strictmode/ContentUriWithoutPermissionViolation) | \u003cbr /\u003e |\n| [CredentialProtectedWhileLockedViolation](/reference/kotlin/android/os/strictmode/CredentialProtectedWhileLockedViolation) | Subclass of `Violation` that is used when a process accesses filesystem paths stored in credential protected storage areas while the user is locked. |\n| [CustomViolation](/reference/kotlin/android/os/strictmode/CustomViolation) | \u003cbr /\u003e |\n| [DiskReadViolation](/reference/kotlin/android/os/strictmode/DiskReadViolation) | \u003cbr /\u003e |\n| [DiskWriteViolation](/reference/kotlin/android/os/strictmode/DiskWriteViolation) | \u003cbr /\u003e |\n| [ExplicitGcViolation](/reference/kotlin/android/os/strictmode/ExplicitGcViolation) | See #[android.os.StrictMode.ThreadPolicy.Builder#detectExplicitGc()](../StrictMode.ThreadPolicy.Builder.html#detectExplicitGc()). |\n| [FileUriExposedViolation](/reference/kotlin/android/os/strictmode/FileUriExposedViolation) | \u003cbr /\u003e |\n| [ImplicitDirectBootViolation](/reference/kotlin/android/os/strictmode/ImplicitDirectBootViolation) | Subclass of `Violation` that is used when a process implicitly relies on automatic Direct Boot filtering. |\n| [IncorrectContextUseViolation](/reference/kotlin/android/os/strictmode/IncorrectContextUseViolation) | Incorrect usage of [Context](../../content/Context.html#), such as obtaining a UI service from non-UI [Context](../../content/Context.html#) instance. |\n| [InstanceCountViolation](/reference/kotlin/android/os/strictmode/InstanceCountViolation) | \u003cbr /\u003e |\n| [IntentReceiverLeakedViolation](/reference/kotlin/android/os/strictmode/IntentReceiverLeakedViolation) | \u003cbr /\u003e |\n| [LeakedClosableViolation](/reference/kotlin/android/os/strictmode/LeakedClosableViolation) | \u003cbr /\u003e |\n| [NetworkViolation](/reference/kotlin/android/os/strictmode/NetworkViolation) | \u003cbr /\u003e |\n| [NonSdkApiUsedViolation](/reference/kotlin/android/os/strictmode/NonSdkApiUsedViolation) | Subclass of `Violation` that is used when a process accesses a non SDK API. |\n| [ResourceMismatchViolation](/reference/kotlin/android/os/strictmode/ResourceMismatchViolation) | \u003cbr /\u003e |\n| [ServiceConnectionLeakedViolation](/reference/kotlin/android/os/strictmode/ServiceConnectionLeakedViolation) | \u003cbr /\u003e |\n| [SqliteObjectLeakedViolation](/reference/kotlin/android/os/strictmode/SqliteObjectLeakedViolation) | \u003cbr /\u003e |\n| [UnbufferedIoViolation](/reference/kotlin/android/os/strictmode/UnbufferedIoViolation) | See #[Builder.detectUnbufferedIo()](../StrictMode.ThreadPolicy.Builder.html#detectUnbufferedIo()) |\n| [UnsafeIntentLaunchViolation](/reference/kotlin/android/os/strictmode/UnsafeIntentLaunchViolation) | Violation raised when your app launches an [Intent](../../content/Intent.html#) which originated from outside your app. |\n| [UntaggedSocketViolation](/reference/kotlin/android/os/strictmode/UntaggedSocketViolation) | \u003cbr /\u003e |\n| [Violation](/reference/kotlin/android/os/strictmode/Violation) | Root class for all StrictMode violations. |\n| [WebViewMethodCalledOnWrongThreadViolation](/reference/kotlin/android/os/strictmode/WebViewMethodCalledOnWrongThreadViolation) | \u003cbr /\u003e |"]]