Policy

class Policy(source)

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

This policy can either be enabled globally using defaultPolicy or for a specific FragmentManager using FragmentManager.setStrictModePolicy. The current policy can be retrieved using defaultPolicy 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.

Types

Link copied to clipboard
class Builder

Creates Policy instances. Methods whose names start with detect specify what problems we should look for. Methods whose names start with penalty specify what we should do when we detect a problem.