Android has been combating mischievous apps that run in the background for several years. It started with showing you a notification each time an app did something in the background, and with the first P developer preview, a tighter control was put in place for idle apps (different from background apps) to stop them from using the microphone or camera. But there's one more change coming with Android P, as seen in the screenshot above.

If a background app uses either the camera or microphone, Android will show the notification to let you know that app is running but it will also display a camera and/or microphone icon to clearly tell you which hardware elements or sensors it's using. Since I haven't tested P DP1, I can't tell if this is new to DP2 or if it was there already with DP1, but it's still a new Android P feature that we didn't see in Oreo.

I'm liking this level of transparency in the system. If an app is abusing its camera or microphone permissions and doing something it shouldn't be, now you can see it.