static const struct popup_ops lowbattery_warning_ops = {
.name = "lowbattery_warning",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.content = "IDS_COM_POP_BATTERYLOW",
.left_text = "IDS_COM_SK_OK",
static const struct popup_ops lowbattery_critical_ops = {
.name = "lowbattery_critical",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.content = "IDS_COM_POP_BATTERYLOW",
.left_text = "IDS_COM_SK_OK",
static const struct popup_ops lowbattery_poweroff_ops = {
.name = "lowbattery_poweroff",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.content = "IDS_COM_POP_LOW_BATTERY_PHONE_WILL_SHUT_DOWN",
.left_text = "IDS_COM_SK_OK",
static const struct popup_ops charge_error_low_ops = {
.name = "chargeerrlow",//"charge_error_low",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.content = "IDS_QP_BODY_CHARGING_PAUSED_BATTERY_TEMPERATURE_TOO_LOW",
.left_text = "IDS_COM_SK_OK",
static const struct popup_ops charge_error_high_ops = {
.name = "chargeerrhigh",//"charge_error_high",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.content = "IDS_QP_BODY_CHARGING_PAUSED_BATTERY_TEMPERATURE_TOO_HIGH",
.left_text = "IDS_COM_SK_OK",
static const struct popup_ops battery_disconnected_ops = {
.name = "battdisconnect",//"battery_disconnected",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.content = "IDS_COM_POP_BATTERY_DISCONNECTED_ABB",
.left_text = "IDS_COM_SK_OK",
static const struct popup_ops lowbattery_warning_ops = {
.name = "lowbattery_warning",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.content = "IDS_COM_POP_BATTERYLOW",
.left_text = "IDS_COM_SK_OK",
static const struct popup_ops lowbattery_critical_ops = {
.name = "lowbattery_critical",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.content = "IDS_COM_POP_BATTERYLOW",
.left_text = "IDS_COM_SK_OK",
static const struct popup_ops lowbattery_poweroff_ops = {
.name = "lowbattery_poweroff",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.content = "IDS_COM_POP_LOW_BATTERY_PHONE_WILL_SHUT_DOWN",
.left_text = "IDS_COM_SK_OK",
static const struct popup_ops charge_error_low_ops = {
.name = "chargeerrlow",//"charge_error_low",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.content = "IDS_QP_BODY_CHARGING_PAUSED_BATTERY_TEMPERATURE_TOO_LOW",
.left_text = "IDS_COM_SK_OK",
static const struct popup_ops charge_error_high_ops = {
.name = "chargeerrhigh",//"charge_error_high",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.content = "IDS_QP_BODY_CHARGING_PAUSED_BATTERY_TEMPERATURE_TOO_HIGH",
.left_text = "IDS_COM_SK_OK",
static const struct popup_ops battery_disconnected_ops = {
.name = "battdisconnect",//"battery_disconnected",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.content = "IDS_COM_POP_BATTERY_DISCONNECTED_ABB",
.left_text = "IDS_COM_SK_OK",
static syspopup_handler handler;
static GList *popup_list = NULL;
-
+static int feedback_init_processed;
appdata_s *app_info;
extern int reset_window_priority(int priority);
return 0;
}
+ if (obj->ops->pattern)
+ play_multi_feedback(obj->ops->pattern);
+
if (obj->ops->change)
obj->ops->change(b, obj->ops);
if (ret < 0)
_E("Failed to set dbus connection (%d)", ret);
+ if (!feedback_init_processed) {
+ init_multi_feedback();
+ feedback_init_processed = 1;
+ }
+
return 0;
}
static int app_terminate(void *data)
{
+ stop_multi_feedback();
+ feedback_init_processed = 0;
return release_all_handlers(data);
}
_E("Cannot deinitialize feedback");
}
+void init_multi_feedback(void)
+{
+ int ret;
+
+ ret = feedback_initialize();
+ if (ret != FEEDBACK_ERROR_NONE)
+ _E("Cannot initialize feedback");
+}
+
+void play_multi_feedback(int pattern)
+{
+ int ret;
+
+ ret = feedback_play(pattern);
+ if (ret != FEEDBACK_ERROR_NONE)
+ _E("Cannot play feedback: %d", pattern);
+}
+
+void stop_multi_feedback(void)
+{
+ int ret;
+
+ ret = feedback_deinitialize();
+ if (ret != FEEDBACK_ERROR_NONE)
+ _E("Cannot deinitialize feedback");
+}
+
static void *thread_feedback(void* data)
{
long type = (long)data;
char *right_text;
void (*right)(const struct popup_ops *ops);
+ /* Feedback */
+ int pattern;
+
/* Show popup */
bool (*skip)(bundle *b, const struct popup_ops *ops);
int (*change) (bundle *b, const struct popup_ops *ops);
/* feedback */
void play_feedback(int type, int pattern);
+void init_multi_feedback(void);
+void play_multi_feedback(int pattern);
+void stop_multi_feedback(void);
void notify_feedback(long pattern); /* using thread */
void change_display_state(void); /* using thread */
static const struct popup_ops cooldown_poweroff_ops = {
.name = "cooldown_poweroff",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.title = "IDS_ST_HEADER_POWER_OFF_ABB",
.content = "IDS_QP_POP_YOUR_DEVICE_IS_OVERHEATING_IT_WILL_NOW_POWER_OFF_TO_COOL_DOWN",
static const struct popup_ops cooldown_ops = {
.name = "cooldown",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.title = "IDS_IDLE_HEADER_PHONE_COOLING_DOWN_ABB",
.content = "IDS_IDLE_POP_YOUR_PHONE_IS_OVERHEATING_STEPS_WILL_BE_TAKEN_TO_COOL_IT_DOWN_N_NYOU_CAN_STILL_USE_YOUR_PHONE_MSG",
static const struct popup_ops cooldown_poweroff_ops = {
.name = "cooldown_poweroff",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.get_content = cooldown_poweroff_content,
.left_text = "IDS_COM_SK_OK",
static const struct popup_ops cooldown_poweron_ops = {
.name = "cooldown_poweron",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.content = "Your device overheated. It powered off to prevent damage.",
.left_text = "IDS_COM_SK_OK",
static const struct popup_ops cooldown_warning_ops = {
.name = "cooldown_warning",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.get_content = cooldown_warning_content,
.left_text = "IDS_COM_SK_OK",
if (!ops || !content)
return -EINVAL;
- _D("crash_get_content() is entered");
ret = get_object_by_ops(ops, &obj);
if (ret < 0) {
_E("Failed to get object (%d)", ret);
text = _("IDS_IDLE_POP_PS_HAS_STOPPED_UNEXPECTEDLY");
snprintf(content, len, text, tname);
- _D("crash_get_content() is finished");
return 0;
}
static const struct popup_ops crash_ops = {
.name = "crash",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.title = "IDS_IDLE_HEADER_ERROR_OCCURRED",
.get_content = crash_get_content,
</ui-application>
<privileges>
<privilege>http://tizen.org/privilege/window.priority.set</privilege>
+ <privilege>http://tizen.org/privilege/haptic</privilege>
</privileges>
</manifest>
appcore-common
appsvc
notification
+ feedback
)
INCLUDE(FindPkgConfig)
static const struct popup_ops mount_error_ops = {
.name = "mounterr",//"mmc_mount_error",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.title = "IDS_IDLE_HEADER_COULDNT_MOUNT_SD_CARD_ABB",
.content = "IDS_IDLE_POP_REMOVE_AND_REINSERT_OR_FORMAT_YOUR_SD_CARD_THEN_TRY_AGAIN",
static const struct popup_ops unmount_error_ops = {
.name = "unmounterr",//"mmc_unmount_error",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.title = "IDS_IDLE_HEADER_COULDNT_UNMOUNT_SD_CARD_ABB",
.content = "IDS_IDLE_POP_THE_SD_CARD_MAY_BE_IN_USE_TRY_AGAIN_LATER",
static const struct popup_ops mount_read_only_ops = {
.name = "mountrdonly",//"mmc_mount_read_only",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.content = "IDS_ST_BODY_SD_CARD_MOUNTED_READ_ONLY",
.left_text = "IDS_COM_SK_OK",
static const struct popup_ops check_smack_ops = {
.name = "checksmack",//"mmc_check_smack",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.content = "IDS_MF_BODY_MMC_DATA_IS_INITIALIZING_ING",
.left_text = "IDS_COM_SK_OK",
static const struct popup_ops ode_encrypt_ops = {
.name = "odeencrypt",//"mmc_ode_encrypt",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.title = "IDS_DN_BODY_ENCRYPT_SD_CARD",
.content = "IDS_ST_POP_TO_USE_YOUR_SD_CARD_IT_MUST_BE_ENCRYPTED_ENCRYPT_SD_CARD_OR_DISABLE_DEVICE_ENCRYPTION_Q",
static const struct popup_ops ode_decrypt_ops = {
.name = "odedecrypt",//"mmc_ode_decrypt",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.title = "IDS_DN_BODY_DECRYPT_SD_CARD",
.content = "IDS_ST_POP_TO_USE_YOUR_SD_CARD_IT_MUST_BE_DECRYPTED_DECRYPT_SD_CARD_OR_ENABLE_DEVICE_ENCRYPTION_Q",
<privilege>http://tizen.org/privilege/display</privilege>
<privilege>http://tizen.org/privilege/appmanager.launch</privilege>
<privilege>http://tizen.org/privilege/window.priority.set</privilege>
+ <privilege>http://tizen.org/privilege/haptic</privilege>
</privileges>
</manifest>
static const struct popup_ops overheat_ops = {
.name = "overheat", //overheat first popup
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = overheat_popup,
.skip = overheat_skip,
.pre = overheat_launch,
static const struct popup_ops power_lock_expired_ops = {
.name = "power_lock_expired",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.get_content = power_lock_expired_get_content,
.left_text = "IDS_COM_SK_CANCEL",
static const struct popup_ops powerkey_ops = {
.name = "powerkey",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = powerkey_list,
.pre = powerkey_list_launch,
.terminate = powerkey_terminate,
static const struct popup_ops powerkey_ops = {
.name = "powerkey",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = powerkey_list,
.pre = powerkey_launch,
.terminate = powerkey_terminate,
static int remove_other_lowstorage_popups(bundle *b, const struct popup_ops *ops)
{
- _D("remove_other_lowstorage_popups() is entered");
-
if (ops != &lowstorage_warning_ops)
unload_simple_popup(&lowstorage_warning_ops);
if (ops != &lowstorage_critical_ops)
unload_simple_popup(&lowstorage_critical_ops);
-
- _D("remove_other_lowstorage_popups() is finished");
+
return 0;
}
static const struct popup_ops lowstorage_warning_ops = {
.name = "lowstorage_warning",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.content = "IDS_IDLE_BODY_LOW_MEMORY",
.left_text = "IDS_COM_SK_OK",
static const struct popup_ops lowstorage_critical_ops = {
.name = "lowstorage_critical",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.content = "IDS_IDLE_BODY_LOW_MEMORY",
.left_text = "IDS_COM_SK_OK",
static const struct popup_ops lowstorage_warning_ops = {
.name = "lowstorage_warning",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.content = "IDS_IDLE_BODY_LOW_MEMORY",
.left_text = "IDS_COM_SK_OK",
static const struct popup_ops lowstorage_critical_ops = {
.name = "lowstorage_critical",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.content = "IDS_IDLE_BODY_LOW_MEMORY",
.left_text = "IDS_COM_SK_OK",
static const struct popup_ops lowstorage_full_ops = {
.name = "lowstorage_full",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.content = "IDS_ST_POP_UNABLE_TO_RECORD_THERE_IS_NOT_ENOUGH_SPACE_IN_YOUR_GEAR_STORAGE",
.left_text = "IDS_COM_SK_OK",
static const struct popup_ops usbhost_confirm_ops = {
.name = "usbhost",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = usbhost_show,
.terminate = usbhost_confirm_terminate,
};
static const struct popup_ops usb_error_ops = {
.name = "usb_error",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.content = "IDS_USB_POP_USB_CONNECTION_FAILED",
.left_text = "IDS_COM_SK_OK",
static const struct popup_ops usb_restrict_ops = {
.name = "usb_restrict",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.content = "IDS_ST_POP_SECURITY_POLICY_PREVENTS_USE_OF_DESKTOP_SYNC",
.left_text = "IDS_COM_SK_OK",
static const struct popup_ops storage_mounted_ops = {
.name = "usbotg_storage_mounted",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.title = "IDS_ST_BODY_USB_STORAGE_ABB",
.content = "IDS_USB_BODY_BROWSE_STORAGE_CONNECTED_VIA_USB_Q",
static const struct popup_ops camera_added_ops = {
.name = "usbotg_camera_added",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.title = "IDS_CAM_HEADER_CAMERA_M_APPLICATION",
.content = "IDS_USB_BODY_BROWSE_CAMERA_CONNECTED_VIA_USB_Q",
static const struct popup_ops storage_mount_failed_ops = {
.name = "usbotg_storage_mount_failed",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.title = "IDS_COM_HEADER_ATTENTION",
.content = "IDS_COM_BODY_USB_STORAGE_BLANK_OR_HAS_UNSUPPORTED_FILE_SYSTEM",
static const struct popup_ops watchdog_ops = {
.name = "watchdog",
+ .pattern = FEEDBACK_PATTERN_LOWBATT,
.show = load_simple_popup,
.title = "IDS_CLD_HEADER_NO_RESPONSE",
.get_content = watchdog_get_content,