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

Commit da3529b4 authored by Eric Laurent's avatar Eric Laurent
Browse files

Create base class for audio policy manager.

First implementations of audio policy manager in Eclair branch have shown that most code is common to all platforms.
Creating AudioPolicyManagerBase base class will improve code maintainability and readability.

Audio policy manager code for platforms using generic audio previously in AudioPolicyManagerGeneric is replaced by AudioPolicyManagerBase.
Audio policy manager test code previously in AudioPolicyManagerGeneric is moved to AudioPolicyManagerBase.

Also added a wake lock for delayed commands in AudioPolicyService.
parent 6c3067a0
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)

LOCAL_SRC_FILES:=               \
    AudioPolicyManagerGeneric.cpp
    AudioPolicyManagerBase.cpp

LOCAL_SHARED_LIBRARIES := \
    libcutils \
@@ -60,7 +60,7 @@ else
 LOCAL_SHARED_LIBRARIES += libdl
endif

LOCAL_MODULE:= libaudiopolicygeneric
LOCAL_MODULE:= libaudiopolicybase

ifeq ($(BOARD_HAVE_BLUETOOTH),true)
  LOCAL_CFLAGS += -DWITH_A2DP
@@ -70,7 +70,7 @@ ifeq ($(AUDIO_POLICY_TEST),true)
  LOCAL_CFLAGS += -DAUDIO_POLICY_TEST
endif

include $(BUILD_SHARED_LIBRARY)
include $(BUILD_STATIC_LIBRARY)

include $(CLEAR_VARS)

@@ -87,11 +87,10 @@ LOCAL_SHARED_LIBRARIES := \
    libutils \
	libbinder \
    libmedia \
    libhardware_legacy \
    libaudiopolicygeneric
    libhardware_legacy

ifeq ($(strip $(BOARD_USES_GENERIC_AUDIO)),true)
  LOCAL_STATIC_LIBRARIES += libaudiointerface
  LOCAL_STATIC_LIBRARIES += libaudiointerface libaudiopolicybase
  LOCAL_CFLAGS += -DGENERIC_AUDIO
else
  LOCAL_SHARED_LIBRARIES += libaudio libaudiopolicy
Loading