From: Jaeyun Date: Thu, 5 Sep 2019 10:43:56 +0000 (+0900) Subject: [Android] unnecessary log while runng android-lib X-Git-Tag: accepted/tizen/unified/20190918.102219~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e7e483e40c0598840e05de794785120db10d579;p=platform%2Fupstream%2Fnnstreamer.git [Android] unnecessary log while runng android-lib 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 --- diff --git a/api/android/api/res/values/strings.xml b/api/android/api/res/values/strings.xml deleted file mode 100644 index 4f213e1..0000000 --- a/api/android/api/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - NNStreamer API - diff --git a/gst/nnstreamer/nnstreamer_conf.c b/gst/nnstreamer/nnstreamer_conf.c index 09e8260..9984b6d 100644 --- a/gst/nnstreamer/nnstreamer_conf.c +++ b/gst/nnstreamer/nnstreamer_conf.c @@ -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)) diff --git a/gst/nnstreamer/tensor_common.c b/gst/nnstreamer/tensor_common.c index f3f6da7..e00c13a 100644 --- a/gst/nnstreamer/tensor_common.c +++ b/gst/nnstreamer/tensor_common.c @@ -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, ",");