[audio] Avoid startOp when restrictions in place
When AppOp restrictions are in place, starting an op will return SOFT_DENY, but leave the op in a paused state, which can restart unexpectedly when the restriction is removed (despite no data delivery occurring). Work around this by first checking if recording is restricted, and avoiding the start call in that case. Test: manual: start and stop recording with toggle restriction Test: atest CtsMediaAudioPermissionTestCases Fixes: 399138369 Bug: 293603271 Flag: EXEMPT bugfix Change-Id: I3439f6d5fd732ba24cb82c6b744d5665ab9b7827
Loading
Please register or sign in to comment