We still don't have much solid information about the next release of Android — we've heard that Android P could have some notch optimizations and that access to undocumented APIs could get blocked, but we don't really know too much more than that. However, the open-source nature of Android means that we can sometimes get a glimpse of what the next release of Android might have in store.
As spotted by XDA Developers, a recent commit on AOSP appears to indicate that Android P could implement a rule that would prevent background apps from accessing the camera. The rule will be applied to apps' User IDs (UID), which are unique identifiers that Android associates to each application when it's installed. Whenever a UID becomes idle — like when a device goes into Doze mode — Android will block off its access to the camera.
The possibility that a malicious app could have access to a device's camera without the user's knowledge is certainly concerning. That's why, on most laptops, there's usually a little light next to the webcam that turns on whenever it's in use. On phones and tablets, however, there's no such physical indicator, so it can sometimes be hard to know that a device's camera is actively being used.
Last year, Android Oreo began to address that privacy concern by displaying an "app is running in the background" notification in several situations, including when the camera is in use. Unfortunately, users disliked the constant notifications so much that many chose to either ignore them or attempt to disable them entirely, thereby voiding any potential privacy gains. Thus, by natively blocking background apps from accessing the camera altogether, most users' privacy will arguably be much better safeguarded, and situations such as the one demonstrated by developer Szymon Sidor in 2014 won't be possible anymore.
Of course, this change might also have an impact on apps that fairly rely on covertly capturing images, such as the Cerberus anti-theft app, unless they are whitelisted from Doze. There are certainly more questions surrounding the consequences of this change, and we'll be interested in hearing more about them in a few months at Google I/O 2018.
As spotted by XDA Developers, it looks like Android P will also block idle background apps from accessing the microphone. Needless to say, the possibility that an app could be recording users without their knowledge — as long as it had, at some point, been granted permission to access the microphone — is a gross violation of privacy. Of course, there are some situations where you might actually want an app to continue recording audio while in the background, so hopefully they'll be some way to allow for that in Android P.
- XDA Developers