1e41f4b71Sopenharmony_ci# MSDP Subsystem Changelog 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci## c1.device_status.1 Screen Hopping APIs Deprecated 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ci**Access Level** 6e41f4b71Sopenharmony_ci 7e41f4b71Sopenharmony_ciSystem APIs 8e41f4b71Sopenharmony_ci 9e41f4b71Sopenharmony_ci**Reason for Change** 10e41f4b71Sopenharmony_ci 11e41f4b71Sopenharmony_ciPermission control is added for screen hopping APIs. The new APIs incorporate complete functions of the old system APIs and are more standard and atomic with full compliance with community API specifications. 12e41f4b71Sopenharmony_ci 13e41f4b71Sopenharmony_ci**Change Impact** 14e41f4b71Sopenharmony_ci 15e41f4b71Sopenharmony_ciThe change is not compatible with earlier versions. You are advised to use new APIs. 16e41f4b71Sopenharmony_ci 17e41f4b71Sopenharmony_ci**Valid Since** 18e41f4b71Sopenharmony_ci 19e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.5.1 20e41f4b71Sopenharmony_ci 21e41f4b71Sopenharmony_ci**Deprecated APIs** 22e41f4b71Sopenharmony_ci 23e41f4b71Sopenharmony_ci| API | Description | Substitute API | 24e41f4b71Sopenharmony_ci| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | 25e41f4b71Sopenharmony_ci| function prepare(callback: AsyncCallback<void>): void; | **cooperate.prepareCooperate** is used to prepare for screen hopping. | function prepareCooperate(callback: AsyncCallback<void>): void; | 26e41f4b71Sopenharmony_ci| function prepare(): Promise<void>; | **cooperate.prepareCooperate** is used to prepare for screen hopping. | function prepareCooperate(): Promise<void>; | 27e41f4b71Sopenharmony_ci| function unprepare(callback: AsyncCallback<void>): void; | **cooperate.unprepareCooperate** is used to cancel the preparation for screen hopping. | function unprepareCooperate(callback: AsyncCallback<void>): void; | 28e41f4b71Sopenharmony_ci| function unprepare(): Promise<void>; | **cooperate.unprepareCooperate** is used to cancel the preparation for screen hopping. | function unprepareCooperate(): Promise<void>; | 29e41f4b71Sopenharmony_ci| function activate(targetNetworkId: string, inputDeviceId: number, callback: AsyncCallback<void>): void; | **cooperate.activateCooperate** is used to start screen hopping. | function activateCooperate(targetNetworkId: string, inputDeviceId: number, callback: AsyncCallback<void>): void; | 30e41f4b71Sopenharmony_ci| function activate(targetNetworkId: string, inputDeviceId: number): Promise<void>; | **cooperate.activateCooperate** is used to start screen hopping. | function activateCooperate(targetNetworkId: string, inputDeviceId: number): Promise<void>; | 31e41f4b71Sopenharmony_ci| function deactivate(isUnchained: boolean, callback: AsyncCallback<void>): void; | **cooperate.deactivateCooperate** is used to stop screen hopping. | function deactivateCooperate(isUnchained: boolean, callback: AsyncCallback<void>): void; | 32e41f4b71Sopenharmony_ci| function deactivate(isUnchained: boolean): Promise<void>; | **cooperate.deactivateCooperate** is used to stop screen hopping. | function deactivateCooperate(isUnchained: boolean): Promise<void>; | 33e41f4b71Sopenharmony_ci| function getCrossingSwitchState(networkId: string, callback: AsyncCallback<boolean>): void; | **cooperate.getCooperateSwitchState** is used to obtain the screen hopping status of the target device.| function getCooperateSwitchState(networkId: string, callback: AsyncCallback<boolean>): void; | 34e41f4b71Sopenharmony_ci| function getCrossingSwitchState(networkId: string): Promise<boolean>; | **cooperate.getCooperateSwitchState** is used to obtain the screen hopping status of the target device.| function getCooperateSwitchState(networkId: string): Promise<boolean>; | 35e41f4b71Sopenharmony_ci| function on(type: 'cooperate', callback: Callback<{ networkId: string, msg: CooperateMsg }>): void; | **cooperate.on** is used to subscribe to screen hopping status change events. | function on(type: 'cooperateMessage', callback: Callback<CooperateMessage>): void; | 36e41f4b71Sopenharmony_ci| function off(type: 'cooperate', callback?: Callback<void>): void; | **cooperate.off** is used to unsubscribe from screen hopping status change events. | function off(type: 'cooperateMessage', callback?: Callback<CooperateMessage>): void; | 37e41f4b71Sopenharmony_ci| enum CooperateMsg | **CooperateMessage** is used to define a screen hopping status change event. | interface CooperateMessage | 38e41f4b71Sopenharmony_ci| COOPERATE_PREPARE | **CooperateState.COOPERATE_PREPARE** is used to indicate that the preparation for screen hopping is finished. | CooperateState.COOPERATE_PREPARE | 39e41f4b71Sopenharmony_ci| COOPERATE_UNPREPARE | **CooperateState.COOPERATE_UNPREPARE** is used to indicate that the preparation for screen hopping is canceled. | CooperateState.COOPERATE_UNPREPARE | 40e41f4b71Sopenharmony_ci| COOPERATE_ACTIVATE | **CooperateState.COOPERATE_ACTIVATE** is used to indicate that screen hopping is started. | CooperateState.COOPERATE_ACTIVATE | 41e41f4b71Sopenharmony_ci| COOPERATE_ACTIVATE_SUCCESS | **CooperateState.COOPERATE_ACTIVATE_SUCCESS** is used to indicate that starting screen hopping is successful.| CooperateState.COOPERATE_ACTIVATE_SUCCESS | 42e41f4b71Sopenharmony_ci| COOPERATE_ACTIVATE_FAIL | **CooperateState.COOPERATE_ACTIVATE_FAILURE** is used to indicate that starting screen hopping has failed.| CooperateState.COOPERATE_ACTIVATE_FAILURE | 43e41f4b71Sopenharmony_ci| COOPERATE_DEACTIVATE_SUCCESS | **CooperateState.COOPERATE_DEACTIVATE_SUCCESS** is used to indicate that stopping screen hopping is successful.| CooperateState.COOPERATE_DEACTIVATE_SUCCESS | 44e41f4b71Sopenharmony_ci| COOPERATE_DEACTIVATE_FAIL | **CooperateState.COOPERATE_DEACTIVATE_FAILURE** is used to indicate that stopping screen hopping has failed.| CooperateState.COOPERATE_DEACTIVATE_FAILURE | 45e41f4b71Sopenharmony_ci| COOPERATE_SESSION_DISCONNECTED | **CooperateState.COOPERATE_SESSION_DISCONNECTED** is used to indicate that the screen hopping session is disconnected.| CooperateState.COOPERATE_SESSION_DISCONNECTED | 46e41f4b71Sopenharmony_ci 47e41f4b71Sopenharmony_ci**Adaptation Guide** 48e41f4b71Sopenharmony_ci 49e41f4b71Sopenharmony_ciYou are advised to use [@ohos.cooperate](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-devicestatus-cooperate.md#cooperateprepare). 50