diff options
author | Jason Parks <jparks@google.com> | 2014-11-06 22:23:01 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-11-06 22:23:04 +0000 |
commit | 94c3e3bfcfe8d91283560082c737cb62e8d06742 (patch) | |
tree | 10d5e60e9d2af73de7193004bac15971055b6089 | |
parent | 2a83226c7585895d08d3320a4bb881f3659ad0d9 (diff) | |
parent | de709869ae10263c4c325aaa72cdc6aada0ae8d5 (diff) | |
download | frameworks_base-94c3e3bfcfe8d91283560082c737cb62e8d06742.zip frameworks_base-94c3e3bfcfe8d91283560082c737cb62e8d06742.tar.gz frameworks_base-94c3e3bfcfe8d91283560082c737cb62e8d06742.tar.bz2 |
Merge "Fix NPE for CTS." into lmp-sprout-dev
-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; |