```
import Prompt from '@ohos.prompt';
import windowAnimationManager from '@ohos.animation.windowAnimationManager';
import { CheckEmptyUtils } from '@ohos/common';
import { Log } from '@ohos/common';
import RemoteConstants from '../../constants/RemoteConstants';
```
WMError RemoteAnimation::SetWindowAnimationController(const sptr<RSIWindowAnimationController>& controller)
{
WLOGFI("RSWindowAnimation: set window animation controller!");
if (!isRemoteAnimationEnable_) {
WLOGE("RSWindowAnimation: failed to set window animation controller, remote animation is not enabled");
return WMError::WM_ERROR_NO_REMOTE_ANIMATION;
}
if (controller == nullptr) {
WLOGFE("RSWindowAnimation: failed to set window animation controller, controller is null!");
return WMError::WM_ERROR_NULLPTR;
}
if (windowAnimationController_ != nullptr) {
WLOGFI("RSWindowAnimation: maybe user switch!");
}