Can I silently granting USB peripheral permissions to an app without prompting the user

Which version of system do you use? Khadas official images, self built images, or others?

Khadas official images Android 11

Please describe your issue below:

Can I silently granting USB peripheral ( Thermal USB printer) permissions to an app without prompting the user?

@pinij
You can configure the value of config.disableUsbPermissionDialogs.
File path:frameworks/base/core/res/res/values/config.xml