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

Commit 3e28d78f authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes from topic "fix-b-36733185-vx-in-vts"

* changes:
  Add "VTS" mode to APM Serializer
  APM: Fix config de-serialization
parents 96de95d9 6ef1b958
Loading
Loading
Loading
Loading
+25 −6
Original line number Diff line number Diff line
@@ -33,6 +33,15 @@

namespace android {

// This class gathers together various bits of AudioPolicyManager
// configuration, which are usually filled out as a result of parsing
// the audio_policy_configuration.xml file.
//
// Note that AudioPolicyConfig doesn't own some of the data,
// it simply proxies access to the fields of AudioPolicyManager
// class. Be careful about the fields that are references,
// e.g. 'mOutputDevices'. This also means that it's impossible
// to implement "deep copying" of this class without re-designing it.
class AudioPolicyConfig
{
public:
@@ -40,14 +49,24 @@ public:
                      DeviceVector &outputDevices,
                      DeviceVector &inputDevices,
                      sp<DeviceDescriptor> &defaultOutputDevice)
        : mEngineLibraryNameSuffix(kDefaultEngineLibraryNameSuffix),
          mHwModules(hwModules),
        : mHwModules(hwModules),
          mOutputDevices(outputDevices),
          mInputDevices(inputDevices),
          mDefaultOutputDevice(defaultOutputDevice),
          mIsSpeakerDrcEnabled(false),
          mIsCallScreenModeSupported(false)
    {}
          mDefaultOutputDevice(defaultOutputDevice) {
        clear();
    }

    void clear() {
        mSource = {};
        mEngineLibraryNameSuffix = kDefaultEngineLibraryNameSuffix;
        mHwModules.clear();
        mOutputDevices.clear();
        mInputDevices.clear();
        mDefaultOutputDevice.clear();
        mIsSpeakerDrcEnabled = false;
        mIsCallScreenModeSupported = false;
        mSurroundFormats.clear();
    }

    const std::string& getSource() const {
        return mSource;
+4 −0
Original line number Diff line number Diff line
@@ -21,5 +21,9 @@
namespace android {

status_t deserializeAudioPolicyFile(const char *fileName, AudioPolicyConfig *config);
// In VTS mode all vendor extensions are ignored. This is done because
// VTS tests are built using AOSP code and thus can not use vendor overlays
// of system libraries.
status_t deserializeAudioPolicyFileForVts(const char *fileName, AudioPolicyConfig *config);

} // namespace android
+105 −57

File changed.

Preview size limit exceeded, changes collapsed.

+0 −1
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@

#include "EngineBase.h"
#include "EngineDefaultConfig.h"
#include "../include/EngineBase.h"
#include <TypeConverter.h>

namespace android {
+7 −0
Original line number Diff line number Diff line
{
  "presubmit": [
    {
       "name": "audiopolicy_engineconfig_tests"
    }
  ]
}
Loading