X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Fviewmodelfactories%2FWebViewSourceFactory.kt;h=8da413918bc9307d74c058ceed4386b789714329;hp=eeef24f4b8f660640eb7d75a9be0879a12504d1d;hb=aa121d6d6df14a0425ac3b5603765dbae7e8d156;hpb=606b5659cfd41c546fcbf248dcde72fd3c60d1c3 diff --git a/app/src/main/java/com/stoutner/privacybrowser/viewmodelfactories/WebViewSourceFactory.kt b/app/src/main/java/com/stoutner/privacybrowser/viewmodelfactories/WebViewSourceFactory.kt index eeef24f4..8da41391 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/viewmodelfactories/WebViewSourceFactory.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/viewmodelfactories/WebViewSourceFactory.kt @@ -1,5 +1,5 @@ /* - * Copyright © 2020 Soren Stoutner . + * Copyright © 2020-2021 Soren Stoutner . * * This file is part of Privacy Browser . * @@ -19,18 +19,20 @@ package com.stoutner.privacybrowser.viewmodelfactories +import android.content.ContentResolver + import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider import java.net.Proxy import java.util.concurrent.ExecutorService -class WebViewSourceFactory (private val urlString: String, private val userAgent: String, private val doNotTrack: Boolean, private val localeString: String, private val proxy: Proxy, +class WebViewSourceFactory (private val urlString: String, private val userAgent: String, private val localeString: String, private val proxy: Proxy, private val contentResolver: ContentResolver, private val executorService: ExecutorService): ViewModelProvider.Factory { // Override the create function in order to add the provided arguments. override fun create(modelClass: Class): T { // Return a new instance of the model class with the provided arguments. - return modelClass.getConstructor(String::class.java, String::class.java, Boolean::class.java, String::class.java, Proxy::class.java, ExecutorService::class.java) - .newInstance(urlString, userAgent, doNotTrack, localeString, proxy, executorService) + return modelClass.getConstructor(String::class.java, String::class.java, String::class.java, Proxy::class.java, ContentResolver::class.java, ExecutorService::class.java) + .newInstance(urlString, userAgent, localeString, proxy, contentResolver, executorService) } } \ No newline at end of file