forked from PeterCxy/OpenEUICC
[3/n] Handle USB permission responses properly
This commit is contained in:
parent
87fc1cd2f8
commit
ccf21675d6
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue