static int g_rec_dev_state_changed_cb_id;
static GDBusConnection *g_rec_dev_state_changed_cb_conn;
static guint g_rec_dev_state_changed_cb_subscribe_id;
-static recorder_device_state_e g_rec_dev_last_state;
static void __recorder_device_state_changed_cb(GDBusConnection *connection,
goto _DONE;
}
- /* get device and state */
+ /* get device type and state */
g_variant_get(param, "(i)", &value);
- /* get type only from message */
type = value >> 16;
-
- if (recorder_get_device_state(type, &state) != RECORDER_ERROR_NONE) {
- LOGE("failed to get recorder device state");
- goto _DONE;
- }
+ state = 0x0000ffff & value;
LOGD("type %d, state %d", type, state);
- if (state == g_rec_dev_last_state) {
- LOGW("no need to call recorder device state changed cb [state %d]", state);
- goto _DONE;
- }
-
- g_rec_dev_last_state = state;
-
tmp_list = g_rec_dev_state_changed_cb_list;
do {
return ret;
}
- g_rec_dev_last_state = state;
-
info = g_new0(recorder_cb_info, 1);
if (!info) {
LOGE("info failed");