Don't show blocking dialog if not necessary

This commit is contained in:
moezbhatti
2019-08-23 01:30:50 +02:00
parent 1439e3f126
commit c5fa1ce0f5
11 changed files with 103 additions and 51 deletions
@@ -28,28 +28,21 @@ interface BlockingClient {
*/
fun isAvailable(): Boolean
/**
* Returns the level of access that the given blocking client provides to QKSMS
*/
fun getClientCapability(): BlockingClientCapability
/**
* Return a Single<Boolean> which emits whether or not the given [address] should be blocked
*/
fun isBlocked(address: String): Single<Boolean>
/**
* Returns true if the client is capable of blocking the address in the manager without any
* further user input
*/
fun canBlock(): Boolean = false
/**
* Blocks the numbers or opens the manager
*/
fun block(addresses: List<String>): Completable
/**
* Returns true if the client is capable of unblocking the address in the manager without any
* further user input
*/
fun canUnblock(): Boolean = false
/**
* Unblocks the numbers or opens the manager
*/
@@ -60,4 +53,4 @@ interface BlockingClient {
*/
fun openSettings()
}
}