Revert "Fix to request sticker feature only once" 93/245493/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Sat, 10 Oct 2020 05:07:05 +0000 (14:07 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Sat, 10 Oct 2020 05:38:07 +0000 (14:38 +0900)
Sticker sync feature can be changed after synchronization.

This reverts commit 3eab9e95c212ccf8887363781d8d0deda1eafce3.

Change-Id: I3bb0e0bcd1216ea2e0b15b06a8a69e06e10e9aa4

receiver/inc/ft.h
receiver/inc/receiver_preference.h
receiver/src/ft.cpp
receiver/src/main.cpp

index 55a4ffaaea37f972b8aa4e8eab34d48f66e4d357..afab92e194ed632679d5bdd6cb04dca3375b9867 100644 (file)
@@ -40,6 +40,4 @@ void request_show_sync_notification();
 
 bool get_job_progress();
 
-bool get_receive_sticker_feature();
-
 #endif /* __FT_H__ */
index aae2c887010aa47eeef2d7f36f06e50dcb95a4f3..02fc7e3aa8b8a9ed6e370c89ff7155ef5d34c925 100644 (file)
@@ -19,6 +19,5 @@
 
 #define LAST_SYNC_TIME "LastSyncTime"
 #define LAST_LOG_FILE_INDEX "LastLogFileIndex"
-#define RECEIVED_STICKER_FEATURE "ReceivedStickerFeature"
 
 #endif /* __RECEIVER_PREFERENCE_H__ */
index 9a684cb0376495ac87aa44776d21e8da28ee25d2..26883b3cdb66635e358bde761cf5a75e1b6777d6 100644 (file)
@@ -107,27 +107,6 @@ static void save_last_sync_time()
     }
 }
 
-static void save_receive_sticker_feature(bool received)
-{
-    // received sticker feature or not
-    if (preference_set_boolean(RECEIVED_STICKER_FEATURE, received) == PREFERENCE_ERROR_NONE) {
-        STLOGI("Succeed to set the flag of receive sticker feature : %d", received);
-    }
-    else {
-        STLOGW("Failed to set the flag of receive sticker feature");
-    }
-}
-
-bool get_receive_sticker_feature()
-{
-    bool result = false;
-    if (preference_get_boolean(RECEIVED_STICKER_FEATURE, &result) != PREFERENCE_ERROR_NONE) {
-        STLOGW("Failed to get receive sticker feature");
-    }
-
-    return result;
-}
-
 static void set_sync_first_complete()
 {
     int complete_flags = 0;
@@ -792,7 +771,6 @@ on_data_received(sap_socket_h socket, unsigned short int channel_id, unsigned in
         request_all_sticker_data("manual", "input");
     } else if (msg_id == STICKER_SYNC_FEATURE_RSP) {
         STLOGD("msg : %s", msg_id.c_str());
-        save_receive_sticker_feature(true);
 #ifdef VCONFKEY_STICKER_SUPPORTED_FEATURE
         const char *json_aremoji = json_object_get_string_member(root_obj, "arEmoji");
         const char *json_bitmoji = json_object_get_string_member(root_obj, "bitmoji");
index aeefd28176e2ea2ff56a439249f08a386202593d..aa196e12e5cd0da835dd6d54462e93a71f8210d6 100644 (file)
@@ -209,13 +209,7 @@ static void process_auto_sync()
         if (check_battery_condition()) {
             STLOGD("Starting auto synchronization");
             initialize_sap();
-            if (get_receive_sticker_feature()) {
-                STLOGI("Already sticker feature is received");
-            }
-            else {
-                request_sticker_feature();
-            }
-
+            request_sticker_feature();
             request_auto_sync();
         }
         else {
@@ -236,14 +230,6 @@ static void process_auto_sync()
 
 static void get_sticker_feature()
 {
-    if (get_receive_sticker_feature()) {
-        STLOGI("Already sticker feature is received");
-        if (!is_init_sap())
-            service_app_exit();
-
-        return;
-    }
-
 #ifdef VCONFKEY_STICKER_SUPPORTED_FEATURE
     // Check whether oobe has been done
     int feature_flag = 0;