.features_required = {FEATURE_SCREEN_AUTO_ROTATION}
},
#endif
- #ifdef TBT_MODULE_APP_LOCATION_SERVICE_ENABLED
-
- //Runtime Info
- {
- .name = "Location Status",
- .parent = "Runtime Info",
- .apptype = TBT_APP_LOCATION_SERVICE_ENABLED,
- .icon_name = "dummy",
- .info = "1. <b>Enable/Disable</b> Location from <b>Settings</b> app.<br/>"
- "1. <b>Location is Not Enabled</b> message will be shown if Location is disabled from <b>Settings</b> app.<br/>"
- "2. <b>Location is Enabled</b> message will be shown if Location is enabled from <b>Settings</b> app.<br/>",
- .result = 0,
- .required_features_count = 1,
- .features_required = {FEATURE_LOCATION}
- },
- #endif
#ifdef TBT_MODULE_APP_WIFI_HOTSPOT_ENABLED
//Runtime Info
static void _gps_state_changed_cb(runtime_info_key_e key, void *user_data);
static void _bluetooth_state_changed_cb(runtime_info_key_e key, void *user_data);
static void _rotate_state_changed_cb(runtime_info_key_e key, void *user_data);
-static void _location_state_changed_cb(runtime_info_key_e key, void *user_data);
static void _wifi_state_changed_cb(runtime_info_key_e key, void *user_data);
static void _position_updated_cb(double latitude, double longitude, double altitude, time_t timestamp, void *data);
elm_object_part_content_set(this->view->layout, "info_text", this->info_label);
return this;
}
- else if (this->view->tbt_info->apptype == TBT_APP_LOCATION_SERVICE_ENABLED)
- {
-
- ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED , _location_state_changed_cb, this);
- RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret));
-
- this->info_label = ui_utils_label_add(this->view->layout, "location: ");
- elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD);
-
- if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
- {
- is_not_supported = true;
- Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
- elm_object_text_set(popup, "Location is not supported");
- RETVM_IF(!this->view, NULL,"Location is not supported");
- }
- else
- {
- ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED , &bvalue);
- RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret));
- if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
- {
- is_not_supported = true;
- Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
- elm_object_text_set(popup, "Location is not supported");
- RETVM_IF(!this->view, NULL,"Location is not supported");
- }
- else
- {
- DBG("value: %d", bvalue);
- switch(bvalue)
- {
- case 0:
- ui_utils_label_set_text(this->info_label, "Location Not Enabled", "left");
- break;
-
- case 1:
- ui_utils_label_set_text(this->info_label, "Location is Enabled", "left");
- break;
- }
- }
- }
- elm_object_part_content_set(this->view->layout, "info_text", this->info_label);
- return this;
- }
else if (this->view->tbt_info->apptype == TBT_APP_WIFI_HOTSPOT_ENABLED)
{
ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED , _wifi_state_changed_cb, this);
}
-}
-
-/**
- * @function _location_state_changed_cb
- * @since_tizen 2.3
- * @description location State Changed Cb
- * @parameter runtime_info_key_e key, void *user_data
- * @return static void
- */
-static void _location_state_changed_cb(runtime_info_key_e key, void *user_data)
-{
- RETM_IF(NULL == user_data, "user_data is null");
- int ret;
- bool bvalue;
- runtimeinfo_view *this = NULL;
- this = (runtimeinfo_view*) user_data;
-
- ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED , &bvalue);
- RETM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED,"runtime_info_get_value_int failed :%s",get_runtime_info_error(ret));
- if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
- {
- ui_utils_label_set_text(this->info_label, "Location is not supported", "left");
- return;
- }
-
- DBG("value: %d", bvalue);
-
- switch(bvalue)
- {
- case 0:
- ui_utils_label_set_text(this->info_label, "Location Not Enabled", "left");
- break;
-
- case 1:
- ui_utils_label_set_text(this->info_label, "Location is Enabled", "left");
- break;
- }
-
-
}
/**