I'm reading deep into Location-related components in Android Open Source Project. When I read the source code of Location Engine (https://android.googlesource.com/platform/hardware/qcom/gps/+/android-5.0.0_r2/loc_api/libloc_api_50001/loc_eng.cpp), I realize that there is a lot of functions call the sendMsg() method of the LocEngAdapter class. For example, the following code (from line 1757 to 1769):
int loc_eng_start(loc_eng_data_s_type &loc_eng_data){
ENTRY_LOG_CALLFLOW();
INIT_CHECK(loc_eng_data.adapter, return -1);
if(! loc_eng_data.adapter->getUlpProxy()->sendStartFix(){
loc_eng_data.adapter->sendMsg(new LocEngStartFix(loc_eng_data.adapter));
}
EXIT_LOG(%d, 0);
return 0;
}
I go deeper into this function and noticed that it will call the msg_q_snd() function found in the msg_q.c file (https://android.googlesource.com/platform/hardware/qcom/gps/+/android-5.0.0_r2/utils/msg_q.c), from line 185 to 221. And I just see this function only pushing messages into a created message queue. Can anyone tell me how messages are sent and where to receive those messages? If possible please provide me the source code part describing those things
Thank you so much, everyone!