INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/led_torch.png DESTINATION ${SYSTEM_ICONDIR})
INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/batt_full_icon.png DESTINATION ${SYSTEM_ICONDIR})
INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/batt_full_indicator.png DESTINATION ${SYSTEM_ICONDIR})
-ENDIF(NOTIFICATION_SERVICE STREQUAL on)
\ No newline at end of file
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/usb_icon.png DESTINATION ${SYSTEM_ICONDIR})
+ENDIF(NOTIFICATION_SERVICE STREQUAL on)
return update_notification_double_param(obj, msg, USB_DEVICE);
}
+static DBusMessage *media_device_noti_on(E_DBus_Object *obj, DBusMessage *msg)
+{
+ set_timer_to_terminate();
+ return activate_notification_no_param(obj, msg, MEDIA_DEVICE);
+}
+
static const struct edbus_method
dbus_powerkey_methods[] = {
{ "PopupLaunch", NULL, "i", powerkey_popup },
{ "UsbDeviceNotiOn" , "ss" , "i" , usb_device_noti_on },
{ "UsbDeviceNotiUpdate" , "isss" , "i" , usb_device_noti_update },
{ "UsbDeviceNotiOff" , "i" , "i" , noti_off },
+ /* usb connection */
+ { "MediaDeviceNotiOn" , NULL , "i" , media_device_noti_on },
+ { "MediaDeviceNotiOff" , "i" , "i" , noti_off },
/* Battery */
{ "BatteryFullNotiOn" , NULL , "i" , battery_full_noti_on },
{ "BatteryFullNotiOff" , "i" , "i" , noti_off },
return ret;
}
+static int launch_media_device_notification(void)
+{
+ int ret;
+
+ ret = add_notification(NOTIFICATION_TYPE_ONGOING,
+ NOTIFICATION_LY_ONGOING_EVENT,
+ "IDS_COM_BODY_CONNECTED_AS_A_MEDIA_DEVICE",
+ NULL,
+ USB_ICON,
+ NULL,
+ NULL,
+ NOTIFICATION_PROP_DISABLE_APP_LAUNCH |
+ NOTIFICATION_PROP_DISABLE_AUTO_DELETE,
+ NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY);
+
+ return ret;
+}
+
static int launch_notification_no_param_by_type(int type)
{
switch (type) {
return launch_tima_pkm_detection_notification();
case BATTERY_FULL:
return launch_battery_full_notification();
+ case MEDIA_DEVICE:
+ return launch_media_device_notification();
default:
_E("Noti type is unknown");
return -EINVAL;