mirror of
https://gitee.com/openharmony/window_window_manager
synced 2024-11-23 06:50:40 +00:00
!10221 窗口管理 编码规范问题整改
Merge pull request !10221 from LiangXinghui/local1
This commit is contained in:
commit
0452b24213
@ -525,8 +525,14 @@ int SceneSessionManagerLiteStub::HandleCheckWindowId(MessageParcel& data, Messag
|
||||
|
||||
int SceneSessionManagerLiteStub::HandleRegisterWindowManagerAgent(MessageParcel& data, MessageParcel& reply)
|
||||
{
|
||||
auto type = static_cast<WindowManagerAgentType>(data.ReadUint32());
|
||||
WLOGFI("run HandleRegisterWindowManagerAgent!, type=%{public}u", static_cast<uint32_t>(type));
|
||||
uint32_t typeId = 0;
|
||||
if (!data.ReadUint32(typeId) ||
|
||||
typeId < static_cast<uint32_t>(WindowManagerAgentType::WINDOW_MANAGER_AGENT_TYPE_FOCUS) ||
|
||||
typeId >= static_cast<uint32_t>(WindowManagerAgentType::WINDOW_MANAGER_AGENT_TYPE_END)) {
|
||||
return ERR_INVALID_DATA;
|
||||
}
|
||||
WindowManagerAgentType type = static_cast<WindowManagerAgentType>(typeId);
|
||||
WLOGFI("run HandleRegisterWindowManagerAgent!, type=%{public}u", typeId);
|
||||
sptr<IRemoteObject> windowManagerAgentObject = data.ReadRemoteObject();
|
||||
sptr<IWindowManagerAgent> windowManagerAgentProxy =
|
||||
iface_cast<IWindowManagerAgent>(windowManagerAgentObject);
|
||||
@ -537,8 +543,14 @@ int SceneSessionManagerLiteStub::HandleRegisterWindowManagerAgent(MessageParcel&
|
||||
|
||||
int SceneSessionManagerLiteStub::HandleUnregisterWindowManagerAgent(MessageParcel& data, MessageParcel& reply)
|
||||
{
|
||||
auto type = static_cast<WindowManagerAgentType>(data.ReadUint32());
|
||||
WLOGFI("run HandleUnregisterWindowManagerAgent!, type=%{public}u", static_cast<uint32_t>(type));
|
||||
uint32_t typeId = 0;
|
||||
if (!data.ReadUint32(typeId) ||
|
||||
typeId < static_cast<uint32_t>(WindowManagerAgentType::WINDOW_MANAGER_AGENT_TYPE_FOCUS) ||
|
||||
typeId >= static_cast<uint32_t>(WindowManagerAgentType::WINDOW_MANAGER_AGENT_TYPE_END)) {
|
||||
return ERR_INVALID_DATA;
|
||||
}
|
||||
WindowManagerAgentType type = static_cast<WindowManagerAgentType>(typeId);
|
||||
WLOGFI("run HandleUnregisterWindowManagerAgent!, type=%{public}u", typeId);
|
||||
sptr<IRemoteObject> windowManagerAgentObject = data.ReadRemoteObject();
|
||||
sptr<IWindowManagerAgent> windowManagerAgentProxy =
|
||||
iface_cast<IWindowManagerAgent>(windowManagerAgentObject);
|
||||
|
@ -361,8 +361,14 @@ int SceneSessionManagerStub::HandleRequestFocusStatus(MessageParcel& data, Messa
|
||||
|
||||
int SceneSessionManagerStub::HandleRegisterWindowManagerAgent(MessageParcel& data, MessageParcel& reply)
|
||||
{
|
||||
auto type = static_cast<WindowManagerAgentType>(data.ReadUint32());
|
||||
WLOGFI("run HandleRegisterWindowManagerAgent!, type=%{public}u", static_cast<uint32_t>(type));
|
||||
uint32_t typeId = 0;
|
||||
if (!data.ReadUint32(typeId) ||
|
||||
typeId < static_cast<uint32_t>(WindowManagerAgentType::WINDOW_MANAGER_AGENT_TYPE_FOCUS) ||
|
||||
typeId >= static_cast<uint32_t>(WindowManagerAgentType::WINDOW_MANAGER_AGENT_TYPE_END)) {
|
||||
return ERR_INVALID_DATA;
|
||||
}
|
||||
WindowManagerAgentType type = static_cast<WindowManagerAgentType>(typeId);
|
||||
WLOGFI("run HandleRegisterWindowManagerAgent!, type=%{public}u", typeId);
|
||||
sptr<IRemoteObject> windowManagerAgentObject = data.ReadRemoteObject();
|
||||
sptr<IWindowManagerAgent> windowManagerAgentProxy =
|
||||
iface_cast<IWindowManagerAgent>(windowManagerAgentObject);
|
||||
@ -373,8 +379,14 @@ int SceneSessionManagerStub::HandleRegisterWindowManagerAgent(MessageParcel& dat
|
||||
|
||||
int SceneSessionManagerStub::HandleUnregisterWindowManagerAgent(MessageParcel& data, MessageParcel& reply)
|
||||
{
|
||||
auto type = static_cast<WindowManagerAgentType>(data.ReadUint32());
|
||||
WLOGFI("run HandleUnregisterWindowManagerAgent!, type=%{public}u", static_cast<uint32_t>(type));
|
||||
uint32_t typeId = 0;
|
||||
if (!data.ReadUint32(typeId) ||
|
||||
typeId < static_cast<uint32_t>(WindowManagerAgentType::WINDOW_MANAGER_AGENT_TYPE_FOCUS) ||
|
||||
typeId >= static_cast<uint32_t>(WindowManagerAgentType::WINDOW_MANAGER_AGENT_TYPE_END)) {
|
||||
return ERR_INVALID_DATA;
|
||||
}
|
||||
WindowManagerAgentType type = static_cast<WindowManagerAgentType>(typeId);
|
||||
WLOGFI("run HandleUnregisterWindowManagerAgent!, type=%{public}u", typeId);
|
||||
sptr<IRemoteObject> windowManagerAgentObject = data.ReadRemoteObject();
|
||||
sptr<IWindowManagerAgent> windowManagerAgentProxy =
|
||||
iface_cast<IWindowManagerAgent>(windowManagerAgentObject);
|
||||
@ -787,7 +799,11 @@ int SceneSessionManagerStub::HandleGetUIContentRemoteObj(MessageParcel& data, Me
|
||||
int SceneSessionManagerStub::HandleBindDialogTarget(MessageParcel& data, MessageParcel& reply)
|
||||
{
|
||||
WLOGFI("run HandleBindDialogTarget!");
|
||||
uint64_t persistentId = data.ReadUint64();
|
||||
uint64_t persistentId = 0;
|
||||
if (!data.ReadUint64(persistentId)) {
|
||||
TLOGE(WmsLogTag::WMS_LIFE, "Read persistentId failed");
|
||||
return ERR_TRANSACTION_FAILED;
|
||||
}
|
||||
sptr<IRemoteObject> remoteObject = data.ReadRemoteObject();
|
||||
WSError ret = BindDialogSessionTarget(persistentId, remoteObject);
|
||||
reply.WriteUint32(static_cast<uint32_t>(ret));
|
||||
|
@ -369,7 +369,11 @@ int32_t WindowManagerStub::OnRemoteRequest(uint32_t code, MessageParcel& data, M
|
||||
break;
|
||||
}
|
||||
case WindowManagerMessage::TRANS_ID_BIND_DIALOG_TARGET: {
|
||||
uint32_t windowId = data.ReadUint32();
|
||||
uint32_t windowId = 0;
|
||||
if (!data.ReadUint32(windowId)) {
|
||||
TLOGE(WmsLogTag::DEFAULT, "Failed to readInt32 windowId");
|
||||
return ERR_INVALID_DATA;
|
||||
}
|
||||
sptr<IRemoteObject> targetToken = data.ReadRemoteObject();
|
||||
if (targetToken == nullptr) {
|
||||
TLOGE(WmsLogTag::WMS_DIALOG, "Read targetToken object failed!");
|
||||
|
Loading…
Reference in New Issue
Block a user