From d6c87927692d41305be7fd5f94c967911180c7d1 Mon Sep 17 00:00:00 2001 From: Tushar Janefalkar Date: Tue, 9 Oct 2012 15:03:19 -0700 Subject: [PATCH] Remove interpretation of LPP config parameter Instead of having a switch case that sets bits in the lppconfig mask, the mask is assigned whatever value was read from gps.conf. The advantage of this being that if in the future additional bits are added in lppconfig, there need not be a code change; only comments in gps.conf have to be updated to inform the correct value for those additional bits CRs-Fixed: 406969 Change-Id: I979151b44cd85e98b59b4586fdd49e20a7d7c82b --- loc_api/loc_api_v02/LocApiV02Adapter.cpp | 25 +----------------------- 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/loc_api/loc_api_v02/LocApiV02Adapter.cpp b/loc_api/loc_api_v02/LocApiV02Adapter.cpp index 63eeb6c4..4c7b7124 100755 --- a/loc_api/loc_api_v02/LocApiV02Adapter.cpp +++ b/loc_api/loc_api_v02/LocApiV02Adapter.cpp @@ -1185,31 +1185,8 @@ enum loc_api_adapter_err LocApiV02Adapter :: setLPPConfig(uint32_t profile) memset(&lpp_config_ind, 0, sizeof(lpp_config_ind)); lpp_config_req.lppConfig_valid = 1; - // Default RRLP or User or Control plane configuration - switch(profile) - { - /* RRLP */ - case 0: - lpp_config_req.lppConfig = profile; - break; - /* User plane */ - case 1: - lpp_config_req.lppConfig = QMI_LOC_LPP_CONFIG_ENABLE_USER_PLANE_V02; - break; - - case 2: - lpp_config_req.lppConfig = QMI_LOC_LPP_CONFIG_ENABLE_CONTROL_PLANE_V02; - break; - - default: - LOC_LOGE("%s:%d]: Invalid LPP Profile Config Setting Provided in gps.conf = %d!", - __FUNCTION__, - __LINE__, - profile); - return LOC_API_ADAPTER_ERR_INVALID_PARAMETER; - break; - } + lpp_config_req.lppConfig = profile; req_union.pSetProtocolConfigParametersReq = &lpp_config_req;