The threat of someone hijacking your phone’s camera to spy on you unawares is sometimes overstated, but it’s definitely a possibility. Enough so, in fact, that Google is determined to do something about it. Recently discovered code submissions show that Android P should prevent idle apps from using both the camera and microphone. If an inactive program tries to use the camera, Android should shut it off and give you an error message. With the microphone, it’s somewhat different: it’ll allow recording but report empty data until the app is active. Malware wouldn’t get away with recording in the background, but legitimate apps like a voice chat client (which stays active) shouldn’t have an issue.
Google hasn’t even announced Android P, so it could be a while before you hear about these measures in any formal capacity (provided they make the cut). However, its engineers aren’t shy about the goal: this is designed to “protect user privacy.” Creeps and spies couldn’t just trick you into installing an app that records you without permission — they’d have to either find a way to fool Android or change its system-level behavior. We’d be loathe to presume this will make stealthy snooping impossible, but it’ll definitely require more work.