Add a property to control audio effect
Change-Id: Ib97f9387f6e1912c1dacc349e99e02ef1c79038e
diff --git a/src/com/android/gallery3d/app/MovieActivity.java b/src/com/android/gallery3d/app/MovieActivity.java
index 9b274c2..f5e7a65 100644
--- a/src/com/android/gallery3d/app/MovieActivity.java
+++ b/src/com/android/gallery3d/app/MovieActivity.java
@@ -49,6 +49,7 @@
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
+import android.os.SystemProperties;
import android.provider.MediaStore;
import android.provider.OpenableColumns;
import android.view.Gravity;
@@ -241,13 +242,15 @@
// But for the performance (and battery), we remove the background here.
win.setBackgroundDrawable(null);
initMovieHooker(intent, savedInstanceState);
- // Determine available/supported effects
- final Descriptor[] effects = AudioEffect.queryEffects();
- for (final Descriptor effect : effects) {
- if (effect.type.equals(AudioEffect.EFFECT_TYPE_VIRTUALIZER)) {
- mVirtualizerSupported = true;
- } else if (effect.type.equals(AudioEffect.EFFECT_TYPE_BASS_BOOST)) {
- mBassBoostSupported = true;
+ if (!SystemProperties.getBoolean("persist.sys.galley.disable_audioeffects", false)) {
+ // Determine available/supported effects
+ final Descriptor[] effects = AudioEffect.queryEffects();
+ for (final Descriptor effect : effects) {
+ if (effect.type.equals(AudioEffect.EFFECT_TYPE_VIRTUALIZER)) {
+ mVirtualizerSupported = true;
+ } else if (effect.type.equals(AudioEffect.EFFECT_TYPE_BASS_BOOST)) {
+ mBassBoostSupported = true;
+ }
}
}