merge with master
[apps/home/settings.git] / setting-about / src / setting-about-main.c
index 93d481b..01a17b1 100755 (executable)
@@ -313,12 +313,18 @@ void setting_about_main_get_wifi_mac_address_string(char *str, int size)
 void setting_about_main_get_battery_string(char *str, int size)
 {
        setting_retm_if(str == NULL, "str parameter is NULL");
+       struct stat fileAttrs;
 
        int val = -1;
        char file[MAX_DISPLAY_STR_LEN_ON_PHONE_INFO] = { 0, };
        snprintf(file, MAX_DISPLAY_STR_LEN_ON_PHONE_INFO,
                 "%s/%s/%s", SETTING_ABOUT_POWER_SUPPLY_PATH, "battery", "capacity");
 
+       /* If Samsung battery not found, check if this is PR3 */
+       if (stat(file, &fileAttrs) < 0)
+               snprintf(file, MAX_DISPLAY_STR_LEN_ON_PHONE_INFO,
+                  "%s/%s/%s", SETTING_ABOUT_POWER_SUPPLY_PATH, "max170xx_battery", "capacity");
+
        char buf[MAX_DISPLAY_STR_LEN_ON_PHONE_INFO] = { 0, };
        int fd = 0;
        int r = 0;