allowViolation

fun allowViolation(fragmentClass: Class<out Fragment>, violationClass: Class<out Violation>): FragmentStrictMode.Policy.Builder(source)

Allow the specified Fragment class to bypass penalties for the specified Violation, if detected.

By default, all Fragment classes will incur penalties for any detected Violation.


fun allowViolation(fragmentClass: String, violationClass: Class<out Violation>): FragmentStrictMode.Policy.Builder(source)

Allow the specified Fragment class to bypass penalties for the specified Violation, if detected.

Since this overload of allowViolation takes in the name of the Fragment class as a string, rather than accepting the Class itself, the user will need to manually insure the class is not obfuscated.

By default, all Fragment classes will incur penalties for any detected Violation.