1
0
mirror of https://github.com/yurisieucuti/treble_evolution.git synced 2024-11-24 10:56:22 +00:00
treble_evolution/patches/trebledroid/platform_frameworks_native/0001-On-Samsung-we-need-to-send-a-hack-message-to-HAL-to-.patch
2024-03-10 06:48:11 +00:00

36 lines
1.0 KiB
Diff

From 0d2c81b28bdabd54713cdae164ff633fa173c077 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Wed, 14 Aug 2019 23:37:10 +0200
Subject: [PATCH 01/11] On Samsung, we need to send a hack-message to HAL to
get all Sensors
Change-Id: Id6a1fa48340de61c418493668e9abd22c2599376
---
services/sensorservice/SensorDevice.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/services/sensorservice/SensorDevice.cpp b/services/sensorservice/SensorDevice.cpp
index 10ca990f87..e603f6d404 100644
--- a/services/sensorservice/SensorDevice.cpp
+++ b/services/sensorservice/SensorDevice.cpp
@@ -38,6 +38,7 @@
#include <cstddef>
#include <thread>
+#include <android-base/properties.h>
using namespace android::hardware::sensors;
using android::util::ProtoOutputStream;
@@ -76,6 +77,8 @@ SensorDevice::SensorDevice() {
}
void SensorDevice::initializeSensorList() {
+ if(::android::base::GetBoolProperty("persist.sys.phh.samsung_sensors", false))
+ setMode(5555);
if (mHalWrapper == nullptr) {
return;
}
--
2.25.1