Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dca60f36 authored by Phil Burk's avatar Phil Burk
Browse files

aaudio tests: fix test_attributes

Remove illegal SYSTEM_USAGEs.
Fix bad test variable.

Bug: 200632807
Test: atest test_attributes
Change-Id: Ia42d8778adeb44898d7756277948edb9bd36583b
parent a9e60472
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -16,6 +16,10 @@

// Test AAudio attributes such as Usage, ContentType and InputPreset.

// TODO Many of these tests are duplicates of CTS tests in
// "test_aaudio_attributes.cpp". That other file is more current.
// So these tests could be deleted.

#include <stdio.h>
#include <unistd.h>

@@ -91,7 +95,7 @@ static void checkAttributes(aaudio_performance_mode_t perfMode,
    aaudio_allowed_capture_policy_t expectedCapturePolicy =
            (capturePolicy == DONT_SET || capturePolicy == AAUDIO_UNSPECIFIED)
            ? AAUDIO_ALLOW_CAPTURE_BY_ALL // default
            : preset;
            : capturePolicy;
    EXPECT_EQ(expectedCapturePolicy, AAudioStream_getAllowedCapturePolicy(aaudioStream));

    bool expectedPrivacyMode =
@@ -132,10 +136,7 @@ static const aaudio_usage_t sUsages[] = {
    AAUDIO_USAGE_ASSISTANCE_SONIFICATION,
    AAUDIO_USAGE_GAME,
    AAUDIO_USAGE_ASSISTANT,
    AAUDIO_SYSTEM_USAGE_EMERGENCY,
    AAUDIO_SYSTEM_USAGE_SAFETY,
    AAUDIO_SYSTEM_USAGE_VEHICLE_STATUS,
    AAUDIO_SYSTEM_USAGE_ANNOUNCEMENT
    // Note that the AAUDIO_SYSTEM_USAGE_* values requires special permission.
};

static const aaudio_content_type_t sContentypes[] = {