I have an app that connects to an external piece of hardware via USB and communicates using ptp. In Android 6 this app would automatically start when connected to the hardware. The very first time you opened the app a window pops up that asks "Choose an app for the USB Device." I would select the right app and click "Always". From then on the app would start automatically when connected to the hardware.
This behavior changed in Android 7.0. Now the app no longer starts automatically. Instead when I plug in the hardware a small USB icon appears in the top left of the screen. After opening the notification drawer there is a notification that reads:
"Android System Connected to USB Function Filesystem Tap to view files"
Only after tapping this notification will my app open. This happens every time I connect my hardware. I want to disable this notification so my app continues to open automatically. How can I disable this notification?