quirks: fix bluetooth audio for ulefone power armor 13

This commit is contained in:
Peter Cai 2022-01-04 21:52:04 -05:00
parent 31bd18b738
commit 3b08bf6c6c
2 changed files with 23 additions and 0 deletions

View file

@ -10,6 +10,7 @@ cc_binary {
// Device-specific quirks
"quirks/device/unihertz_keylayout.cpp",
"quirks/device/ulefone_power_armor_13.cpp",
],
shared_libs: ["libbase", "libdl", "liblog", "libutils"],
static_libs: ["libresetprop", "libc++fs"],

View file

@ -0,0 +1,22 @@
#include "../../quirks.h"
#include <android-base/properties.h>
#include <filesystem>
using namespace std;
class UlefonePowerArmor13Quirks : DeviceQuirk {
public:
bool ShouldRun() {
return FP_STARTS_WITH("Ulefone/Power_Armor_13/");
}
void Run() {
// Set the A2DP offload properties to disabled so legacy policy is loaded
android::base::SetProperty("persist.bluetooth.a2dp_offload.disabled", "true");
android::base::SetProperty("persist.bluetooth.bluetooth_audio_hal.disabled", "true");
}
};
LOAD_QUIRK(UlefonePowerArmor13Quirks);