Android P will stop apps from silently using your phone's camera and mic

Video: Google updates Pay app for Android
ANDROID SECURITY
The next version of Google's mobile operating system, Android P, looks set include new privacy protections that prevent apps from abusing a phone's camera and microphone.
XDA-Developers has spotted two commits for Android P in the Android Open Source Project (AOSP) that are intended to constrain apps idling in the background from accessing sensitive features on a device, such as the microphone and camera.
Once an app has run in the background for a certain amount of time, it should not be able to use the camera, AOSP developers note.
A second policy notes that if app is an "idle state we don't allow recording to protect user's privacy".
The two controls address cases where a person has given an app permission to use the camera or microphone, but wouldn't expect the app to tap these features when they're idling in the background. Once the app becomes active again, it will have access to the sensors.
The privacy measures do address real threats to privacy from, for example, marketing firms that provide plugins for apps to detect audio signals in TV shows and movies to target ads.
Besides marketeers, Android spyware apps often silently access the camera and mic. Google last year took down several apps from Google Play that were capable of stealthily recording and transmitting ambient sounds, and taking pictures from infected devices.
Researchers from Kaspersky Lab in January discovered commercially sold Android spyware that uses background services to hide activity, including recording audio, capturing photos and videos, and stealing call records and text messages.
Previous and related coverage
US warns against Android apps that secretly listen in on your TV habits
Google stops the spread of Tizi Android malware in the Play Store
Android security: This newly discovered snooping tool has remarkable spying abilities: TechRepublic
The mobile malware can steal WhatsApp messages, eavesdrop on targets based on GPS coordinates, and more.