Modified to request sticker sync using sticker feature 13/229013/2
authorInHong Han <inhong1.han@samsung.com>
Fri, 27 Mar 2020 05:47:18 +0000 (14:47 +0900)
committerInHong Han <inhong1.han@samsung.com>
Fri, 27 Mar 2020 07:45:15 +0000 (16:45 +0900)
Change-Id: Iacf7c5fb7524aaaa6d76fde548dfff17fc32bedb

receiver/src/main.cpp

index 969f575..aa65584 100644 (file)
@@ -19,6 +19,7 @@
 #include <stdlib.h>
 #include <app_alarm.h>
 #include <device/battery.h>
+#include <vconf.h>
 
 #include "main.h"
 #include "ft.h"
@@ -118,8 +119,20 @@ static void app_control(app_control_h app_control, void *data)
                 goto cleanup;
 
             if (mode && type) {
+#ifdef VCONFKEY_STICKER_SUPPORTED_FEATURE
+                int feature_flag = 0;
+                if (vconf_get_int(VCONFKEY_STICKER_SUPPORTED_FEATURE, &feature_flag) == 0) {
+                    if (feature_flag & VCONFKEY_STICKER_FEATURE_AREMOJI)
+                        request_sticker_data(mode, "arsticker", type);
+
+                    if (feature_flag & VCONFKEY_STICKER_FEATURE_BITMOJI)
+                        request_sticker_data(mode, "bitmoji", type);
+                } else
+                    LOGW("Failed to get value of VCONFKEY_STICKER_SUPPORTED_FEATURE");
+#else
                 request_sticker_data(mode, "arsticker", type);
                 request_sticker_data(mode, "bitmoji", type);
+#endif
             }
         }
         else if (strcmp(request, "oobe") == 0) {