<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="setting-common"/>
<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="vconf"/>
<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="SLP-tapi"/>
- <listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="call-manager"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1513313394" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
void setting_network_mptcp_enable(void *data, bool enable);
setting_network_mptcp_state_t setting_network_is_mptcp_enabled(void *data);
+bool is_call_status_idle(void);
+
#endif /* __SETTING_NETWORK_H__ */
*
*/
-#include <call-manager.h>
-#include <setting-network.h>
+#include "setting-network.h"
#include "setting-network-mode.h"
static int _view_create(void *cb);
SETTING_TRACE_BEGIN;
int value = 0;
int err = 0;
- cm_call_status_e call_status = CM_CALL_STATUS_IDLE;
- cm_client_h cm_handle = NULL;
- cm_init(&cm_handle);
- cm_get_call_status(cm_handle, &call_status);
- cm_deinit(cm_handle);
- if (CM_CALL_STATUS_IDLE != call_status) {
+ bool is_idle = is_call_status_idle();
+ if (!is_idle) {
setting_create_popup(s_info.ad, s_info.ad->md.window, NULL, _("IDS_CST_POP_OPERATION_NOT_ALLOWED_DURING_CALLS"), NULL, 0, false, false, 0);
return;
}
*
*/
-#include <call-manager.h>
#include "setting-network-service-providers.h"
const char *STR_SETTING_OPERATION_FAILED = "IDS_BT_POP_OPERATION_FAILED";
int select_network_show(SettingNetwork *ad)
{
SETTING_TRACE_BEGIN;
- cm_call_status_e call_status = CM_CALL_STATUS_IDLE;
- cm_client_h cm_handle = NULL;
- cm_init(&cm_handle);
- cm_get_call_status(cm_handle, &call_status);
- cm_deinit(cm_handle);
- if (CM_CALL_STATUS_IDLE != call_status) {
+ bool is_idle = is_call_status_idle();
+ if (!is_idle) {
setting_create_popup(s_info.ad, s_info.ad->md.window, NULL, _("IDS_CST_POP_OPERATION_NOT_ALLOWED_DURING_CALLS"), NULL, 0, false, false, 0);
return SETTING_GENERAL_ERR_NULL_DATA_PARAMETER;
}
* limitations under the License.
*
*/
+
+#include <telephony.h>
#include <setting-network.h>
#include <setting-debug.h>
#include <setting-cfg.h>
return state ? SETTING_NETWORK_MPTCP_ENABLED : SETTING_NETWORK_MPTCP_DISABLED;
}
+
+bool is_call_status_idle(void)
+{
+ unsigned int i = 0;
+ unsigned int j = 0;
+ unsigned int call_list_count = 0;
+ telephony_handle_list_s handle_list;
+ telephony_call_h *call_list;
+ telephony_call_status_e status = TELEPHONY_CALL_STATUS_IDLE;
+ bool to_return = true;
+
+
+ int err = telephony_init(&handle_list);
+ if (err != TELEPHONY_ERROR_NONE) {
+ SETTING_TRACE_ERROR("Function telephony_init() failed. Error: %s", get_error_message(err));
+ return false;
+ }
+
+ for (i = 0; i < handle_list.count; ++i) {
+ err = telephony_call_get_call_list(handle_list.handle[i], &call_list_count, &call_list);
+ if (err != TELEPHONY_ERROR_NONE) {
+ SETTING_TRACE_ERROR("Function telephony_call_get_call_list() failed. Error: %s", get_error_message(err));
+ continue;
+ }
+
+ for (j = 0; j < call_list_count; ++j) {
+ err = telephony_call_get_status(call_list[j], &status);
+ if (err != TELEPHONY_ERROR_NONE) {
+ SETTING_TRACE_ERROR("Function telephony_call_get_status() failed. Error: %s", get_error_message(err));
+ continue;
+ }
+
+ if (status != TELEPHONY_CALL_STATUS_IDLE) {
+ to_return = false;
+ break;
+ }
+ }
+
+ err = telephony_call_release_call_list(call_list_count, &call_list);
+ if (err != TELEPHONY_ERROR_NONE) {
+ SETTING_TRACE_ERROR("Function telephony_call_release_call_list() failed. Error: %s", get_error_message(err));
+ }
+
+ if (to_return == false) {
+ break;
+ }
+ }
+
+
+ err = telephony_deinit(&handle_list);
+ if (err != TELEPHONY_ERROR_NONE) {
+ SETTING_TRACE_ERROR("Function telephony_deinit() failed. Error: %s", get_error_message(err));
+ return false;
+ }
+
+ return to_return;
+}