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

Commit 41a82cf1 authored by Francois Gaffie's avatar Francois Gaffie Committed by Eric Laurent
Browse files

audiopolicy: allow to identify internal strategies by attributes



A unique tag is given to internal strategies to prevent confusion with
default strategy, overwritting volume or mute attribute of these internal
strategies.

Test: make
Bug: 179759299
Bug: 249966139
Signed-off-by: default avatarFrancois Gaffie <francois.gaffie@renault.com>
Change-Id: I3c08ca3f5445a2da02b25be0e008aa95e46d4289
parent bf9a1ecd
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

#pragma once

#include <EngineConfig.h>

#include <system/audio.h>

namespace android {
@@ -142,7 +144,7 @@ const engineConfig::ProductStrategies gOrderedSystemStrategies = {
     {
         {AUDIO_STREAM_REROUTING, "AUDIO_STREAM_REROUTING",
          {{AUDIO_CONTENT_TYPE_UNKNOWN, AUDIO_USAGE_VIRTUAL_SOURCE, AUDIO_SOURCE_DEFAULT,
            AUDIO_FLAG_NONE, ""}}
            AUDIO_FLAG_NONE, AUDIO_TAG_APM_RESERVED_INTERNAL}}
         }
     },
    },
@@ -150,7 +152,7 @@ const engineConfig::ProductStrategies gOrderedSystemStrategies = {
     {
         {AUDIO_STREAM_PATCH, "AUDIO_STREAM_PATCH",
          {{AUDIO_CONTENT_TYPE_UNKNOWN, AUDIO_USAGE_UNKNOWN, AUDIO_SOURCE_DEFAULT,
            AUDIO_FLAG_NONE, ""}}
            AUDIO_FLAG_NONE, AUDIO_TAG_APM_RESERVED_INTERNAL}}
         }
     },
    }
+6 −0
Original line number Diff line number Diff line
@@ -25,6 +25,12 @@
struct _xmlNode;
struct _xmlDoc;

/**
 * AudioAttributes custom tag to identify internal strategies, whose volumes are exclusively
 * controlled by AudioPolicyManager
 */
#define AUDIO_TAG_APM_RESERVED_INTERNAL "reserved_internal_strategy"

namespace android {
namespace engineConfig {