A commit points out that in the upcoming version of Android, Google is building a feature that prevents access to devices’ cameras while the app is running in the background. It seems that this should prevent abuse by malware.
The commit appeared in Android Open Source Project code, XDA-Developers noted. If an app has not been in the foreground for a while, the app will receive an error back from the camera. If an app in the background wants to access the camera, it will immediately receive an error message. All apps can handle those errors, so there are no problems to be expected, according to the commit. The restriction also works if users have given permission to use the camera.
The measure should better safeguard user privacy in Android, as malware sometimes wants to use the camera without letting users know. That makes it possible to spy on users or their environment.
The limitation is presumably in the next version of Android, which Google will probably first refer to as Android P. In recent years, Google has released a first developer preview of a new Android version in March.