update vconf status of charge now
authorgiyeol.ok <giyeol.ok@samsung.com>
Tue, 14 May 2013 01:28:28 +0000 (10:28 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Tue, 13 Aug 2013 06:08:30 +0000 (06:08 +0000)
Signed-off-by: giyeol.ok <giyeol.ok@samsung.com>
Change-Id: Ibf5efd18008705052665302fcc1d76fb367636ff

src/ta/ta-handler.c

index 3d0cb24..927dafb 100644 (file)
@@ -30,6 +30,7 @@
 static void ta_init(void *data)
 {
        int val, i = 0;
+       int ret;
 
        if (device_get_property(DEVICE_TYPE_EXTCON, PROP_EXTCON_TA_ONLINE, &val) != 0)
                return;
@@ -47,6 +48,10 @@ static void ta_init(void *data)
                vconf_set_int(VCONFKEY_SYSMAN_CHARGER_STATUS,
                                VCONFKEY_SYSMAN_CHARGER_DISCONNECTED);
        }
+       ret = device_get_property(DEVICE_TYPE_POWER,
+               PROP_POWER_CHARGE_NOW, &val);
+       if (ret == 0)
+               vconf_set_int(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW, val);
 }
 
 const struct device_ops ta_device_ops = {