+ conn = _get_system_conn();
+ if (conn == NULL)
+ return;
+
+ msg = g_dbus_message_new_method_call(DEVICED_DBUS_PATH,
+ DEVICED_DBUS_OBJECT_PATH,
+ DEVICED_DBUS_INTERFACE_NAME,
+ "lockstate");
+ if (msg == NULL) {
+ ERR("g_dbus_message_new_method_call() has failed");
+ return;
+ }
+
+ g_dbus_message_set_body(msg, g_variant_new("(sssi)", "lcdoff",
+ "staycurstate", "NULL", 0));
+ if (!g_dbus_connection_send_message(conn, msg,
+ G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, &err)) {
+ ERR("Unable to send dbus message for acquring lock as %s",
+ err->message);
+ ret = -1;
+ }
+
+ if (ret == 0)