Disable USB Audio Routing Programmaticaly

78 views
Skip to first unread message

PW

unread,
Dec 18, 2017, 3:48:42 PM12/18/17
to android-porting
Hi, I'm wondering if there is a way to disable USB AUDIO ROUTING on nougat. I did it in lower api via reflection and setwireddeviceconnectionstate. This however doesn't seem to want to work on nougat and i'm not sure if the reflection has changed at all.

I want exclusive access on USB output and do not want system notifications to go via USB as they interrupt the signal.

Thanks

Glenn Kasten

unread,
Dec 29, 2017, 1:04:41 PM12/29/17
to android-porting
At one time there was a setting for this, and there may still be but I seem to recall it has suffered from bit rot and does not work as well as it used to.
Search source code in frameworks/base and packages/apps/Settings for all references to the symbol
USB_AUDIO_AUTOMATIC_ROUTING_DISABLED and then follow the bread crumbs from there.
Please update here with anything you find, as I am curious too.
Reply all
Reply to author
Forward
0 new messages