Skip to content

Commit 1819927

Browse files
committed
Fix crash if sound effect lookup has permission issues
1 parent 56e6302 commit 1819927

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

mabl/src/aipincore/java/com/penumbraos/mabl/aipincore/ConversationRenderer.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,13 @@ class ConversationRenderer(
2424
// val penumbraClient = PenumbraClient(context)
2525

2626
init {
27-
if (listeningSoundEffectFile.exists()) {
28-
listeningMediaPlayer.setDataSource(listeningSoundEffectFile.absolutePath)
29-
listeningMediaPlayer.prepareAsync()
27+
try {
28+
if (listeningSoundEffectFile.exists()) {
29+
listeningMediaPlayer.setDataSource(listeningSoundEffectFile.absolutePath)
30+
listeningMediaPlayer.prepareAsync()
31+
}
32+
} catch (e: Exception) {
33+
Log.e(TAG, "Failed to load listening sound effect", e)
3034
}
3135
}
3236

0 commit comments

Comments
 (0)