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;