Introducing Android P the next major version of Android includes new rules that can prevent accessing the camera and Microphone. The new rule ensures that malicious apps will not take any pictures in the background when your screen is off. Android P still in development, possibly it will be released in Google I/O developer conference this year 16-18 May 2018. If an app in an idle. state tries to use the camera we immediately generate an error. The Android P includes more customization when compared to earlier versions of the Android operating system.”]
Source: https://gbhackers.com/android-p-limits-background-apps/