Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
    
  
  
  
  
    
  
  
    
    
    
    Violation
    abstract class Violation : Throwable
    
    
      
        
          | Known Direct Subclasses
              CleartextNetworkViolation, ContentUriWithoutPermissionViolation , CredentialProtectedWhileLockedViolation , CustomViolation , DiskReadViolation , DiskWriteViolation , ExplicitGcViolation , FileUriExposedViolation , ImplicitDirectBootViolation , IncorrectContextUseViolation , InstanceCountViolation , IntentReceiverLeakedViolation , and 10 others. | 
      
    
    Root class for all StrictMode violations.
    Summary
    
    Public methods
    
      fillInStackTrace
      
      open fun fillInStackTrace(): Throwable
      
        
          
            | Return | 
          
            | Throwable | a reference to this Throwableinstance. | 
        
      
     
    
      hashCode
      
      open fun hashCode(): Int
      
        
          
            | Return | 
          
            | Int | a hash code value for this object. | 
        
      
     
    
      initCause
      
      open fun initCause(cause: Throwable?): Throwable
      
        
          
            | Parameters | 
          
            | cause | Throwable?: the cause (which is saved for later retrieval by the getCause()method). (Anullvalue is permitted, and indicates that the cause is nonexistent or unknown.) | 
        
      
      
        
          
            | Return | 
          
            | Throwable | a reference to this Throwableinstance. | 
        
      
      
     
    
      setStackTrace
      
      open fun setStackTrace(stackTrace: Array<StackTraceElement!>): Unit
      
        
          
            | Parameters | 
          
            | stackTrace | Array<StackTraceElement!>: the stack trace elements to be associated with this Throwable. The specified array is copied by this call; changes in the specified array after the method invocation returns will have no affect on thisThrowable's stack trace. | 
        
      
      
        
          
            | Exceptions | 
          
            | java.lang.NullPointerException | if stackTraceisnullor if any of the elements ofstackTracearenull | 
        
      
     
  
  
  
    
  
 
  
    
    
      
       
    
    
  
  
  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."],[],[]]