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:
parent
5365ef3a5e
commit
f21e0f8d39
1 changed files with 1 additions and 1 deletions
|
@ -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()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue