From f21e0f8d390f26f5307f4253c04f3d206105a159 Mon Sep 17 00:00:00 2001 From: Aayush Gupta Date: Thu, 19 Sep 2024 11:52:12 +0530 Subject: [PATCH] UsbIntentReceiver: Specify parcel's type in method as well The current method has been deprecated Signed-off-by: Aayush Gupta --- .../main/java/com/stevesoltys/seedvault/UsbIntentReceiver.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()