Skip to content

Commit

Permalink
Merge pull request #775 from theimpulson/deprecation
Browse files Browse the repository at this point in the history
UsbIntentReceiver: Specify parcel's type in method as well
  • Loading branch information
grote authored Oct 14, 2024
2 parents 5365ef3 + f21e0f8 commit a4ff894
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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<UsbDevice>(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()

Expand Down

0 comments on commit a4ff894

Please sign in to comment.