[fenix] For https://github.com/mozilla-mobile/fenix/issues/13959: add comment to explain why we only resetAfter in certain build modes.

pull/600/head
Michael Comella 4 years ago committed by Michael Comella
parent c1aa8d396a
commit 394465e33e

@ -15,6 +15,8 @@ import org.mozilla.fenix.Config
* @return the value returned by [functionBlock].
*/
inline fun <R> StrictMode.ThreadPolicy.resetPoliciesAfter(functionBlock: () -> R): R {
// Calling resetAfter takes 1-2ms (unknown device) so we only execute it if StrictMode can
// actually be enabled. https://github.com/mozilla-mobile/fenix/issues/11617
return if (Config.channel.isDebug) {
resetAfter { functionBlock() }
} else {

Loading…
Cancel
Save