[DO NOT MERGE] Keep track of audio recordings that are silenced
Sometimes, an app will have an active App Op for recording, but it is silenced (for example, after a while being in background). This means they cannot get the recording audio stream. This change keeps track of that and prevents them from being considered as actively using AppOpsManager.OP_RECORD_AUDIO from SystemUI's perspective. It does two things: - If a particular UID has any of its AudioRecordingConfigurations as silenced, it will be marked as paused and an inactive update will be sent to listeners of AppOpsController. When the recording stops being silent, an active update will be sent. - When getting the list of active items, paused ones will be filtered out. Test: manual with recording app Test: atest AppOpsControllerTest Bug: 162552566 Change-Id: I72fbebf4b37b799907855d57e6c615c244b63999
Loading
Please register or sign in to comment