X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Fviewmodels%2FWebViewSource.kt;h=3251d92048038fe6cc9f90d75ad85454741dfd26;hp=1b9d9e1203dd15399c1efba4f05e5e6337115c13;hb=aa121d6d6df14a0425ac3b5603765dbae7e8d156;hpb=39fd3a6664fe15f9e050e6bb8c0ca0e125fd2f0f diff --git a/app/src/main/java/com/stoutner/privacybrowser/viewmodels/WebViewSource.kt b/app/src/main/java/com/stoutner/privacybrowser/viewmodels/WebViewSource.kt index 1b9d9e12..3251d920 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/viewmodels/WebViewSource.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/viewmodels/WebViewSource.kt @@ -43,7 +43,8 @@ class WebViewSource(private val urlString: String, private val userAgent: String val getSourceBackgroundTask = GetSourceBackgroundTask() // Get the source. - executorService.execute { mutableLiveDataSourceStringArray.postValue(getSourceBackgroundTask.acquire(urlString, userAgent, localeString, proxy, contentResolver, this)) } + executorService.execute { mutableLiveDataSourceStringArray.postValue(getSourceBackgroundTask.acquire(urlString, userAgent, localeString, proxy, contentResolver, this, + false)) } } // The source observer. @@ -65,7 +66,7 @@ class WebViewSource(private val urlString: String, private val userAgent: String } // The workhorse that gets the source. - fun updateSource(urlString: String) { + fun updateSource(urlString: String, ignoreSslErrors: Boolean) { // Reset the mutable live data error string. This prevents the snackbar from displaying later if the activity restarts. mutableLiveDataErrorString.postValue("") @@ -73,6 +74,7 @@ class WebViewSource(private val urlString: String, private val userAgent: String val getSourceBackgroundTask = GetSourceBackgroundTask() // Get the source. - executorService.execute { mutableLiveDataSourceStringArray.postValue(getSourceBackgroundTask.acquire(urlString, userAgent, localeString, proxy, contentResolver, this)) } + executorService.execute { mutableLiveDataSourceStringArray.postValue(getSourceBackgroundTask.acquire(urlString, userAgent, localeString, proxy, contentResolver, this, + ignoreSslErrors)) } } } \ No newline at end of file