Use RECEIVER_EXPORTED for USB system broadcasts on API 34+
This commit is contained in:
parent
11ba8f3b8f
commit
2dd3f00de4
1 changed files with 2 additions and 2 deletions
|
|
@ -116,9 +116,9 @@ class SettingsActivity : AppCompatActivity() {
|
|||
|
||||
findViewById<TextView>(R.id.buildNumber).text = "Buildnummer: ${BuildConfig.BUILD_NUMBER}"
|
||||
|
||||
registerReceiver(usbAttachedReceiver, IntentFilter(UsbManager.ACTION_USB_DEVICE_ATTACHED), Context.RECEIVER_NOT_EXPORTED)
|
||||
registerReceiver(usbAttachedReceiver, IntentFilter(UsbManager.ACTION_USB_DEVICE_ATTACHED), Context.RECEIVER_EXPORTED)
|
||||
registerReceiver(usbPermissionReceiver, IntentFilter(ACTION_USB_PERMISSION), Context.RECEIVER_NOT_EXPORTED)
|
||||
registerReceiver(usbDetachedReceiver, IntentFilter(UsbManager.ACTION_USB_DEVICE_DETACHED), Context.RECEIVER_NOT_EXPORTED)
|
||||
registerReceiver(usbDetachedReceiver, IntentFilter(UsbManager.ACTION_USB_DEVICE_DETACHED), Context.RECEIVER_EXPORTED)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue