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

Commit 8a7c2de4 authored by Chih-hung Hsieh's avatar Chih-hung Hsieh Committed by android-build-merger
Browse files

Merge "Suppress implicit-fallthrough warnings in libaudioclient."

am: 058002e0

Change-Id: I14c2aad6d2fdcaa3a1703cb3a45f50ab1c425c14
parents 8662f3b9 058002e0
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -53,7 +53,10 @@ cc_library_shared {
    export_shared_lib_headers: ["libbinder"],

    local_include_dirs: ["include/media", "aidl"],
    header_libs: ["libaudioclient_headers"],
    header_libs: [
        "libaudioclient_headers",
        "libbase_headers",
    ],
    export_header_lib_headers: ["libaudioclient_headers"],

    // for memory heap analysis
+2 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#define LOG_TAG "AudioRecord"

#include <inttypes.h>
#include <android-base/macros.h>
#include <sys/resource.h>

#include <binder/IPCThreadState.h>
@@ -1446,7 +1447,7 @@ bool AudioRecord::AudioRecordThread::threadLoop()
    case NS_WHENEVER:
        // Event driven: call wake() when callback notifications conditions change.
        ns = INT64_MAX;
        // fall through
        FALLTHROUGH_INTENDED;
    default:
        LOG_ALWAYS_FATAL_IF(ns < 0, "processAudioBuffer() returned %" PRId64, ns);
        pauseInternal(ns);
+3 −2
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
#include <math.h>
#include <sys/resource.h>

#include <android-base/macros.h>
#include <audio_utils/clock.h>
#include <audio_utils/primitives.h>
#include <binder/IPCThreadState.h>
@@ -2964,7 +2965,7 @@ bool AudioTrack::hasStarted()
        if (mProxy->getStreamEndDone()) {
            return true;
        }
        // fall through
        FALLTHROUGH_INTENDED;
    case STATE_ACTIVE:
    case STATE_STOPPING:
        break;
@@ -3083,7 +3084,7 @@ bool AudioTrack::AudioTrackThread::threadLoop()
    case NS_WHENEVER:
        // Event driven: call wake() when callback notifications conditions change.
        ns = INT64_MAX;
        // fall through
        FALLTHROUGH_INTENDED;
    default:
        LOG_ALWAYS_FATAL_IF(ns < 0, "processAudioBuffer() returned %" PRId64, ns);
        pauseInternal(ns);
+3 −2
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#define LOG_TAG "AudioTrackShared"
//#define LOG_NDEBUG 0

#include <android-base/macros.h>
#include <private/media/AudioTrackShared.h>
#include <utils/Log.h>

@@ -247,7 +248,7 @@ status_t ClientProxy::obtainBuffer(Buffer* buffer, const struct timespec *reques
                ts = requested;
                break;
            }
            // fall through
            FALLTHROUGH_INTENDED;
        case TIMEOUT_CONTINUE:
            // FIXME we do not retry if requested < 10ms? needs documentation on this state machine
            if (!measure || requested->tv_sec < total.tv_sec ||
@@ -505,7 +506,7 @@ status_t AudioTrackClientProxy::waitStreamEndDone(const struct timespec *request
                ts = requested;
                break;
            }
            // fall through
            FALLTHROUGH_INTENDED;
        case TIMEOUT_CONTINUE:
            // FIXME we do not retry if requested < 10ms? needs documentation on this state machine
            if (requested->tv_sec < total.tv_sec ||
+2 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
#ifndef AUDIO_POLICY_HELPER_H_
#define AUDIO_POLICY_HELPER_H_

#include <android-base/macros.h>
#include <system/audio.h>

static inline
@@ -81,7 +82,7 @@ void stream_type_to_audio_attributes(audio_stream_type_t streamType,
        break;
    case AUDIO_STREAM_ENFORCED_AUDIBLE:
        attr->flags  |= AUDIO_FLAG_AUDIBILITY_ENFORCED;
        // intended fall through, attributes in common with STREAM_SYSTEM
        FALLTHROUGH_INTENDED; // attributes in common with STREAM_SYSTEM
    case AUDIO_STREAM_SYSTEM:
        attr->content_type = AUDIO_CONTENT_TYPE_SONIFICATION;
        attr->usage = AUDIO_USAGE_ASSISTANCE_SONIFICATION;