Skip to content

Commit

Permalink
fix VolumeAdaptionSettingTest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matejdro committed Dec 16, 2023
1 parent fd3cd3b commit 11140f3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ android {
}
}
}

testOptions {
unitTests.returnDefaultValues = true
}
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,13 @@ public float getAdaptionFactor() {
public static boolean BOOST_SUPPORTED = false;

static {
for (AudioEffect.Descriptor effect : AudioEffect.queryEffects()) {
if (effect.type.equals(AudioEffect.EFFECT_TYPE_LOUDNESS_ENHANCER)) {
BOOST_SUPPORTED = true;
break;
final AudioEffect.Descriptor[] audioEffects = AudioEffect.queryEffects();
if (audioEffects != null) {
for (AudioEffect.Descriptor effect : audioEffects) {
if (effect.type.equals(AudioEffect.EFFECT_TYPE_LOUDNESS_ENHANCER)) {
BOOST_SUPPORTED = true;
break;
}
}
}
}
Expand Down

0 comments on commit 11140f3

Please sign in to comment.