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

Commit 007709c5 authored by Kevin Rocard's avatar Kevin Rocard Committed by Mikhail Naganov
Browse files

Effects factory: Restrict visibility to public functions



The next patches will split EffectFactory.c in several files,
thus symbols with internal linkage (static) will be exposed to other
libraries.
To avoid that only export the symbols that are supposed to be public.

Test: Link and boot
Bug: 37492580
Change-Id: Ice2b11b0bc868591a1e17c658ecf26d82cffdaa4
Signed-off-by: default avatarKevin Rocard <krocard@google.com>
parent ab8e5c6b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ cc_library_shared {
        "liblog",
        "libdl",
    ],
    cflags: ["-fvisibility=hidden"],

    include_dirs: ["system/media/audio_effects/include"],

+1 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#include <cutils/properties.h>
#include <log/log.h>

#include <media/EffectsFactoryApi.h>
#include <system/audio_effects/audio_effects_conf.h>

static list_elem_t *gEffectList; // list of effect_entry_t: all currently created effects
+2 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include <pthread.h>

#include <android/log.h>
#include <cutils/compiler.h>
#include <hardware/audio_effect.h>

#if __cplusplus
@@ -96,6 +97,7 @@ typedef struct sub_effect_entry_s {
//        *pDescriptor:     updated with the sub effect descriptors.
//
////////////////////////////////////////////////////////////////////////////////
ANDROID_API
int EffectGetSubEffects(const effect_uuid_t *pEffectUuid,
                        sub_effect_entry_t **pSube,
                        size_t size);
+8 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#ifndef ANDROID_EFFECTSFACTORYAPI_H_
#define ANDROID_EFFECTSFACTORYAPI_H_

#include <cutils/compiler.h>
#include <errno.h>
#include <stdint.h>
#include <sys/types.h>
@@ -52,6 +53,7 @@ extern "C" {
//        *pNumEffects:     updated with number of effects in factory
//
////////////////////////////////////////////////////////////////////////////////
ANDROID_API
int EffectQueryNumberEffects(uint32_t *pNumEffects);

////////////////////////////////////////////////////////////////////////////////
@@ -79,6 +81,7 @@ int EffectQueryNumberEffects(uint32_t *pNumEffects);
//        *pDescriptor:     updated with the effect descriptor.
//
////////////////////////////////////////////////////////////////////////////////
ANDROID_API
int EffectQueryEffect(uint32_t index, effect_descriptor_t *pDescriptor);

////////////////////////////////////////////////////////////////////////////////
@@ -110,6 +113,7 @@ int EffectQueryEffect(uint32_t index, effect_descriptor_t *pDescriptor);
//        *pHandle:         updated with the effect handle.
//
////////////////////////////////////////////////////////////////////////////////
ANDROID_API
int EffectCreate(const effect_uuid_t *pEffectUuid, int32_t sessionId, int32_t ioId,
        effect_handle_t *pHandle);

@@ -130,6 +134,7 @@ int EffectCreate(const effect_uuid_t *pEffectUuid, int32_t sessionId, int32_t io
//                          -EINVAL     invalid interface handle
//
////////////////////////////////////////////////////////////////////////////////
ANDROID_API
int EffectRelease(effect_handle_t handle);

////////////////////////////////////////////////////////////////////////////////
@@ -153,6 +158,7 @@ int EffectRelease(effect_handle_t handle);
//        *pDescriptor:     updated with the effect descriptor.
//
////////////////////////////////////////////////////////////////////////////////
ANDROID_API
int EffectGetDescriptor(const effect_uuid_t *pEffectUuid, effect_descriptor_t *pDescriptor);

////////////////////////////////////////////////////////////////////////////////
@@ -169,8 +175,10 @@ int EffectGetDescriptor(const effect_uuid_t *pEffectUuid, effect_descriptor_t *p
//                           1 if uuid is equal to EFFECT_UUID_NULL.
//
////////////////////////////////////////////////////////////////////////////////
ANDROID_API
int EffectIsNullUuid(const effect_uuid_t *pEffectUuid);

ANDROID_API
int EffectDumpEffects(int fd);

#if __cplusplus