1# USB服务子系统ChangeLog 2 3## cl.usb_manager.1 系统接口变更 4 5USB系统API运行时鉴权,异步接口以Promise reject形式抛出错误码。 6 7基于此前版本开发的应用,需修改函数的返回值,否则会影响原有业务逻辑。 8 9**关键接口/组件变更** 10 11| 包名 | 旧接口 | 新接口 | 12| --------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | 13| ohos.usbV9.d.ts | function setCurrentFunctions(funcs: FunctionType): Promise<boolean>; | function setCurrentFunctions(funcs: FunctionType): Promise<void>; | 14| ohos.usbV9.d.ts | function setPortRoles(portId: number, powerRole: PowerRoleType, dataRole: DataRoleType): Promise<boolean>; | function setPortRoles(portId: number, powerRole: PowerRoleType, dataRole: DataRoleType): Promise<void>; | 15 16## cl.usb_manager.2 sdk接口删除 17 18继OpenHarmony 4.0.5.5版本3.30之后,@ohos.usbV9.d.ts文件已删除。 19 20后续需要import @ohos.usbManager才能使用USB服务的接口: 21 22 ```ts 23 import usbManager from '@ohos.usbManager'; 24 ``` 25 26**适配指导** 27 28请参考各接口的[API文档](../../../application-dev/reference/apis/js-apis-usbManager.md) 29