
org.robolectric.shadows.ShadowAudioEffect Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of framework Show documentation
Show all versions of framework Show documentation
An alternative Android testing framework.
The newest version!
package org.robolectric.shadows;
import android.media.audiofx.AudioEffect;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.annotation.Resetter;
import java.util.LinkedList;
import java.util.List;
@Implements(AudioEffect.class)
public class ShadowAudioEffect {
private static List DESCRIPTORS = new LinkedList<>();
public static void addEffect(AudioEffect.Descriptor descriptor) {
DESCRIPTORS.add(descriptor);
}
@Implementation
public static AudioEffect.Descriptor[] queryEffects() {
return DESCRIPTORS.toArray(new AudioEffect.Descriptor[DESCRIPTORS.size()]);
}
@Resetter
public static void reset() {
DESCRIPTORS.clear();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy