Fix build warning 78/182578/5 accepted/tizen/unified/20180628.130508 submit/tizen/20180628.005528
authorlokilee73 <changjoo.lee@samsung.com>
Tue, 26 Jun 2018 08:16:38 +0000 (17:16 +0900)
committerlokilee73 <changjoo.lee@samsung.com>
Wed, 27 Jun 2018 07:27:13 +0000 (16:27 +0900)
Add DATAUSAGE_WARNING and DATAUSAGE_DISABLED to fix build warning.

Change-Id: If8421e8a2bc429570f4daee811dc27b7f505e9cd
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
src/launcher/launcher.c
src/launcher/launcher.h
src/launcher/noti.c
src/mmc/mmc-mobile.c
src/overheat/overheat.c
src/usb/usb-device.c
system-cooperator/system-cooperator.c

index bb3d91f9a3ada14e1d65b9090dd2cbb2c547c001..28568f53b26b592eb26d95f99011b9063d1163d4 100755 (executable)
@@ -167,6 +167,19 @@ static DBusMessage *battery_critical_actnoti_chg_on(E_DBus_Object *obj, DBusMess
        return activate_notification_no_param(obj, msg, BATTERY_CRITICAL_CHG_ACT);
 }
 
+/* Datausage */
+static DBusMessage *data_warning_noti_on(E_DBus_Object *obj, DBusMessage *msg)
+{
+       set_timer_to_terminate();
+       return activate_notification_no_param(obj, msg, DATAUSAGE_WARNING);
+}
+
+static DBusMessage *data_disabled_noti_on(E_DBus_Object *obj, DBusMessage *msg)
+{
+       set_timer_to_terminate();
+       return activate_notification_no_param(obj, msg, DATAUSAGE_DISABLED);
+}
+
 /* Notification Off */
 static DBusMessage *noti_off(E_DBus_Object *obj, DBusMessage *msg)
 {
@@ -278,6 +291,11 @@ dbus_noti_methods[] = {
        { "TempCooldownNotiOff"         , "i"           , "i"   , noti_off                      },
        /* SD Card */
        { "SDcardNoti"                  , "s"           , "i"   , sdcard_noti   },
+       /* Data Usage */
+       { "DataWarningNotiOn"           , NULL          , "i"   , data_warning_noti_on          },
+       { "DataWarningNotiOff"          , "i"           , "i"   , noti_off                      },
+       { "DataDisabledNotiOn"          , NULL          , "i"   , data_disabled_noti_on },
+       { "DataDisabledNotiOff"         , "i"           , "i"   , noti_off              },
        /* Add notifications here */
 };
 
index df4fff54403c6b0cf279e9a5139c98d290e22a28..ab776dddd17c2996831063d95ff4ffc102a01d95 100755 (executable)
@@ -38,7 +38,7 @@
 /* Setting ugs */
 #define SETTING_ENCRYPTING_APP    "org.tizen.setting.encrypting"
 #define SETTING_LIGHTOFF_APP      "org.tizen.setting.turnofflight"
-#define SETTING_DATAUSAGE_UG      "setting-datausage-efl"
+#define SETTING_DATAUSAGE_APP  "org.tizen.setting-data"
 
 /* App to show Host devices list */
 #define HOST_DEVICES              "org.tizen.host-devices"
index b49c11910841568121254df5b06f17f3bb0a6ca0..80acf3b0d6aa2c8e0dbdb10893d69731aa235beb 100755 (executable)
@@ -239,7 +239,7 @@ static int launch_datausage_warning_notification(void)
 
        b = bundle_create();
        if (b)
-               appsvc_set_pkgname(b, SETTING_DATAUSAGE_UG);
+               appsvc_set_pkgname(b, SETTING_DATAUSAGE_APP);
 
        ret =  add_notification(NOTIFICATION_TYPE_NOTI,
                                NOTIFICATION_LY_NOTI_EVENT_SINGLE,
@@ -269,7 +269,7 @@ static int launch_datausage_disabled_notification(void)
 
        b = bundle_create();
        if (b)
-               appsvc_set_pkgname(b, SETTING_DATAUSAGE_UG);
+               appsvc_set_pkgname(b, SETTING_DATAUSAGE_APP);
 
        ret =  add_notification(NOTIFICATION_TYPE_ONGOING,
                                NOTIFICATION_LY_ONGOING_EVENT,
@@ -723,6 +723,10 @@ static int launch_battery_notification(int type)
 {
        int ret = -EINVAL;
 
+#ifndef PROFILE_MOBILE  // event noti should be supported in mobile profile only
+       return ret;
+#endif
+
        if (type == BATTERY_FULL) {
        ret =  add_notification(NOTIFICATION_TYPE_ONGOING,
                                NOTIFICATION_LY_ONGOING_EVENT,
@@ -929,11 +933,7 @@ DBusMessage *activate_notification_no_param(E_DBus_Object *obj, DBusMessage *msg
 
        _D("Load notification");
 // event noti should be supported in mobile profile only
-#ifdef PROFILE_MOBILE
        priv_id = launch_notification_no_param_by_type(type);
-#else
-       priv_id = -1;
-#endif
        if (priv_id < 0)
                _E("FAIL: launch_noti_by_type()");
 
index dece29993eac21135e4b37bef344cd38d862bab4..4f228369e04e3118428554a483a5edd027ae521e 100755 (executable)
@@ -182,7 +182,7 @@ static void send_ode_mount_signal(const struct popup_ops *ops)
 static void ode_launch_settings(const struct popup_ops *ops)
 {
        unload_simple_popup(ops);
-       launch_app(SETTING_MMC_ENCRYPTION_UG);
+       launch_app(EXT_SETTING_MMC_UG);
        terminate_if_no_popup();
 }
 
index a1b06267a8e517e7efd722e9f3c83ca3fae8bbe3..696b96978c392a01430cb26b3d70359c287ea4a9 100755 (executable)
@@ -65,7 +65,7 @@ static char *items[] = {
 
 char* gl_text_get(int index)
 {
-       char *text = NULL, buffer[BUF_MAX] = {NULL};
+       char *text = NULL, buffer[BUF_MAX] = {'\0',};
 
        if (index == 2) {
                text = _(items[2]);
index d254286903f13d86ed6212e5250752c72ce894cd..bd4f93176ecbc9a4bd8ebb74c6d434bf75ee3a6d 100755 (executable)
@@ -190,7 +190,7 @@ static int usbhost_show(bundle *b, const struct popup_ops *ops)
        Evas_Object *win;
        struct object_ops *obj;
        int ret;
-       char content[BUF_MAX] = {NULL};
+       char content[BUF_MAX] = {'\0',};
 
        ret = get_object_by_ops(ops, &obj);
        if (ret < 0) {
index df4d77ae1e8d2a798f8f086ae5bdabf7f112a091..e4cef48bd210dbf9ab1f2aef29ebdee7629c64a2 100755 (executable)
@@ -52,9 +52,9 @@ enum sound_status {
 
 static guint noti_timer;
 static GMainLoop *loop;
-static int loop_type = LOOP_ERROR;
+static int looptype = LOOP_ERROR;
 
-static void quit_main_loop(ltype)
+static void quit_main_loop(int ltype)
 {
        switch (ltype) {
        case LOOP_G_MAIN_LOOP:
@@ -83,7 +83,7 @@ static int get_sound_state(void)
 static gboolean time_expired(gpointer data)
 {
        feedback_deinitialize();
-       quit_main_loop(loop_type);
+       quit_main_loop(looptype);
        return FALSE;
 }
 
@@ -193,9 +193,9 @@ int main(int argc, char *argv[])
                return 0;
 
        type = atoi(argv[1]);
-       loop_type = get_main_loop_type(type);
+       looptype = get_main_loop_type(type);
 
-       ret = init_main_loop(loop_type);
+       ret = init_main_loop(looptype);
        if (ret < 0) {
                _E("Failed to init main loop (%d)", ret);
                return ret;
@@ -207,14 +207,14 @@ int main(int argc, char *argv[])
                goto out;
        }
 
-       start_main_loop(loop_type);
+       start_main_loop(looptype);
 
 out:
        ret = app_terminate(type);
        if (ret < 0)
                _E("Failed to release handlers(%d)", ret);
 
-       finalize_main_loop(loop_type);
+       finalize_main_loop(looptype);
 
        return 0;
 }