commit | d2e9669d82a4b65df5069c914fac6a45202a43fe | [log] [tgz] |
---|---|---|
author | Eric Laurent <elaurent@google.com> | Mon Feb 03 14:57:44 2020 -0800 |
committer | Eric Laurent <elaurent@google.com> | Tue Feb 04 14:48:27 2020 -0800 |
tree | ef778967215a02ea1997be35e1853ccbcb890e21 | |
parent | 7bbfd92d84a54a88e585572b15efe58359b09076 [diff] |
AudioService: add restriction on audio mode selection Do not allow an app to change audio mode via AudioManager.setMode() when the mode is already IN_CALL or IN_COMMUNICATION unless: 1) the app has MODIFY_PHONE_STATE permission Or 2) the app is current audio mode owner. Bug: 148368476 Test: manual cell and VoIP calls Test: atest AudioManagerTest#testAccessMode Change-Id: Ieaf3e4355380722529792d2b36413c6b3a16d327