dotnet/android

UsbConstants class const value missing

Closed this issue · 2 comments

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

The constants were changed into enum values, like:

If you need to use them as an int somewhere, you can cast back:

DoUsbThing ((int)UsbClass.AppSpec);

very thankful for your help