From c4aeca6553b867552d673b2499194fb38e5f5a8b Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 28 Jun 2024 17:11:29 +0200 Subject: [PATCH] refactor(android): Remove deprecated hasOption usages --- .../java/com/getcapacitor/community/audio/NativeAudio.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android/src/main/java/com/getcapacitor/community/audio/NativeAudio.java b/android/src/main/java/com/getcapacitor/community/audio/NativeAudio.java index 1014498..e4eaf6c 100644 --- a/android/src/main/java/com/getcapacitor/community/audio/NativeAudio.java +++ b/android/src/main/java/com/getcapacitor/community/audio/NativeAudio.java @@ -108,10 +108,10 @@ protected void handleOnResume() { public void configure(PluginCall call) { initSoundPool(); - if (call.hasOption(OPT_FADE_MUSIC)) this.fadeMusic = call.getBoolean(OPT_FADE_MUSIC); + this.fadeMusic = call.getBoolean(OPT_FADE_MUSIC, true); - if (call.hasOption(OPT_FOCUS_AUDIO) && this.audioManager != null) { - if (call.getBoolean(OPT_FOCUS_AUDIO)) { + if (this.audioManager != null) { + if (call.getBoolean(OPT_FOCUS_AUDIO, true)) { this.audioManager.requestAudioFocus(this, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN); } else { this.audioManager.abandonAudioFocus(this);