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

Commit ed4225fb authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "aaudio tests: fix test_attributes"

parents 3ed1e46c dca60f36
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[] = {