Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Component used: Fragment Version used: 1.4.0-alpha01
Developers can decide what type of penalties they would like Fragment StrictMode to output, from
penaltyLog()
topenaltyDeath()
. However, if developers have specifically enabled debug logging viaFragmentManager.enableDebugLogging(true)
or via theadb shell setprop log.tag.FragmentManager VERBOSE
(orDEBUG
), we should always output every violation to logcat with theFragmentManager.TAG
asLog.d()
, no matter what policy is used.This is ensure that debug logging will inform those debugging Fragments of potential issues that may affect the behavior of Fragments.
The internal helper of
FragmentManager.isLoggingEnabled(Log.DEBUG)
can be used to determine whether we should output these debug log violations. This output should happen before any FragmentStrictMode policy specific logging/listeners/death. IfpenaltyLog()
is used and you're debug logging, both log messages should appear (they should be independent from one another).