radio-settings: handling of dual mode technology preference

Handled two new dual mode technology preferences
"umts,gsm" and "lte,umts".
This commit is contained in:
Antara Borwankar 2019-05-13 14:20:12 +05:30 committed by Denis Kenzior
parent b2e948f8d8
commit 0c2f2815ca
1 changed files with 14 additions and 2 deletions

View File

@ -71,9 +71,15 @@ static const char *radio_access_mode_to_string(enum ofono_radio_access_mode m)
return "umts";
case OFONO_RADIO_ACCESS_MODE_LTE:
return "lte";
default:
return NULL;
}
if (m == (OFONO_RADIO_ACCESS_MODE_UMTS|OFONO_RADIO_ACCESS_MODE_GSM))
return "umts,gsm";
if (m == (OFONO_RADIO_ACCESS_MODE_LTE|OFONO_RADIO_ACCESS_MODE_UMTS))
return "lte,umts";
return NULL;
}
static gboolean radio_access_mode_from_string(const char *str,
@ -92,6 +98,12 @@ static gboolean radio_access_mode_from_string(const char *str,
} else if (g_str_equal(str, "lte")) {
*mode = OFONO_RADIO_ACCESS_MODE_LTE;
return TRUE;
} else if (g_str_equal(str, "umts,gsm")) {
*mode = OFONO_RADIO_ACCESS_MODE_UMTS|OFONO_RADIO_ACCESS_MODE_GSM;
return TRUE;
} else if (g_str_equal(str, "lte,umts")) {
*mode = OFONO_RADIO_ACCESS_MODE_LTE|OFONO_RADIO_ACCESS_MODE_UMTS;
return TRUE;
}
return FALSE;