1
0
mirror of https://github.com/ponces/treble_aosp.git synced 2024-11-22 04:16:14 +00:00
treble_aosp/patches/trebledroid/platform_frameworks_native/0001-On-Samsung-we-need-to-send-a-hack-message-to-HAL-to-.patch
2024-08-18 01:50:22 +01:00

36 lines
1.2 KiB
Diff

From 50db1f171c6f2833f5f146190b6da249919e11bc 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/14] 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 f62562ce9d..be7d33ba62 100644
--- a/services/sensorservice/SensorDevice.cpp
+++ b/services/sensorservice/SensorDevice.cpp
@@ -40,6 +40,7 @@
#include "android/hardware/sensors/2.1/types.h"
#include "convertV2_1.h"
+#include <android-base/properties.h>
using namespace android::hardware::sensors;
using android::util::ProtoOutputStream;
namespace sensorservice_flags = com::android::frameworks::sensorservice::flags;
@@ -79,6 +80,8 @@ SensorDevice::SensorDevice() : mInHalBypassMode(false) {
}
void SensorDevice::initializeSensorList() {
+ if(::android::base::GetBoolProperty("persist.sys.phh.samsung_sensors", false))
+ setMode(5555);
if (mHalWrapper == nullptr) {
return;
}
--
2.34.1