Language

IncorrectContextUseViolation(String, Throwable) Constructor

Definition

Creates a violation with a message and the throwable for the original context use.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/Throwable;)V", "", ApiSince=31)]
public IncorrectContextUseViolation(string message, Java.Lang.Throwable originStack);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/Throwable;)V", "", ApiSince=31)>]
new Android.OS.Strictmode.IncorrectContextUseViolation : string * Java.Lang.Throwable -> Android.OS.Strictmode.IncorrectContextUseViolation

Parameters

message
String

A description of the incorrect context use.

originStack
Throwable

The throwable retained as the cause to describe where the incorrect use occurred.

Attributes

Remarks

The constructor sets the violation's message and initializes its cause from originStack. It does not replace the violation's own stack trace with the cause's stack trace.

See the Android implementation of IncorrectContextUseViolation.

Applies to