GPS Battery Drain - LocationManagerService
Some users report about getting a quick battery drain in few hours. They have not installed any new apps that would have caused it.
It was noticed that phone was getting extremely warm in my pocket. Battery was almost completely discharged and went in to look at what caused the battery to drain so fast.
Top app on the stock Android battery usage settings was normal apps like Facebook, Twitter or Weather.
Using Better Battery Stats under partial wakelocks, the top two battery drainers were "NLP PendingIntent client in com.google.android.googlequicksearchbox" (Maps) and "LocationManagerService".
The real issue is the functionality of LocationManagerService.
Newly installed app might have requested location updates with a frequency of few seconds, thus keeping the device busy.
Instead of requesting a "partial wakelock" with an appropriate auto-timeout, it might have requested a permanent one, which it needs to release explicitly.
If now this app crashed, the wakelock gets orphaned, the request for location updates remains, and reboot can resolve this problem.
The WiFi backend is also a passive listener for location updates so that it can get GPS locations when other apps enable the GPS.
So it should not be using very much power if the GPS is actually off.
It uses system resources when it gets a GPS update and scan for WiFi/WLAN APs and do some calculations to see if it needs to update its database.
In addition, apps that request GPS data usually request location information from all sources so they are likely to be requesting network based location through UnifiedNLP or GmsCore.