quirks: fix bluetooth audio for ulefone power armor 13
This commit is contained in:
parent
31bd18b738
commit
3b08bf6c6c
|
@ -10,6 +10,7 @@ cc_binary {
|
||||||
|
|
||||||
// Device-specific quirks
|
// Device-specific quirks
|
||||||
"quirks/device/unihertz_keylayout.cpp",
|
"quirks/device/unihertz_keylayout.cpp",
|
||||||
|
"quirks/device/ulefone_power_armor_13.cpp",
|
||||||
],
|
],
|
||||||
shared_libs: ["libbase", "libdl", "liblog", "libutils"],
|
shared_libs: ["libbase", "libdl", "liblog", "libutils"],
|
||||||
static_libs: ["libresetprop", "libc++fs"],
|
static_libs: ["libresetprop", "libc++fs"],
|
||||||
|
|
22
init/quirks/device/ulefone_power_armor_13.cpp
Normal file
22
init/quirks/device/ulefone_power_armor_13.cpp
Normal 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);
|
Loading…
Reference in a new issue