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

Commit c51730bb authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge "UsecaseValidator: ignore special use cases when usage is unknown" into udc-dev

parents a8cb431d 975ecc0e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1306,7 +1306,7 @@ bool ToneGenerator::initAudioTrack() {
        streamType = AUDIO_STREAM_DTMF;
    }
    attr = AudioSystem::streamTypeToAttributes(streamType);
    attr.flags = AUDIO_FLAG_LOW_LATENCY;
    attr.flags = static_cast<audio_flags_mask_t>(attr.flags | AUDIO_FLAG_LOW_LATENCY);

    const size_t frameCount = mProcessSize;
    status_t status = mpAudioTrack->set(
+3 −0
Original line number Diff line number Diff line
@@ -142,6 +142,9 @@ class UsecaseValidatorImpl : public UsecaseValidator {

    bool areFlagsValid(audio_flags_mask_t flags) {
        ALOGV("areFlagsValid flags: %#x", flags);
        if ((flags & (AUDIO_FLAG_SCO|AUDIO_FLAG_AUDIBILITY_ENFORCED|AUDIO_FLAG_BEACON)) != 0) {
            return false;
        }
        if ((flags & AUDIO_FLAG_LOW_LATENCY) != 0) {
            return true;
        }