Skip to content

Commit

Permalink
Merge branch 'broadcast-event-on-routeAudio-change' into 'main'
Browse files Browse the repository at this point in the history
broadcast event on routeAudio change

See merge request vialer/mobile/voip/android-phone-integration-lib!69
  • Loading branch information
ChrisKontosEU committed Apr 24, 2024
2 parents 852e2fc + 806192a commit eefb59c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import android.os.Build
import android.os.Handler
import android.os.Looper
import android.telecom.CallAudioState.*
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import org.openvoipalliance.androidphoneintegration.call.Calls
import org.openvoipalliance.androidphoneintegration.events.Event
Expand All @@ -18,7 +17,6 @@ import org.openvoipalliance.androidphoneintegration.log
import org.openvoipalliance.androidphoneintegration.telecom.AndroidCallFramework
import org.openvoipalliance.androidphoneintegration.telecom.Connection
import org.openvoipalliance.voiplib.VoIPLib
import org.openvoipalliance.voiplib.model.Codec

class AudioManager internal constructor(
private val context: Context,
Expand Down Expand Up @@ -52,6 +50,8 @@ class AudioManager internal constructor(

connection.setAudioRoute(pilRouteToNativeRoute(route))

events.broadcast(Event.CallSessionEvent.AudioStateUpdated::class)

// The echo limiter is a brute-force method to prevent echo, it should only be used
// when it is really necessary, such as when the user is using the phone's speaker.
if (route == AudioRoute.SPEAKER) {
Expand Down

0 comments on commit eefb59c

Please sign in to comment.