diff --git a/app/src/main/java/com/stevesoltys/seedvault/UsbIntentReceiver.kt b/app/src/main/java/com/stevesoltys/seedvault/UsbIntentReceiver.kt index 418f795f..3ad9afb3 100644 --- a/app/src/main/java/com/stevesoltys/seedvault/UsbIntentReceiver.kt +++ b/app/src/main/java/com/stevesoltys/seedvault/UsbIntentReceiver.kt @@ -76,7 +76,7 @@ abstract class UsbMonitor : BroadcastReceiver() { if (intent.action == ACTION_USB_DEVICE_ATTACHED || intent.action == ACTION_USB_DEVICE_DETACHED ) { - val device = intent.extras?.getParcelable(EXTRA_DEVICE) ?: return + val device = intent.extras?.getParcelable(EXTRA_DEVICE, UsbDevice::class.java) ?: return Log.d(TAG, "New USB mass-storage device attached.") device.log()