[3/n] Handle USB permission responses properly
Some checks failed
/ build-debug (push) Failing after 14m40s
Some checks failed
/ build-debug (push) Failing after 14m40s
This commit is contained in:
parent
87fc1cd2f8
commit
ccf21675d6
|
@ -52,7 +52,7 @@ open class MainActivity : BaseEuiccAccessActivity(), OpenEuiccContextMarker {
|
|||
private val usbPermissionReceiver = object : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context?, intent: Intent?) {
|
||||
if (intent?.action == ACTION_USB_PERMISSION) {
|
||||
if (intent.getBooleanExtra(UsbManager.EXTRA_PERMISSION_GRANTED, false)) {
|
||||
if (usbDevice != null && usbManager.hasPermission(usbDevice)) {
|
||||
lifecycleScope.launch(Dispatchers.Main) {
|
||||
switchToUsbFragmentIfPossible()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue