UsbConstants class const value missing
Closed this issue · 2 comments
LUJIAN2020 commented
Android framework version
net8.0-android
Affected platform version
Android
Description
During the development of USB communication, it was found that the UsbConstants class did have constant values
refer to the document https://developer.android.google.cn/reference/android/hardware/usb/UsbConstants
Steps to Reproduce
https://developer.android.google.cn/reference/android/hardware/usb/UsbConstants
https://learn.microsoft.com/en-us/dotnet/api/android.hardware.usb.usbconstants?view=net-android-34.0
Did you find any workaround?
No response
Relevant log output
No response
jpobst commented
The constants were changed into enum values, like:
- https://learn.microsoft.com/en-us/dotnet/api/android.hardware.usb.usbaddressing?view=net-android-34.0
- https://learn.microsoft.com/en-us/dotnet/api/android.hardware.usb.usbclass?view=net-android-34.0
If you need to use them as an int
somewhere, you can cast back:
DoUsbThing ((int)UsbClass.AppSpec);
LUJIAN2020 commented
very thankful for your help