summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9b6fc4d)
output an error message through logcat
regardless release/debug build
also exit with an non-zero exit code
so that it won't fall into infinite loop
Change-Id: Ib078a7c26a0bfc855f284f3103878e0b94ea1dfa
#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__))
-#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
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);
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;