dynamic_sensor: Add sensor manager init to sub-HAL 2.1.
Bug: 195964858
Test: Verified dynamic sensor manager is present in sensor list and that
no SELinux violations occur on sc-v2-dev and master.
$ make -j28 && \
vendor/google/tools/flashall -w -s 14281FDEE000A5 --disable_verity && \
sleep 90 && adb root
.
.
.
$ adb shell sensor_test list | grep "sensor_test\|Type\|Dynamic"
sensor_test version 74
Type Subtype Name
32 0 Dynamic Sensor Manager
$ adb logcat -d | grep avc | grep sensor
$
Change-Id: Ib3da287e4f4118ad6b19498248e263f8c1662b3a
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#include <netinet/in.h>
|
||||
#include <algorithm> //std::max
|
||||
|
||||
#define SYSPROP_PREFIX "dynamic_sensor.dummy"
|
||||
#define SYSPROP_PREFIX "vendor.dynamic_sensor.mock"
|
||||
#define FILE_NAME_BASE "dummy_accel_file"
|
||||
#define FILE_NAME_REGEX ("^" FILE_NAME_BASE "[0-9]$")
|
||||
|
||||
@@ -43,11 +43,13 @@ DummyDynamicAccelDaemon::DummyDynamicAccelDaemon(DynamicSensorManager& manager)
|
||||
if (strcmp(property, "") != 0) {
|
||||
mFileDetector = new FileConnectionDetector(
|
||||
this, std::string(property), std::string(FILE_NAME_REGEX));
|
||||
mFileDetector->Init();
|
||||
}
|
||||
|
||||
property_get(SYSPROP_PREFIX ".socket", property, "");
|
||||
if (strcmp(property, "") != 0) {
|
||||
mSocketDetector = new SocketConnectionDetector(this, atoi(property));
|
||||
mSocketDetector->Init();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user