diff --git a/app/src/main/java/org/openobservatory/ooniprobe/common/PreferenceManagerExtension.kt b/app/src/main/java/org/openobservatory/ooniprobe/common/PreferenceManagerExtension.kt index 21e547707..03e545a56 100644 --- a/app/src/main/java/org/openobservatory/ooniprobe/common/PreferenceManagerExtension.kt +++ b/app/src/main/java/org/openobservatory/ooniprobe/common/PreferenceManagerExtension.kt @@ -31,7 +31,7 @@ fun PreferenceManager.resolveStatus( sp.getBoolean( getPreferenceKey(name = name, prefix = prefix, autoRun = true), when(prefix.isEmpty()) { - true -> true + true -> autorunDefault(name = name) false -> false } ) @@ -185,3 +185,11 @@ private fun PreferenceManager.setValue(name: String, value: Boolean): Boolean { commit() } } + +fun autorunDefault(name: String): Boolean { + return when (name) { + Ndt.NAME, + Dash.NAME -> false + else -> true + } +} \ No newline at end of file