Refactor qksms blocking client to android blocking client

This commit is contained in:
moezbhatti
2019-07-30 12:22:22 -04:00
parent 9ebf4bfd4b
commit 354168ab21
11 changed files with 25 additions and 24 deletions
@@ -29,7 +29,7 @@ import io.reactivex.Completable
import io.reactivex.Single
import javax.inject.Inject
class QkBlockingClient @Inject constructor(
class AndroidBlockingClient @Inject constructor(
private val context: Context,
private val blockingRepo: BlockingRepository
) : BlockingClient {
@@ -13,7 +13,7 @@ import javax.inject.Singleton
class BlockingManager @Inject constructor(
private val prefs: Preferences,
private val callControlBlockingClient: CallControlBlockingClient,
private val qkBlockingClient: QkBlockingClient,
private val androidBlockingClient: AndroidBlockingClient,
private val shouldIAnswerBlockingClient: ShouldIAnswerBlockingClient
) : BlockingClient {
@@ -21,7 +21,7 @@ class BlockingManager @Inject constructor(
get() = when (prefs.blockingManager.get()) {
Preferences.BLOCKING_MANAGER_SIA -> shouldIAnswerBlockingClient
Preferences.BLOCKING_MANAGER_CC -> callControlBlockingClient
else -> qkBlockingClient
else -> androidBlockingClient
}
init {