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/core/core_interface.h b/sdm/include/core/core_interface.h
index 882d050..e1b38fa 100644
--- a/sdm/include/core/core_interface.h
+++ b/sdm/include/core/core_interface.h
@@ -42,8 +42,7 @@
#include "display_interface.h"
#include "sdm_types.h"
#include "buffer_allocator.h"
-
-class BufferSyncHandler;
+#include "buffer_sync_handler.h"
/*! @brief Display manager interface version.
diff --git a/sdm/include/core/debug_interface.h b/sdm/include/core/debug_interface.h
index ca6f81a..f8e80b1 100644
--- a/sdm/include/core/debug_interface.h
+++ b/sdm/include/core/debug_interface.h
@@ -38,7 +38,7 @@
/*! @brief This enum represents different modules/logical unit tags that a log message may
be associated with. Client may use this to filter messages for dynamic logging.
- @sa DisplayLogHandler
+ @sa DebugHandler
*/
enum DebugTag {
kTagNone, //!< Debug log is not tagged. This type of logs should always be printed.
@@ -101,6 +101,15 @@
*/
virtual void EndTrace() = 0;
+ /*! @brief Method to get property value corresponding to give string.
+
+ @param[in] property_name name of the property
+ @param[out] value value corresponding to the property name
+
+ @return \link DisplayError \endlink
+` */
+ virtual DisplayError GetProperty(const char *property_name, int *value) = 0;
+
protected:
virtual ~DebugHandler() { }
};
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)