Added in API level 31

IncorrectContextUseViolation


class IncorrectContextUseViolation : Violation
kotlin.Any
   ↳ kotlin.Throwable
   ↳ android.os.strictmode.Violation
   ↳ android.os.strictmode.IncorrectContextUseViolation

Incorrect usage of Context, such as obtaining a UI service from non-UI Context instance.

Summary

Public constructors

Inherited functions

Public constructors

IncorrectContextUseViolation

Added in API level 31
IncorrectContextUseViolation(
    message: String,
    originStack: Throwable)
Parameters
message String: This value cannot be null.
originStack Throwable: This value cannot be null.