When selecting alternate audio policy, check if we can grab the policy made for QSSI
This commit is contained in:
parent
5e6061d5fd
commit
0669df7523
@ -122,16 +122,21 @@ if [ "$1" == "persist.sys.phh.caf.audio_policy" ];then
|
|||||||
if [[ "$prop_value" == 1 ]];then
|
if [[ "$prop_value" == 1 ]];then
|
||||||
umount /vendor/etc/audio
|
umount /vendor/etc/audio
|
||||||
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
|
mount /vendor/etc/audio/audio_policy_configuration.xml /vendor/etc/audio_policy_configuration.xml
|
||||||
elif [ -f /vendor/etc/audio_policy_configuration_base.xml ];then
|
elif [ -f /vendor/etc/audio_policy_configuration_base.xml ];then
|
||||||
mount /vendor/etc/audio_policy_configuration_base.xml /vendor/etc/audio_policy_configuration.xml
|
mount /vendor/etc/audio_policy_configuration_base.xml /vendor/etc/audio_policy_configuration.xml
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
umount /vendor/etc/audio_policy_configuration.xml
|
umount /vendor/etc/audio_policy_configuration.xml
|
||||||
if [ $(find /vendor/etc/audio -type f |wc -l) -le 3 ];then
|
if [ $(find /vendor/etc/audio -type f |wc -l) -le 3 ];then
|
||||||
mount /mnt/phh/empty_dir /vendor/etc/audio
|
mount /mnt/phh/empty_dir /vendor/etc/audio
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
restartAudio
|
restartAudio
|
||||||
exit
|
exit
|
||||||
|
Loading…
Reference in New Issue
Block a user