diff --git a/init/Android.bp b/init/Android.bp index 9977a59..aaca8b4 100644 --- a/init/Android.bp +++ b/init/Android.bp @@ -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"], diff --git a/init/quirks/device/ulefone_power_armor_13.cpp b/init/quirks/device/ulefone_power_armor_13.cpp new file mode 100644 index 0000000..28a689c --- /dev/null +++ b/init/quirks/device/ulefone_power_armor_13.cpp @@ -0,0 +1,22 @@ +#include "../../quirks.h" + +#include + +#include + +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);