sde: Read simulation flag

Read simulation flag from "debug.hwc.simulate" property.

Change-Id: Ia0dfe88d5d579985a2c1fcd58e83e0cc5583ef15
diff --git a/displayengine/include/utils/debug.h b/displayengine/include/utils/debug.h
index 8fbfb71..3462b96 100755
--- a/displayengine/include/utils/debug.h
+++ b/displayengine/include/utils/debug.h
@@ -25,6 +25,7 @@
 #ifndef __DEBUG_H__
 #define __DEBUG_H__
 
+#include <stdint.h>
 #include <core/sde_types.h>
 
 #define DLOG(tag, method, format, ...) Debug::GetLogHandler()->method(tag, \
@@ -47,6 +48,7 @@
   static inline void SetLogHandler(LogHandler *log_handler) { debug_.log_handler_ = log_handler; }
   static inline LogHandler* GetLogHandler() { return debug_.log_handler_; }
   static inline bool IsVirtualDriver() { return debug_.virtual_driver_; }
+  static uint32_t GetSimulationFlag();
 
  private:
   Debug();
diff --git a/displayengine/libs/utils/debug_android.cpp b/displayengine/libs/utils/debug_android.cpp
index 23da9fe..8b46371 100755
--- a/displayengine/libs/utils/debug_android.cpp
+++ b/displayengine/libs/utils/debug_android.cpp
@@ -38,5 +38,14 @@
   }
 }
 
+uint32_t Debug::GetSimulationFlag() {
+  char property[PROPERTY_VALUE_MAX];
+  if (property_get("debug.hwc.simulate", property, NULL) > 0) {
+    return atoi(property);
+  }
+
+  return 0;
+}
+
 }  // namespace sde