Skip to content

Commit

Permalink
Add FLAG_MUTABLE to requestUserPermission
Browse files Browse the repository at this point in the history
Fix for melihyarikkaya#52- melihyarikkaya#52 

setting of required flag FLAG_MUTABLE for sdk-31
  • Loading branch information
little-infinity authored Jun 12, 2023
1 parent fa7d4aa commit 25dbbd2
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -558,9 +558,10 @@ public void run() {
}

private void requestUserPermission() {
if(device == null)
if (device == null)
return;
PendingIntent mPendingIntent = PendingIntent.getBroadcast(reactContext, 0 , new Intent(ACTION_USB_PERMISSION), 0);
PendingIntent mPendingIntent = PendingIntent.getBroadcast(reactContext, 0, new Intent(ACTION_USB_PERMISSION),
PendingIntent.FLAG_MUTABLE);
usbManager.requestPermission(device, mPendingIntent);
}

Expand Down Expand Up @@ -622,4 +623,4 @@ public void onReceivedData(byte[] bytes) {
}
}
};
}
}

0 comments on commit 25dbbd2

Please sign in to comment.