projects
/
platform
/
core
/
uifw
/
dali-demo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add ERROR message in the case of serious error
[platform/core/uifw/dali-demo.git]
/
build
/
android
/
app
/
src
/
main
/
cpp
/
main.cpp
diff --git
a/build/android/app/src/main/cpp/main.cpp
b/build/android/app/src/main/cpp/main.cpp
index
0ba207a
..
6ae80c1
100644
(file)
--- a/
build/android/app/src/main/cpp/main.cpp
+++ b/
build/android/app/src/main/cpp/main.cpp
@@
-29,8
+29,11
@@
#include <dlfcn.h>
// from android_native_app_glue.c
#include <dlfcn.h>
// from android_native_app_glue.c
+
+#define TAG "dalidemo"
+#define LOGE(...) ((void)__android_log_print(ANDROID_LOG_ERROR, TAG, ##__VA_ARGS__))
#ifndef NDEBUG
#ifndef NDEBUG
-#define LOGV(...) ((void)__android_log_print(ANDROID_LOG_VERBOSE,
"dalidemo",
__VA_ARGS__))
+#define LOGV(...) ((void)__android_log_print(ANDROID_LOG_VERBOSE,
TAG, ##
__VA_ARGS__))
#else
#define LOGV(...) ((void)0)
#endif
#else
#define LOGV(...) ((void)0)
#endif
@@
-153,6
+156,7
@@
void android_main(struct android_app* state)
LOGV("android_main() >>");
std::string filesDir = state->activity->internalDataPath;
LOGV("android_main() >>");
std::string filesDir = state->activity->internalDataPath;
+ LOGV("filesDir=%s", filesDir.c_str() );
std::string fontconfigPath = filesDir + "/fonts";
setenv("FONTCONFIG_PATH", fontconfigPath.c_str(), 1);
std::string fontconfigPath = filesDir + "/fonts";
setenv("FONTCONFIG_PATH", fontconfigPath.c_str(), 1);
@@
-198,6
+202,9
@@
void android_main(struct android_app* state)
void* handle = dlopen(libpath.c_str(), RTLD_LAZY);
if(!handle)
{
void* handle = dlopen(libpath.c_str(), RTLD_LAZY);
if(!handle)
{
+ int err = errno;
+ LOGE("Err=%d Fail to open lib %s", err, libpath.c_str());
+ status = err;
std::exit(status);
}
std::exit(status);
}