Conversation
…edia notification
app/src/main/java/org/thoughtcrime/securesms/audio/AudioPlaybackManager.kt
Outdated
Show resolved
Hide resolved
| .distinctUntilChanged() | ||
| } | ||
|
|
||
| private fun ensureController(onReady: (MediaController) -> Unit) { |
There was a problem hiding this comment.
This method doesn't look async safe: is it possible to hit it twice quickly and you'll end up with two controller created?
There was a problem hiding this comment.
Yep you're right I need to update this...
There was a problem hiding this comment.
Can we rewrite this method in coroutine? I think ListenableFuture and the main executor look like the thing we desperately wanted to get rid of before...
There was a problem hiding this comment.
Media3 does return a ListenableFuture but I could build a wrapper, though I can't avoid the MediaController.Builder(context, token).buildAsync() return type
There was a problem hiding this comment.
I seem to remember ListenableFuture has a already had a coroutine extension but I could be wrong
app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt
Show resolved
Hide resolved
app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationAdapter.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/thoughtcrime/securesms/database/MmsSmsDatabase.java
Outdated
Show resolved
Hide resolved
app/src/main/java/org/thoughtcrime/securesms/util/BundleUtil.kt
Outdated
Show resolved
Hide resolved
…ckManager.kt Co-authored-by: SessionHero01 <180888785+SessionHero01@users.noreply.github.com>
…n-foundation/session-android into experiment/audio-playback
Refactored the audio playback and included missing functionalities: