[UI] Fix display only removable tones from Ringtone list 97/104897/2
authorWitold Goralski <w.goralski@samsung.com>
Wed, 14 Dec 2016 13:48:08 +0000 (14:48 +0100)
committerWitold Goralski <w.goralski@samsung.com>
Wed, 14 Dec 2016 13:51:18 +0000 (14:51 +0100)
Change-Id: I0eadd3a92ef8142485c090307fc235619feae63a
Signed-off-by: Witold Goralski <w.goralski@samsung.com>
setting-ringtone/src/setting-ringtone-remove.c

index 4f097ea3b3ffead99f4f24048c1ea6699db9f300..ba55bb20b6859c2bc0915f8297d28696fc26cd0f 100644 (file)
@@ -23,6 +23,7 @@
 #include "setting-ringtone-main.h"
 #include "setting-ringtone-util.h"
 #include "setting-common-draw-widget.h"
+#include "setting-common-string.h"
 #include <system_settings.h>
 
 static int _view_create(void *cb);
@@ -99,6 +100,11 @@ static void __draw_remove_list(SettingRingtoneData *ad)
        {
                if (!node_data)
                        continue;
+               //do not display default tone that is not possible to remove
+               if (node_data->path && node_data->name
+                               && strstr(SETTING_DEFAULT_CALL_TONE_SDK, node_data->name) != NULL
+                               && strstr(SETTING_DEFAULT_CALL_TONE_SDK, node_data->path) != NULL)
+                       continue;
                if (node_data->path && node_data->name)
                        snprintf(full_path, PATH_MAX, "%s/%s",
                                        node_data->path, node_data->name);