diff options
author | Jiyoung Yun <jy910.yun@samsung.com> | 2015-02-24 19:08:05 +0900 |
---|---|---|
committer | Jiyoung Yun <jy910.yun@samsung.com> | 2015-02-24 19:08:05 +0900 |
commit | ee16b8e1929be48ccb750134ce5426d578674240 (patch) | |
tree | b61fd523898eafcac87339bf0acbfe83fe7fa9f2 | |
parent | 969be903dd0479813c2147500a1a2585966d31c6 (diff) | |
download | deviced-ee16b8e1929be48ccb750134ce5426d578674240.tar.gz deviced-ee16b8e1929be48ccb750134ce5426d578674240.tar.bz2 deviced-ee16b8e1929be48ccb750134ce5426d578674240.zip |
deviced: Set vconf as NOTSUP error in no battery modelsubmit/tizen/20150226.021716accepted/tizen/wearable/20150226.095552accepted/tizen/tv/20150226.094323accepted/tizen/mobile/20150226.100235accepted/tizen/common/20150226.084940
Runtime-info and Capi-system-device api uses battery vconf
to get battery status.
So if there is no battery in target, deviced set vconf as -ENOTSUP value.
Change-Id: I9fe23fb6671493394a02ff5b4c7d8a91437e48fe
Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
-rw-r--r-- | src/battery/lowbat-handler.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/battery/lowbat-handler.c b/src/battery/lowbat-handler.c index 8e19789e..52baa79c 100644 --- a/src/battery/lowbat-handler.c +++ b/src/battery/lowbat-handler.c @@ -520,6 +520,14 @@ static int lowbat_probe(void *data) * deviced does not activate a battery module. */ if (access(POWER_PATH, R_OK) != 0) { + /** + * Set battery vconf as -ENOTSUP + * These vconf key used by runtime-info and capi-system-device. + */ + vconf_set_int(VCONFKEY_SYSMAN_CHARGER_STATUS, -ENOTSUP); + vconf_set_int(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW, -ENOTSUP); + vconf_set_int(VCONFKEY_SYSMAN_BATTERY_LEVEL_STATUS, -ENOTSUP); + _E("there is no power-supply class"); return -ENODEV; } |