We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d3099e commit 58e24bfCopy full SHA for 58e24bf
drivers/src/main/java/info/martinmarinov/drivers/tools/UsbPermissionObtainer.java
@@ -39,8 +39,8 @@ public class UsbPermissionObtainer {
39
40
public static Future<UsbDeviceConnection> obtainFdFor(Context context, UsbDevice usbDevice) {
41
int flags = 0;
42
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
43
- flags = PendingIntent.FLAG_IMMUTABLE;
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
+ flags = PendingIntent.FLAG_MUTABLE;
44
}
45
UsbManager manager = (UsbManager) context.getSystemService(Context.USB_SERVICE);
46
if (!manager.hasPermission(usbDevice)) {
0 commit comments