Merge pull request #775 from theimpulson/deprecation
UsbIntentReceiver: Specify parcel's type in method as well
This commit is contained in:
commit
a4ff8946dd
1 changed files with 1 additions and 1 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue