package Ġcom . ro un in labs . another _ bro ther . receiver Ċ Ċ import Ġandroid . content . Broadcast Receiver Ċ import Ġandroid . content . Context Ċ import Ġandroid . content . Intent Ċ import Ġandroid . hardware . usb . Usb Device Ċ import Ġandroid . hardware . usb . Usb Manager Ċ import Ġcom . ro un in labs . another _ bro ther . Bro ther Manager Ċ Ċ class ĠU sb Permissions Receiver : ĠBroadcast Receiver () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġon Receive ( context : ĠContext , Ġintent : ĠIntent ) Ġ{ ĊĊĠĠĠĠĠĠĠ Ġval Ġdevice : Usb Device ? Ġ= Ġintent . get Parcelable Extra ( Usb Manager . EXTRA _ DEVICE ) ĊĠĠĠĠĠĠĠ Ġval Ġgranted Ġ= Ġintent . getBoolean Extra ( Usb Manager . EXTRA _ PERMISSION _ GRAN TED , Ġfalse ) ĊĠĠĠĠĠĠĠĠĊĠĠĠĠĠĠĠ Ġdevice ?. let Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠBro ther Manager . complete Permission Request ( usb Device Ġ= Ġit , Ġgranted Ġ= Ġgranted ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }