Merge pull request #775 from theimpulson/deprecation

UsbIntentReceiver: Specify parcel's type in method as well
This commit is contained in:
Torsten Grote 2024-10-14 09:22:18 -03:00 committed by GitHub
commit a4ff8946dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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()