Loading
Fix thirt party app security exception when call to AudioManager.setMicrophoneMute()
In the current master code, AudioManager.ACTION_MICROPHONE_MUTE_CHANGED is broadcasted too all users inside setMicrophoneMuteNoCallerCheck(). This causes the third party application needs system permission android.permission.INTERACT_ACROSS_USERS_FULL or android.permission.INTERACT_ACROSS_USERS. Third party application just want to turn on/off microphone but not about broadcast intent. So we should move broadcast intent code to AudioService itself. Therefore, broadcast message to main thread handler to broadcast intent to avoid security exception. Bug: 145388173 Test: Write a simple test APP to call to AudioManager.AudioManager.setMicrophoneMute(). Change-Id: I44cebc9e6e21c1ee0c59125ee702b7093ad38a63