FragmentStrictMode.Policy

public static final class FragmentStrictMode.Policy
extends Object

java.lang.Object
   ↳ androidx.fragment.app.strictmode.FragmentStrictMode.Policy


FragmentStrictMode policy applied to a certain FragmentManager (or globally).

This policy can either be enabled globally using FragmentStrictMode.setDefaultPolicy(FragmentStrictMode.Policy) or for a specific FragmentManager using FragmentManager.setStrictModePolicy(Policy). The current policy can be retrieved using FragmentStrictMode.getDefaultPolicy() and FragmentManager.getStrictModePolicy() respectively.

Note that multiple penalties may be provided and they're run in order from least to most severe (logging before process death, for example). There's currently no mechanism to choose different penalties for different detected actions.

Summary

Nested classes

class FragmentStrictMode.Policy.Builder

Creates FragmentStrictMode.Policy instances. 

Fields

public static final FragmentStrictMode.Policy LAX

The default, lax policy which doesn't catch anything.

Inherited methods

Fields

LAX

public static final FragmentStrictMode.Policy LAX

The default, lax policy which doesn't catch anything.