CallIntentDataParser is now a class.
This commit is contained in:
parent
acbdac70be
commit
73d71b9ddb
3 changed files with 22 additions and 18 deletions
|
|
@ -18,8 +18,9 @@ package io.element.android.features.call
|
|||
|
||||
import android.net.Uri
|
||||
import java.net.URLDecoder
|
||||
import javax.inject.Inject
|
||||
|
||||
object CallIntentDataParser {
|
||||
class CallIntentDataParser @Inject constructor() {
|
||||
|
||||
private val validHttpSchemes = sequenceOf("http", "https")
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ import javax.inject.Inject
|
|||
class ElementCallActivity : ComponentActivity() {
|
||||
|
||||
@Inject lateinit var userAgentProvider: UserAgentProvider
|
||||
@Inject lateinit var callIntentDataParser: CallIntentDataParser
|
||||
|
||||
private lateinit var audioManager: AudioManager
|
||||
|
||||
|
|
@ -129,7 +130,7 @@ class ElementCallActivity : ComponentActivity() {
|
|||
finishAndRemoveTask()
|
||||
}
|
||||
|
||||
private fun parseUrl(url: String?): String? = CallIntentDataParser.parse(url)
|
||||
private fun parseUrl(url: String?): String? = callIntentDataParser.parse(url)
|
||||
|
||||
private fun registerPermissionResultLauncher(): ActivityResultLauncher<Array<String>> {
|
||||
return registerForActivityResult(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue