mirror of
https://github.com/etesync/android
synced 2025-06-16 13:09:05 +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
@ -68,7 +68,6 @@ class HttpClient private constructor(
|
|||||||
) {
|
) {
|
||||||
private var certManager: CustomCertManager? = null
|
private var certManager: CustomCertManager? = null
|
||||||
private var certificateAlias: String? = null
|
private var certificateAlias: String? = null
|
||||||
private var cache: Cache? = null
|
|
||||||
|
|
||||||
private val orig = sharedClient.newBuilder()
|
private val orig = sharedClient.newBuilder()
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ open class ChangeEncryptionPasswordActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
doAsync {
|
doAsync {
|
||||||
val httpClient = HttpClient.sharedClient
|
val httpClient = HttpClient.Builder(this@ChangeEncryptionPasswordActivity).setForeground(true).build().okHttpClient
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Logger.log.info("Loging in with old password")
|
Logger.log.info("Loging in with old password")
|
||||||
|
@ -90,7 +90,8 @@ class AccountViewModel : ViewModel() {
|
|||||||
doAsync {
|
doAsync {
|
||||||
val settings = AccountSettings(context, account)
|
val settings = AccountSettings(context, account)
|
||||||
val etebaseLocalCache = EtebaseLocalCache.getInstance(context, account.name)
|
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
|
val colMgr = etebase.collectionManager
|
||||||
uiThread {
|
uiThread {
|
||||||
holder.value = AccountHolder(
|
holder.value = AccountHolder(
|
||||||
|
Loading…
Reference in New Issue
Block a user