summaryrefslogtreecommitdiff
path: root/lib-phone/ph-dialer/src/PhDialerSpeeddialPopup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib-phone/ph-dialer/src/PhDialerSpeeddialPopup.cpp')
-rw-r--r--lib-phone/ph-dialer/src/PhDialerSpeeddialPopup.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/lib-phone/ph-dialer/src/PhDialerSpeeddialPopup.cpp b/lib-phone/ph-dialer/src/PhDialerSpeeddialPopup.cpp
index 83fbd52..66f012e 100644
--- a/lib-phone/ph-dialer/src/PhDialerSpeeddialPopup.cpp
+++ b/lib-phone/ph-dialer/src/PhDialerSpeeddialPopup.cpp
@@ -57,12 +57,11 @@ void PhDialerSpeeddialPopup::onPickResult(app_control_h request, app_control_h r
{
PhDialerSpeeddialPopup *popup = (PhDialerSpeeddialPopup*) data;
- char **numberIds = 0;
- int count = 0;
- int err = app_control_get_extra_data_array(reply, APP_CONTROL_DATA_SELECTED, &numberIds, &count);
+ char *value = 0;
+ int err = app_control_get_extra_data(reply, APP_CONTROL_DATA_SELECTED, &value);
WPWARN(err != APP_CONTROL_ERROR_NONE, "app_control_get_extra_data() failed(0x%x)", err);
- if (numberIds && numberIds[0]) {
- int numberId = atoi(numberIds[0]);
+ if (value) {
+ int numberId = atoi(value);
if (numberId > 0) {
if (PhCommon::addSpeedDialNumber(popup->m_SpeedNumber, numberId)) {
notification_status_message_post(T_("IDS_KPD_TPOP_SPEED_DIAL_NUMBER_ASSIGNED"));
@@ -70,12 +69,9 @@ void PhDialerSpeeddialPopup::onPickResult(app_control_h request, app_control_h r
notification_status_message_post(T_("IDS_PB_POP_ALREADY_EXISTS_LC"));
}
}
- }
- for (int i = 0; i < count; ++i) {
- free(numberIds[i]);
+ free(value);
}
- free(numberIds);
popup->destroy();
}