Phone using GPS while the screen is off Recently I noticed that when I press the home or power button to turn my screen on, I notice that the GPS indicator is on for a split second. 
What is happening here? Is there something trying to use the GPS only when the phone is idle? It sounds fishy to me.
Phone: Samsung galaxy s3 mini. Standard rom.
What is running?

On today's Android phones, Google Play Services samples and records your location occasionally, even if you have "location sharing" (what used to be called Latitude) turned off, in order to support a number of use cases:-


It allows apps on the device to define regions in space, and notifies an app if you go into (or out of) a particular region. This way, only Google Play Services needs to be running and checking location, rather than every location-based app on the phone keeping track of your location separately and using power unnecessarily.
It looks at which Wi-Fi hotspots are visible, and sends them periodically to Google, to support the feature of finding "coarse" (less accurate) location without turning on GPS.
It looks at your speed to determine whether you're stationary, walking running, cycling, or driving. Google Now uses this information to show you a "you've walked five miles this week" card, if you turn that on, and the statistics are also made available to other apps, again so that they don't all have to burn battery by tracking location individually.
It samples where you spend time in office hours and the evening so that Google Now can work out where your home and work are, and when you commute. This lets it offer you relevant traffic and weather information, and it tells it when you're travelling away from home to suggest places to visit &amp;c.


Why only when the screen comes on?

This is to do with the way Android power management works. Usually, when the screen is off, your phone is asleep. Apps can't run in this mode: it only does the minimum necessary to keep the device connected to the phone network. Some devices can save power by even turning off the main CPU of the phone, switching to a smaller, more efficient (but slower) CPU while they're asleep.

In this mode, Android tries quite hard to avoid waking up, because each wake-up costs a lot of power. Most apps that run periodically have their run delayed, and all run at once, so as to wake up only once instead of many times. This includes the location sampling discussed above.

When you turn your screen on, the phone has to wake up, so at that point any periodic background tasks that were held back will run straight away. Google Play Services isn't trying to use the GPS only when the phone is idle: it just runs for that split second when the phone wakes up.