sdm: Remove libsdmutils dependency on Android.
- Make libsdmutils Android independent.
- Rename debug_android.cpp to debug.cpp.
- Fix compilation errors observed in linux environment.
Change-Id: I19e275939b27f2f47949c5e17559eeadb09bdccf
diff --git a/sdm/include/utils/constants.h b/sdm/include/utils/constants.h
index 75f845b..b68604d 100644
--- a/sdm/include/utils/constants.h
+++ b/sdm/include/utils/constants.h
@@ -26,6 +26,11 @@
#define __CONSTANTS_H__
#include <stdlib.h>
+#include <inttypes.h>
+
+#ifndef PRIu64
+#define PRIu64 "llu"
+#endif
#define INT(exp) static_cast<int>(exp)
#define FLOAT(exp) static_cast<float>(exp)
diff --git a/sdm/include/utils/debug.h b/sdm/include/utils/debug.h
index 7f9209e..478f623 100644
--- a/sdm/include/utils/debug.h
+++ b/sdm/include/utils/debug.h
@@ -59,7 +59,6 @@
debug_.debug_handler_ = debug_handler;
}
static inline DebugHandler* Get() { return debug_.debug_handler_; }
- static inline bool IsVirtualDriver() { return debug_.virtual_driver_; }
static uint32_t GetSimulationFlag();
static uint32_t GetHDMIResolution();
static uint32_t GetIdleTimeoutMs();
@@ -81,11 +80,13 @@
virtual void BeginTrace(const char */*class_name*/, const char */*function_name*/,
const char */*custom_string*/) { }
virtual void EndTrace() { }
+ virtual DisplayError GetProperty(const char *property_name, int *value) {
+ return kErrorNotSupported;
+ }
};
DefaultDebugHandler default_debug_handler_;
DebugHandler *debug_handler_;
- bool virtual_driver_;
static Debug debug_;
};
diff --git a/sdm/include/utils/locker.h b/sdm/include/utils/locker.h
index 3bc92d3..bc24ad5 100644
--- a/sdm/include/utils/locker.h
+++ b/sdm/include/utils/locker.h
@@ -27,6 +27,7 @@
#include <stdint.h>
#include <pthread.h>
+#include <sys/time.h>
#define SCOPE_LOCK(locker) Locker::ScopeLock lock(locker)
#define SEQUENCE_ENTRY_SCOPE_LOCK(locker) Locker::SequenceEntryScopeLock lock(locker)