power: fix shutdown animation error issue 75/91275/3
authortaeyoung <ty317.kim@samsung.com>
Thu, 13 Oct 2016 09:33:20 +0000 (18:33 +0900)
committertaeyoung <ty317.kim@samsung.com>
Wed, 19 Oct 2016 09:33:48 +0000 (18:33 +0900)
- Launching manner of the shutdown animation is changed
  to use systemd service. Thus the codes are fixed.

- For the sound-server, the function to tuen off sound related
  operations is removed from Tizen 3.0. Thus it is removed.

Change-Id: I1950a3e4a796bf5606170b001d01d2876b528fed
Signed-off-by: taeyoung <ty317.kim@samsung.com>
src/power/power-handler.c

index 57707af..264d8fc 100644 (file)
@@ -243,11 +243,14 @@ static void boot_complete_send_system_event(void)
 
 static void poweroff_start_animation(void)
 {
-       char params[128];
-       snprintf(params, sizeof(params), "/usr/bin/boot-animation --stop --clear");
-       launch_app_cmd_with_nice(params, -20);
+       int ret;
+
+       ret = deviced_systemd_start_unit("shutdown-animation.service");
+       if (ret < 0)
+               _E("Failed to start shutdown animation");
+
        gettimeofday(&tv_start_poweroff, NULL);
-       launch_evenif_exist("/usr/bin/sound_server", "--poweroff");
+
        device_notify(DEVICE_NOTIFIER_POWEROFF_HAPTIC, NULL);
 }