[Galaxy Grand Prime Android Development] Zippy Dufus:
Build issues with 15.1

Hello [MENTION=7569388]vince2678[/MENTION]

I'm having issues building 15.1 and I think that I have my repos mixed up or I am missing something.

I've scanned the header files looking for the missing token getActiveInput and can only file it in hardware/libhardware_legacy/include/hardware_legacy/AudioPolicyManagerBase.h which isn't in the includes of the source c file in question.

Also below are the relevant snippets from my build script which set up the repos and apply the patches.

Any ideas?

...

wget https://raw.githubusercontent.com/Galaxy-MSM8916/local_manifests/master/lineage-15.1.xml -O$CROOT/.repo/local_manifests/local_manifest.xml

sed -i '/recovery-twrp/d' $CROOT/.repo/local_manifests/local_manifest.xml # remove TWRP

...

repo init -u git://github.com/LineageOS/android.git -b staging/lineage-15.1

repo sync -j1 --force-sync --prune

...

wget -O$HOME/repopicks.sh 'https://msm8916.com/~vincent/repopicks-15.1.sh'

chmod 755 $HOME/repopicks.sh

./repopicks.sh

...​

[ 5% 3745/72085] target thumb C++: libaudiopolicymanager <= hardware/qcom/audio-caf/msm8916/policy_hal/AudioPolicyManager.cpp

FAILED: /home/android/out/target/product/gprimelte/obj/SHARED_LIBRARIES/libaudiopolicymanager_intermediates/AudioPolicyManager.o

/bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-4053586/bin/clang++	-I device/samsung/msm8916-common/include -I frameworks/av/services -I frameworks/av/services/audioflinger -I system/media/audio_effects/include -I system/media/audio_utils/include -I frameworks/av/services/audiopolicy/common/include -I frameworks/av/services/audiopolicy/engine/interface -I frameworks/av/services/audiopolicy -I frameworks/av/services/audiopolicy/common/managerdefinitions/include -I system/core/base/include -I hardware/qcom/audio-caf/msm8916/policy_hal -I /home/android/out/target/product/gprimelte/obj/SHARED_LIBRARIES/libaudiopolicymanager_intermediates -I /home/android/out/target/product/gprimelte/gen/SHARED_LIBRARIES/libaudiopolicymanager_intermediates -I libnativehelper/include_deprecated \$(cat /home/android/out/target/product/gprimelte/obj/SHARED_LIBRARIES/libaudiopolicymanager_intermediates/import_includes) -I system/core/include -I system/media/audio/include -I hardware/libhardware/include -I hardware/libhardware_legacy/include -I hardware/ril/include -I libnativehelper/include -I frameworks/native/include -I frameworks/native/opengl/include -I frameworks/av/include -isystem /home/android/out/target/product/gprimelte/obj/include -isystem bionic/libc/arch-arm/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -c -fno-exceptions -Wno-multichar -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -DNDEBUG -g -Wstrict-aliasing=2 -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -DNDEBUG -UDEBUG -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -fdebug-prefix-map=\$PWD/= -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -nostdlibinc -msoft-float -mfloat-abi=softfp -mfpu=neon -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -D__ARM_FEATURE_LPAE=1 -target arm-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-7.2/arm-linux-androideabi/bin -Wsign-promo -Wno-inconsistent-missing-override -Wno-null-dereference -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-thread-safety-negative -fvisibility-inlines-hidden -std=gnu++14 -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -fno-rtti -DAUDIO_EXTN_AFE_PROXY_ENABLED -DCOMPRESS_VOIP_ENABLED -DNON_WEARABLE_TARGET -DFM_POWER_OPT -DUSE_XML_AUDIO_POLICY_CONF -fPIC -D_USING_LIBCXX -DANDROID_STRICT -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -MD -MF /home/android/out/target/product/gprimelte/obj/SHARED_LIBRARIES/libaudiopolicymanager_intermediates/AudioPolicyManager.d -o /home/android/out/target/product/gprimelte/obj/SHARED_LIBRARIES/libaudiopolicymanager_intermediates/AudioPolicyManager.o hardware/qcom/audio-caf/msm8916/policy_hal/AudioPolicyManager.cpp"

In file included from hardware/qcom/audio-caf/msm8916/policy_hal/AudioPolicyManager.cpp:69:

hardware/qcom/audio-caf/msm8916/policy_hal/AudioPolicyManager.h:66:26: warning: 'android::AudioPolicyManagerCustom::getInputForAttr' hides overloaded virtual function [-Woverloaded-virtual]

virtual status_t getInputForAttr(const audio_attributes_t *attr,

^

frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.h:130:26: note: hidden overloaded virtual function 'android::AudioPolicyManager::getInputForAttr' declared here: different number of parameters (9 vs 10)

virtual status_t getInputForAttr(const audio_attributes_t *attr,

^

In file included from hardware/qcom/audio-caf/msm8916/policy_hal/AudioPolicyManager.cpp:69:

hardware/qcom/audio-caf/msm8916/policy_hal/AudioPolicyManager.h:77:26: warning: 'android::AudioPolicyManagerCustom::startInput' hides overloaded virtual function [-Woverloaded-virtual]

virtual status_t startInput(audio_io_handle_t input,

^

frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.h:141:26: note: hidden overloaded virtual function 'android::AudioPolicyManager::startInput' declared here: different number of parameters (3 vs 2)

virtual status_t startInput(audio_io_handle_t input,

^

In file included from hardware/qcom/audio-caf/msm8916/policy_hal/AudioPolicyManager.cpp:69:

hardware/qcom/audio-caf/msm8916/policy_hal/AudioPolicyManager.h:110:18: warning: 'android::AudioPolicyManagerCustom::startSource' hides overloaded virtual function [-Woverloaded-virtual]

status_t startSource(sp<AudioOutputDescriptor> outputDesc,

^

frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.h:487:26: note: hidden overloaded virtual function 'android::AudioPolicyManager::startSource' declared here: different number of parameters (5 vs 4)

virtual status_t startSource(const sp<AudioOutputDescriptor>& outputDesc,

^

In file included from hardware/qcom/audio-caf/msm8916/policy_hal/AudioPolicyManager.cpp:69:

hardware/qcom/audio-caf/msm8916/policy_hal/AudioPolicyManager.h:114:18: warning: 'android::AudioPolicyManagerCustom::stopSource' hides overloaded virtual function [-Woverloaded-virtual]

status_t stopSource(sp<AudioOutputDescriptor> outputDesc,

^

frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.h:492:26: note: hidden overloaded virtual function 'android::AudioPolicyManager::stopSource' declared here: type mismatch at 1st parameter ('const sp<android::AudioOutputDescriptor> &' vs 'sp<android::AudioOutputDescriptor>')

virtual status_t stopSource(const sp<AudioOutputDescriptor>& outputDesc,

^

hardware/qcom/audio-caf/msm8916/policy_hal/AudioPolicyManager.cpp:1025:45: error: no member named 'getActiveInput' in 'android::AudioInputCollection'

audio_io_handle_t activeInput = mInputs.getActiveInput();

~~~~~~~ ^

hardware/qcom/audio-caf/msm8916/policy_hal/AudioPolicyManager.cpp:1877:48: error: too many arguments to function call, expected 9, have 10

inputType);

^~~~~~~~~

frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.h:130:9: note: 'getInputForAttr' declared here

virtual status_t getInputForAttr(const audio_attributes_t *attr,

^

hardware/qcom/audio-caf/msm8916/policy_hal/AudioPolicyManager.cpp:1900:49: error: no member named 'getActiveInput' in 'android::AudioInputCollection'

audio_io_handle_t activeInput = mInputs.getActiveInput();

~~~~~~~ ^

hardware/qcom/audio-caf/msm8916/policy_hal/AudioPolicyManager.cpp:1910:69: error: no member named 'getActiveAudioSessions' in 'android::AudioInputDescriptor'

AudioSessionCollection activeSessions = activeDesc->getActiveAudioSessions();

~~~~~~~~~~ ^

hardware/qcom/audio-caf/msm8916/policy_hal/AudioPolicyManager.cpp:1993:52: error: reference to type 'const sp<android::AudioInputDescriptor>' could not bind to an lvalue of type 'audio_io_handle_t' (aka 'int')

audio_devices_t device = getNewInputDevice(input);

^~~~~

frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.h:411:75: note: passing argument to parameter 'inputDesc' here

audio_devices_t getNewInputDevice(const sp<AudioInputDescriptor>& inputDesc);

^

4 warnings and 5 errors generated.​