Skip to content

Commit

Permalink
Fix syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
hans00 committed Dec 24, 2023
1 parent 260342c commit 14c08ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions patches/react-native-sound-player+0.13.2.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
diff --git a/node_modules/react-native-sound-player/android/src/main/java/com/johnsonsu/rnsoundplayer/RNSoundPlayerModule.java b/node_modules/react-native-sound-player/android/src/main/java/com/johnsonsu/rnsoundplayer/RNSoundPlayerModule.java
index 2a1561c..dd3834e 100644
index 2a1561c..0f3ef18 100644
--- a/node_modules/react-native-sound-player/android/src/main/java/com/johnsonsu/rnsoundplayer/RNSoundPlayerModule.java
+++ b/node_modules/react-native-sound-player/android/src/main/java/com/johnsonsu/rnsoundplayer/RNSoundPlayerModule.java
@@ -164,6 +164,8 @@ public class RNSoundPlayerModule extends ReactContextBaseJavaModule implements L
this.mediaPlayer = MediaPlayer.create(getCurrentActivity(), this.getUriFromFile(name, type));
}

+ if (this.mediaPlayer == null) return
+ if (this.mediaPlayer == null) return;
+
this.mediaPlayer.setOnCompletionListener(
new OnCompletionListener() {
Expand All @@ -15,7 +15,7 @@ index 2a1561c..dd3834e 100644
if (this.mediaPlayer == null) {
Uri uri = Uri.parse(url);
this.mediaPlayer = MediaPlayer.create(getCurrentActivity(), uri);
+ if (this.mediaPlayer == null) return
+ if (this.mediaPlayer == null) return;
this.mediaPlayer.setOnCompletionListener(
new OnCompletionListener() {
@Override

0 comments on commit 14c08ec

Please sign in to comment.