android_device_peter_gsi/init/quirks/no_sysbta.cpp
Peter Cai 1062c77ff9 gsi: init: Exclude sysbta for AIDL audio HAL
It won't work for them. Hopefully they don't need it. If they do, we'll
have to figure something out later.
2024-10-06 10:18:51 -04:00

21 lines
608 B
C++

#include "../quirks.h"
#include <android-base/properties.h>
#include <filesystem>
using namespace std;
// sysbta is unsupported for AIDL audio HAL -- hopefully they won't need it either
// If they do, we'll figure something out later...
class NoSysbtaForAidl : DeviceQuirk {
public:
bool ShouldRun() {
// AIDL audio HAL has no audio_policy_configuration.xml
return !filesystem::exists("/vendor/etc/audio_policy_configuration.xml");
}
void Run() {
android::base::SetProperty("persist.bluetooth.system_audio_hal.enabled", "false");
}
};
LOAD_QUIRK(NoSysbtaForAidl);