Objective
welcome everyone I share and recommend useful code Snippets ~ ~
Statement
Welcome reprint, but please keep the original source of the article:
CSDN:http://www.csdn.net
rainy season o mo away:http://blog.csdn.net/luckkof
Body
after the KK GMs is provisioned, the system positioning function is turned on, and apps such as Google Maps can't be located on the networkthere are two parts to confirm:1.system to provide Locationprovider application needs to be affirmed,The KK GMs integrates the functionality of the NetworkLocation application into the Gmscore (Google Play Service), so you need to add Gmscore PackageName in:
Framework/base/core/res/res/values/config.xml
<string-array name= "Config_locationproviderpackagenames" translatable= "false" >
<!--the standard AOSP fused location provider-
<item>com.android.location.fused</item>
<!--MTK Add for GMS--
<item>com.google.android.location</item>
<item>com.google.android.gms</item>
<!--MTK Add end--
</string-array>
2.GMS4.4_R3 (contains R3) after the version can still exist under 1 conditions can not use the network location function, please continue to follow the following modifications:
Please modify the following function in the ALPS\EXTERNAL\WPA_SUPPLICANT_8\WPA_SUPPLICANT\BSS.C
static void Wpa_bss_copy_res ( struct WPA_BSS *dst, struct wpa_scan_res *src,
struct os_time *fetch_ Time)
{
struct timespec ts;//add this line;
dst->flags = src->flags;
os_memcpy (Dst->bssid, Src->bssid, Eth_alen);
dst->freq = src->freq;
dst->beacon_int = src->beacon_int;
dst->caps = src->caps;
dst->qual = src->qual;
dst->noise = src->noise;
dst->level = src->level;
/* DST->TSF = src->tsf;*///delete this line
Add below Code
if (Clock_gettime (Clock_monotonic, &ts)! = 0)
DST->TSF = src->tsf;
Else
DST->TSF = ts.tv_sec*1000000 + ts.tv_nsec/1000;
End
Calculate_update_time (Fetch_time, Src->age, &dst->last_update);
}
If you are compiling the module for validation, do so first./MK &project_name mm External/wpa_supplicant_8/wpa_supplicant
Push the alps/out/target/product/project_name/system/bin/wpa_supplicant to system/bin/and execute the command
ADB shell chmod 755 system/bin/wpa_supplicant
Verify after rebooting the system
Thank you!