mirror of
https://github.com/ponces/treble_aosp.git
synced 2025-04-17 03:35:59 +00:00
36 lines
1.2 KiB
Diff
36 lines
1.2 KiB
Diff
From 7888c8534576446b8c79b9ffb2c4becb4c01cce5 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/15] 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 9c4d1ace15..6f81b5cd4c 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.43.0
|
|
|