mirror of
https://github.com/etesync/android
synced 2025-03-25 03:45:46 +00:00
HttpClient: use the http client builder when using etesync
If we don't use the http client builder we don't get cert4droid hooked which means we won't correctly support self-signed certificates.
This commit is contained in:
parent
048acdf26c
commit
bf050aa53b
app/src/main/java/com/etesync/syncadapter
@ -68,7 +68,6 @@ class HttpClient private constructor(
|
||||
) {
|
||||
private var certManager: CustomCertManager? = null
|
||||
private var certificateAlias: String? = null
|
||||
private var cache: Cache? = null
|
||||
|
||||
private val orig = sharedClient.newBuilder()
|
||||
|
||||
|
@ -69,7 +69,7 @@ open class ChangeEncryptionPasswordActivity : BaseActivity() {
|
||||
}
|
||||
|
||||
doAsync {
|
||||
val httpClient = HttpClient.sharedClient
|
||||
val httpClient = HttpClient.Builder(this@ChangeEncryptionPasswordActivity).setForeground(true).build().okHttpClient
|
||||
|
||||
try {
|
||||
Logger.log.info("Loging in with old password")
|
||||
|
@ -90,7 +90,8 @@ class AccountViewModel : ViewModel() {
|
||||
doAsync {
|
||||
val settings = AccountSettings(context, account)
|
||||
val etebaseLocalCache = EtebaseLocalCache.getInstance(context, account.name)
|
||||
val etebase = EtebaseLocalCache.getEtebase(context, HttpClient.sharedClient, settings)
|
||||
val httpClient = HttpClient.Builder(context).setForeground(true).build().okHttpClient
|
||||
val etebase = EtebaseLocalCache.getEtebase(context, httpClient, settings)
|
||||
val colMgr = etebase.collectionManager
|
||||
uiThread {
|
||||
holder.value = AccountHolder(
|
||||
|
Loading…
Reference in New Issue
Block a user