g_free(screen);
}
-static void sim_signal_handler(GDBusConnection *conn,
- const gchar *sender,
- const gchar *path,
- const gchar *iface,
- const gchar *name,
- GVariant *param,
- gpointer data)
-{
- int ret, val;
- static int state = false;
-
- ret = vconf_get_bool(VCONFKEY_LCD_BRIGHTNESS_INIT, &state);
- if (ret < 0 || state) {
- _E("Failed to get %s", VCONFKEY_LCD_BRIGHTNESS_INIT);
- return;
- }
-
- g_variant_get(param, "(i)", &val);
-
- if (val != SIM_CARD_NOT_PRESENT) {
- state = true;
- ret = vconf_set_bool(VCONFKEY_LCD_BRIGHTNESS_INIT, state);
- if (ret < 0)
- _E("Failed to set vconf value for lcd brightness: %d", vconf_get_ext_errno());
- ret = vconf_set_int(VCONFKEY_SETAPPL_LCD_BRIGHTNESS, display_conf.pm_default_brightness);
- if (ret < 0)
- _E("Failed to set vconf value for lcd brightness: %d", vconf_get_ext_errno());
- backlight_ops.set_brightness(display_conf.pm_default_brightness);
- _I("SIM card is inserted at first.");
- }
-}
-
static void changestate_signal_handler(GDBusConnection *conn,
const gchar *sender,
const gchar *path,
if (ret < 0)
_E("fail to init dbus method(%d)", ret);
-#ifndef MICRO_DD
- ret = subscribe_dbus_signal(NULL,
- TELEPHONY_PATH,
- TELEPHONY_INTERFACE_SIM,
- SIGNAL_SIM_STATUS,
- sim_signal_handler,
- NULL, NULL);
- if (ret <= 0)
- _E("Failed to register signal handler: %d", ret);
-#endif
-
ret = subscribe_dbus_signal(NULL,
DEVICED_OBJECT_PATH,
DEVICED_INTERFACE_NAME,