diff options
-rw-r--r-- | media/java/android/media/audiofx/AudioEffect.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/media/java/android/media/audiofx/AudioEffect.java b/media/java/android/media/audiofx/AudioEffect.java index 9fa3f50..a8b9686 100644 --- a/media/java/android/media/audiofx/AudioEffect.java +++ b/media/java/android/media/audiofx/AudioEffect.java @@ -483,6 +483,10 @@ public class AudioEffect { */ public static boolean isEffectTypeAvailable(UUID type) { AudioEffect.Descriptor[] desc = AudioEffect.queryEffects(); + if (desc == null) { + return false; + } + for (int i = 0; i < desc.length; i++) { if (desc[i].type.equals(type)) { return true; |