Android P is expected to be Google's next upgrade for its popular mobile operating system. While we might still be a few months away from the launch - most likely around Google's I/O event - source code commits have surfaced online describing a few key features of Android P. Two of these source code commits are of particular interest as they restrict background apps on the OS from accessing your device's microphone and camera while running in the background.
Commits from the Android Open Source Project (AOSP), first spotted by XDA Developers, have been found to restrict specific access for third-party apps running on Android P-powered devices. The first one prevents apps running in background from accessing the camera. It will work by targeting UIDs or User IDs that are assigned to each application, by Google, when it is installed on the device. The camera app on Android P will detect which UIDs are in "idle" state and block access to them accordingly. Add to that, subsequent camera requests are also expected to be denied even if access has been provided at the time of installation.
On the other hand, Android P will also block apps in "idle" state from accessing the microphone. In both cases, the software will send errors to the apps in case of access requests received when they are running in the background.
The report claims that Google has been building a foundation for these features since Android 6.0 Marshmallow, which favoured apps that had "foreground and user-visible activities". Several reports in the past have alleged that Android apps are making use of background access to procure unsolicited photos and audio from unsuspecting users. This feature's rollout, if indeed authentic, will help restrict it majorly.