static void ime_app_prediction_hint_set_cb(const char *prediction_hint, void *user_data)
{
- LOGD("prediction hint : %s\n", prediction_hint);
char *sender = "mms";
char *caller_id = "mms";
char *hint = (char *)prediction_hint;
- input_smartreply_init(caller_id, sender, hint);
- input_smartreply_set_notify(_input_smartreply_notify_cb, NULL);
- if (input_smartreply_is_enabled())
- input_smartreply_get_reply_async();
+ if (!prediction_hint) return;
+ LOGD("prediction hint : %s\n", prediction_hint);
+
+ if (strlen(prediction_hint) > 0) {
+ input_smartreply_init(caller_id, sender, hint);
+ input_smartreply_set_notify(_input_smartreply_notify_cb, NULL);
+
+ if (input_smartreply_is_enabled())
+ input_smartreply_get_reply_async();
+ }
}
static void ime_app_mime_type_set_cb(const char *mime_types, void *user_data)