UsbIntentReceiver: Specify parcel's type in method as well

The current method has been deprecated

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta 2024-09-19 11:52:12 +05:30
parent 5365ef3a5e
commit f21e0f8d39

View file

@ -76,7 +76,7 @@ abstract class UsbMonitor : BroadcastReceiver() {
if (intent.action == ACTION_USB_DEVICE_ATTACHED || if (intent.action == ACTION_USB_DEVICE_ATTACHED ||
intent.action == ACTION_USB_DEVICE_DETACHED intent.action == ACTION_USB_DEVICE_DETACHED
) { ) {
val device = intent.extras?.getParcelable<UsbDevice>(EXTRA_DEVICE) ?: return val device = intent.extras?.getParcelable(EXTRA_DEVICE, UsbDevice::class.java) ?: return
Log.d(TAG, "New USB mass-storage device attached.") Log.d(TAG, "New USB mass-storage device attached.")
device.log() device.log()