When selecting alternate audio policy, check if we can grab the policy made for QSSI

This commit is contained in:
Pierre-Hugues Husson 2021-06-07 13:41:21 -04:00
parent 5e6061d5fd
commit 0669df7523

View File

@ -122,7 +122,12 @@ if [ "$1" == "persist.sys.phh.caf.audio_policy" ];then
if [[ "$prop_value" == 1 ]];then
umount /vendor/etc/audio
umount /vendor/etc/audio
if [ -f /vendor/etc/audio/audio_policy_configuration.xml ];then
sku="$(getprop ro.boot.product.vendor.sku)"
if [ -f /vendor/etc/audio/sku_${sku}_qssi/audio_policy_configuration.xml ] && [ -f /vendor/etc/audio/sku_$sku/audio_policy_configuration.xml ];then
umount /vendor/etc/audio
mount /vendor/etc/audio/sku_${sku}_qssi/audio_policy_configuration.xml /vendor/etc/audio/sku_$sku/audio_policy_configuration.xml
elif [ -f /vendor/etc/audio/audio_policy_configuration.xml ];then
mount /vendor/etc/audio/audio_policy_configuration.xml /vendor/etc/audio_policy_configuration.xml
elif [ -f /vendor/etc/audio_policy_configuration_base.xml ];then
mount /vendor/etc/audio_policy_configuration_base.xml /vendor/etc/audio_policy_configuration.xml