Reimplements soft logout simulation
This commit is contained in:
parent
dab866d170
commit
448e8e001f
|
@ -18,6 +18,7 @@ package org.matrix.android.sdk.internal.session.sync
|
|||
|
||||
import android.os.SystemClock
|
||||
import okhttp3.ResponseBody
|
||||
import org.matrix.android.sdk.api.failure.GlobalError
|
||||
import org.matrix.android.sdk.api.logger.LoggerTag
|
||||
import org.matrix.android.sdk.api.session.Session
|
||||
import org.matrix.android.sdk.api.session.initsync.InitSyncStep
|
||||
|
@ -151,6 +152,7 @@ internal class DefaultSyncTask @Inject constructor(
|
|||
defaultSyncStatusService.setStatus(SyncStatusService.Status.IncrementalSyncIdle)
|
||||
val syncResponse = try {
|
||||
executeRequest(globalErrorReceiver) {
|
||||
globalErrorReceiver.handleGlobalError(GlobalError.InvalidToken(softLogout = true))
|
||||
syncAPI.sync(
|
||||
params = requestParams,
|
||||
readTimeOut = readTimeOut
|
||||
|
|
|
@ -60,7 +60,7 @@ data class MainActivityArgs(
|
|||
val clearCredentials: Boolean = false,
|
||||
val isUserLoggedOut: Boolean = false,
|
||||
val isAccountDeactivated: Boolean = false,
|
||||
val isSoftLogout: Boolean = true
|
||||
val isSoftLogout: Boolean = false
|
||||
) : Parcelable
|
||||
|
||||
/**
|
||||
|
@ -135,7 +135,7 @@ class MainActivity : VectorBaseActivity<ActivityMainBinding>(), UnlockedActivity
|
|||
clearCredentials = argsFromIntent?.clearCredentials ?: false,
|
||||
isUserLoggedOut = argsFromIntent?.isUserLoggedOut ?: false,
|
||||
isAccountDeactivated = argsFromIntent?.isAccountDeactivated ?: false,
|
||||
isSoftLogout = argsFromIntent?.isSoftLogout ?: true
|
||||
isSoftLogout = argsFromIntent?.isSoftLogout ?: false
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue