mirror of
https://gitee.com/openharmony/window_window_manager
synced 2025-02-25 18:31:49 +00:00
commit
5fb9107e70
@ -106,15 +106,15 @@ WSError SceneSessionManagerProxy::RecoverAndConnectSpecificSession(const sptr<IS
|
||||
WLOGFE("Write InterfaceToken failed!");
|
||||
return WSError::WS_ERROR_IPC_FAILED;
|
||||
}
|
||||
if (!data.WriteRemoteObject(sessionStage->AsObject())) {
|
||||
if (!sessionStage || !data.WriteRemoteObject(sessionStage->AsObject())) {
|
||||
WLOGFE("Write ISessionStage failed!");
|
||||
return WSError::WS_ERROR_IPC_FAILED;
|
||||
}
|
||||
if (!data.WriteRemoteObject(eventChannel->AsObject())) {
|
||||
if (!eventChannel || !data.WriteRemoteObject(eventChannel->AsObject())) {
|
||||
WLOGFE("Write IWindowEventChannel failed!");
|
||||
return WSError::WS_ERROR_IPC_FAILED;
|
||||
}
|
||||
if (!surfaceNode->Marshalling(data)) {
|
||||
if (!surfaceNode || !surfaceNode->Marshalling(data)) {
|
||||
WLOGFE("Write surfaceNode failed");
|
||||
return WSError::WS_ERROR_IPC_FAILED;
|
||||
}
|
||||
@ -165,15 +165,15 @@ WSError SceneSessionManagerProxy::RecoverAndReconnectSceneSession(const sptr<ISe
|
||||
WLOGFE("Write InterfaceToken failed!");
|
||||
return WSError::WS_ERROR_IPC_FAILED;
|
||||
}
|
||||
if (!data.WriteRemoteObject(sessionStage->AsObject())) {
|
||||
if (!sessionStage || !data.WriteRemoteObject(sessionStage->AsObject())) {
|
||||
WLOGFE("Write ISessionStage failed!");
|
||||
return WSError::WS_ERROR_IPC_FAILED;
|
||||
}
|
||||
if (!data.WriteRemoteObject(eventChannel->AsObject())) {
|
||||
if (!eventChannel || !data.WriteRemoteObject(eventChannel->AsObject())) {
|
||||
WLOGFE("Write IWindowEventChannel failed!");
|
||||
return WSError::WS_ERROR_IPC_FAILED;
|
||||
}
|
||||
if (!surfaceNode->Marshalling(data)) {
|
||||
if (!surfaceNode || !surfaceNode->Marshalling(data)) {
|
||||
WLOGFE("Write surfaceNode failed");
|
||||
return WSError::WS_ERROR_IPC_FAILED;
|
||||
}
|
||||
|
@ -311,13 +311,15 @@ WMError WindowSceneSessionImpl::RecoverAndConnectSpecificSession()
|
||||
|
||||
sptr<ISessionStage> iSessionStage(this);
|
||||
sptr<WindowEventChannel> channel = new (std::nothrow) WindowEventChannel(iSessionStage);
|
||||
if (channel == nullptr) {
|
||||
return WMError::WM_ERROR_NULLPTR;
|
||||
}
|
||||
sptr<IWindowEventChannel> eventChannel(channel);
|
||||
sptr<Rosen::ISession> session;
|
||||
sptr<IRemoteObject> token = context_ ? context_->GetToken() : nullptr;
|
||||
if (token) {
|
||||
property_->SetTokenState(true);
|
||||
}
|
||||
|
||||
const WindowType type = GetType();
|
||||
if (WindowHelper::IsSubWindow(type) && (property_->GetExtensionFlag() == false)) { // sub window
|
||||
TLOGD(WmsLogTag::WMS_RECOVER, "SubWindow");
|
||||
@ -372,6 +374,9 @@ WMError WindowSceneSessionImpl::RecoverAndReconnectSceneSession()
|
||||
GetPersistentId(), state_);
|
||||
sptr<ISessionStage> iSessionStage(this);
|
||||
auto windowEventChannel = new (std::nothrow) WindowEventChannel(iSessionStage);
|
||||
if (windowEventChannel == nullptr) {
|
||||
return WMError::WM_ERROR_NULLPTR;
|
||||
}
|
||||
sptr<IWindowEventChannel> iWindowEventChannel(windowEventChannel);
|
||||
sptr<IRemoteObject> token = context_ ? context_->GetToken() : nullptr;
|
||||
sptr<Rosen::ISession> session;
|
||||
|
Loading…
x
Reference in New Issue
Block a user