Last month, a series of AOSP commits revealed that the next release of Android would block apps in the background from using the camera or microphone. It's a bit surprising that this feature didn't already exist, but recent privacy concerns (like the theory about Facebook listening to users) may have pushed Google to implement it.

As expected, the feature is officially part of Android P; idle applications can no longer access the microphone, camera, or device sensors. For apps running in the background, the microphone will report empty audio and all sensor events will stop firing. Applications attempting to use the camera while idle will receive system errors, so it's possible that this change may break some improperly-developed apps.

This is definitely one of my favorite additions in Android P. Even though most mainstream apps probably aren't recording sensor/camera/mic data in the background, this definitive block will give users some peace of mind.