File tree 2 files changed +9
-1
lines changed
app/src/main/kotlin/at/bitfire/davdroid
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,10 @@ class HttpClient(
234
234
val certManager = CustomCertManager (
235
235
context = context,
236
236
trustSystemCerts = ! settingsManager.getBoolean(Settings .DISTRUST_SYSTEM_CERTIFICATES ),
237
- appInForeground = ForegroundTracker .inForeground
237
+ appInForeground = if (/* davx5-ose */ true )
238
+ ForegroundTracker .inForeground // interactive mode
239
+ else
240
+ null // non-interactive mode
238
241
)
239
242
240
243
val sslContext = SSLContext .getInstance(" TLS" )
Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ import kotlinx.coroutines.flow.asStateFlow
12
12
*/
13
13
object ForegroundTracker {
14
14
15
+ /* *
16
+ * Whether the app is in the foreground.
17
+ * Used by cert4android to known when it's possible to show the certificate trust decision dialog.
18
+ */
15
19
private val _inForeground = MutableStateFlow (false )
16
20
17
21
/* *
@@ -32,4 +36,5 @@ object ForegroundTracker {
32
36
fun onPaused () {
33
37
_inForeground .value = false
34
38
}
39
+
35
40
}
You can’t perform that action at this time.
0 commit comments