mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-07 03:48:14 +00:00
Fixed bug #13849 - Intent always explicit
This commit is contained in:
@@ -603,13 +603,10 @@ public class HIDDeviceManager {
|
|||||||
} else {
|
} else {
|
||||||
flags = 0;
|
flags = 0;
|
||||||
}
|
}
|
||||||
if (Build.VERSION.SDK_INT >= 33 /* Android 14.0 (U) */) {
|
|
||||||
Intent intent = new Intent(HIDDeviceManager.ACTION_USB_PERMISSION);
|
Intent intent = new Intent(HIDDeviceManager.ACTION_USB_PERMISSION);
|
||||||
intent.setPackage(mContext.getPackageName());
|
intent.setPackage(mContext.getPackageName());
|
||||||
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, intent, flags));
|
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, intent, flags));
|
||||||
} else {
|
|
||||||
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), flags));
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.v(TAG, "Couldn't request permission for USB device " + usbDevice);
|
Log.v(TAG, "Couldn't request permission for USB device " + usbDevice);
|
||||||
HIDDeviceOpenResult(deviceID, false);
|
HIDDeviceOpenResult(deviceID, false);
|
||||||
|
Reference in New Issue
Block a user