- } else if (type == BATTERY_LOW) {
- ret = add_notification(NOTIFICATION_TYPE_ONGOING,
- NOTIFICATION_LY_ONGOING_EVENT,
- "IDS_QP_HEADER_BATTERY_LOW_ABB",
- "IDS_QP_SBODY_CONNECT_A_CHARGER_ABB",
- BATT_LOW_INDI_ICON,
- NULL,
- NULL,
- NOTIFICATION_PROP_DISABLE_APP_LAUNCH,
- NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY,
- NULL,
- NULL);
- } else if (type == BATTERY_CRITICAL) {
- ret = add_notification(NOTIFICATION_TYPE_ONGOING,
- NOTIFICATION_LY_ONGOING_EVENT,
- "IDS_QP_HEADER_BATTERY_CRITICALLY_LOW_ABB",
- "IDS_QP_SBODY_CONNECT_A_CHARGER_ABB",
- BATT_LOW_INDI_ICON,
- NULL,
- NULL,
- NOTIFICATION_PROP_DISABLE_APP_LAUNCH,
- NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY,
- NULL,
- NULL);
- } else
- _E("Unknown type(%d).", type);
-
- return ret;
-}
-
-static int launch_battery_active_notification(int type)
-{
- int ret = -EINVAL;
-
- if (type == BATTERY_LOW_USB_ACT) {
- ret = add_notification(NOTIFICATION_TYPE_NOTI,
- NOTIFICATION_LY_ONGOING_EVENT,
- "IDS_QP_HEADER_BATTERY_LOW_ABB",
- "IDS_QP_POP_USE_A_PLUG_SOCKET_AND_CLOSE_UNUSED_APPS_FOR_QUICKER_CHARGING_ABB",
- BATT_LOW_INDI_ICON,
- NULL,
- NULL,
- NOTIFICATION_PROP_VOLATILE_DISPLAY,
- NOTIFICATION_DISPLAY_APP_ACTIVE,
- NULL,
- NULL);
- } else if (type == BATTERY_CRITICAL_USB_ACT) {
- ret = add_notification(NOTIFICATION_TYPE_NOTI,
- NOTIFICATION_LY_ONGOING_EVENT,
- "IDS_QP_HEADER_BATTERY_CRITICALLY_LOW_ABB",
- "IDS_QP_POP_USE_A_PLUG_SOCKET_AND_CLOSE_UNUSED_APPS_FOR_QUICKER_CHARGING_ABB",
- BATT_LOW_INDI_ICON,
- NULL,
- NULL,
- NOTIFICATION_PROP_VOLATILE_DISPLAY,
- NOTIFICATION_DISPLAY_APP_ACTIVE,
- NULL,
- NULL);
- } else if (type == BATTERY_LOW_CHG_ACT) {
- ret = add_notification(NOTIFICATION_TYPE_NOTI,
- NOTIFICATION_LY_ONGOING_EVENT,
- "IDS_QP_HEADER_BATTERY_LOW_ABB",
- "IDS_QP_POP_CONTINUED_USAGE_WHILE_CHARGING_MAY_PREVENT_EFFICIENT_CHARGING_ABB",
- BATT_LOW_INDI_ICON,
- NULL,
- NULL,
- NOTIFICATION_PROP_VOLATILE_DISPLAY,
- NOTIFICATION_DISPLAY_APP_ACTIVE,
- NULL,
- NULL);
- } else if (type == BATTERY_CRITICAL_CHG_ACT) {
- ret = add_notification(NOTIFICATION_TYPE_NOTI,
- NOTIFICATION_LY_ONGOING_EVENT,
- "IDS_QP_HEADER_BATTERY_CRITICALLY_LOW_ABB",
- "IDS_QP_POP_CONTINUED_USAGE_WHILE_CHARGING_MAY_PREVENT_EFFICIENT_CHARGING_ABB",
- BATT_LOW_INDI_ICON,
- NULL,
- NULL,
- NOTIFICATION_PROP_VOLATILE_DISPLAY,
- NOTIFICATION_DISPLAY_APP_ACTIVE,
- NULL,
- NULL);