[Android] unnecessary log while runng android-lib
authorJaeyun <jy1210.jung@samsung.com>
Thu, 5 Sep 2019 10:43:56 +0000 (19:43 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Sat, 7 Sep 2019 13:52:32 +0000 (22:52 +0900)
1. add condition to check file path or tensor name
2. remove unnecessary res file in android

This will remove unnecessary log-print while running java custom-filter and tf-lite model.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
api/android/api/res/values/strings.xml [deleted file]
gst/nnstreamer/nnstreamer_conf.c
gst/nnstreamer/tensor_common.c

diff --git a/api/android/api/res/values/strings.xml b/api/android/api/res/values/strings.xml
deleted file mode 100644 (file)
index 4f213e1..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<resources>
-    <string name="lib_name">NNStreamer API</string>
-</resources>
index 09e8260..9984b6d 100644 (file)
@@ -115,7 +115,7 @@ static gboolean
 _validate_file (nnsconf_type_path type, const gchar * fullpath)
 {
   /* ignore directory */
-  if (!g_file_test (fullpath, G_FILE_TEST_IS_REGULAR))
+  if (!fullpath || !g_file_test (fullpath, G_FILE_TEST_IS_REGULAR))
     return FALSE;
   /* ignore symbol link file */
   if (!conf.enable_symlink && g_file_test (fullpath, G_FILE_TEST_IS_SYMLINK))
index f3f6da7..e00c13a 100644 (file)
@@ -534,7 +534,9 @@ gst_tensors_info_get_names_string (const GstTensorsInfo * info)
     GString *names = g_string_new (NULL);
 
     for (i = 0; i < info->num_tensors; i++) {
-      g_string_append (names, info->info[i].name);
+      if (info->info[i].name) {
+        g_string_append (names, info->info[i].name);
+      }
 
       if (i < info->num_tensors - 1) {
         g_string_append (names, ",");