Upgrade call control lib, add flag activity new task to intent

This commit is contained in:
moezbhatti
2019-06-29 02:17:14 -04:00
parent 592bd3d447
commit 24423e3c24
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ dependencies {
testImplementation "junit:junit:$junit_version"
testImplementation "org.mockito:mockito-core:$mockito_version"
implementation 'com.callcontrol:datashare:1.0.0'
implementation 'com.callcontrol:datashare:1.1.0'
implementation "com.f2prateek.rx.preferences2:rx-preferences:$rx_preferences_version"
implementation "com.jakewharton.timber:timber:$timber_version"
implementation "com.squareup.moshi:moshi:$moshi_version"
@@ -19,6 +19,7 @@
package com.moez.QKSMS.blocking
import android.content.Context
import android.content.Intent
import android.database.Cursor
import android.net.Uri
import androidx.core.database.getStringOrNull
@@ -63,11 +64,11 @@ class CallControlBlockingClient @Inject constructor(
override fun unblock(addresses: List<String>): Completable = Completable.fromCallable {
// Only show a particular address if we're only unblocking that one
val address = addresses.takeIf { it.size == 1 }?.first()
CallControl.openBlockedList(context, address)
CallControl.openBlockedList(context, address, Intent.FLAG_ACTIVITY_NEW_TASK)
}
override fun openSettings() {
CallControl.openBlockedList(context)
CallControl.openBlockedList(context, Intent.FLAG_ACTIVITY_NEW_TASK)
}
}