Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 70a56768 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Allow replacing of sensord"

parents 64899fa7 15bd7517
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@

LOCAL_PATH := $(call my-dir)

SENSORD_EXTEND ?= libsensordextensionstub

sourceFiles := \
	pose_service.cpp \
	sensord.cpp \
@@ -42,6 +44,7 @@ sharedLibraries := \
	liblog \
	libhardware \
	libutils \
	$(SENSORD_EXTEND) \

cFlags := -DLOG_TAG=\"sensord\" \
          -DTRACE=0
@@ -67,3 +70,8 @@ LOCAL_SHARED_LIBRARIES := $(sharedLibraries)
LOCAL_SRC_FILES := test/poselatencytest.cpp
LOCAL_MODULE := poselatencytest
include $(BUILD_EXECUTABLE)

include $(CLEAR_VARS)
LOCAL_MODULE := libsensordextensionstub
LOCAL_SRC_FILES := sensord_extension.cpp
include $(BUILD_SHARED_LIBRARY)
+4 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
#include "sensor_ndk_thread.h"
#include "sensor_service.h"
#include "sensor_thread.h"
#include "sensord_extension.h"

using android::dvr::PoseService;
using android::dvr::SensorHalThread;
@@ -22,10 +23,13 @@ using android::dvr::SensorService;
using android::dvr::SensorThread;
using android::pdx::Service;
using android::pdx::ServiceDispatcher;
using android::dvr::SensordExtension;

int main(int, char**) {
  ALOGI("Starting up...");

  SensordExtension::run();

  // We need to be able to create endpoints with full perms.
  umask(0000);

+4 −0
Original line number Diff line number Diff line
#include "sensord_extension.h"

void android::dvr::SensordExtension::run() {
}
+16 −0
Original line number Diff line number Diff line
#ifndef ANDROID_DVR_SENSORD_EXTENSION_H_
#define ANDROID_DVR_SENSORD_EXTENSION_H_

namespace android {
namespace dvr {

// Allows sensord to be extended with additional code.
class SensordExtension {
 public:
  static void run();
};

} // namespace dvr
} // namespace android

#endif // ANDROID_DVR_SENSORD_EXTENSION_H_