Skip to content

Commit

Permalink
refactor(android): Remove deprecated hasOption usages
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile committed Jun 28, 2024
1 parent b954af3 commit c4aeca6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c4aeca6

Please sign in to comment.