For #13959: add comment to explain why we only resetAfter in certain build modes.

pull/184/head
Michael Comella 4 years ago committed by Michael Comella
parent 3bf71ef655
commit e1bd6191c7

@ -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