!6316 删除 SetSessionProperty

Merge pull request !6316 from lg/master
This commit is contained in:
openharmony_ci 2024-05-17 02:28:38 +00:00 committed by Gitee
commit 649b075cb6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
10 changed files with 1 additions and 60 deletions

View File

@ -135,8 +135,6 @@ void IPCSpecificInterfaceFuzzTest2(sptr<IRemoteObject> proxy, MessageParcel& sen
sendData, reply, option);
proxy->SendRequest(static_cast<uint32_t>(SessionInterfaceCode::TRANS_ID_GET_AVOID_AREA),
sendData, reply, option);
proxy->SendRequest(static_cast<uint32_t>(SessionInterfaceCode::TRANS_ID_SET_SESSION_PROPERTY),
sendData, reply, option);
proxy->SendRequest(static_cast<uint32_t>(SessionInterfaceCode::TRANS_ID_SET_ASPECT_RATIO),
sendData, reply, option);
proxy->SendRequest(static_cast<uint32_t>(SessionInterfaceCode::TRANS_ID_UPDATE_WINDOW_ANIMATION_FLAG),
@ -196,7 +194,6 @@ void ProxyInterfaceFuzzTestPart1(const uint8_t* data, size_t size)
sptr<WindowSessionProperty> property = UnmarshallingDataTo<WindowSessionProperty>(data, size);
proxy->Foreground(property);
proxy->SetSessionProperty(property);
proxy->Background();
proxy->RaiseToAppTop();

View File

@ -196,7 +196,7 @@ public:
WSError SetAspectRatio(float ratio) override;
void SetFocusedOnShow(bool focusedOnShow);
bool IsFocusedOnShow() const;
WSError SetSessionProperty(const sptr<WindowSessionProperty>& property) override;
WSError SetSessionProperty(const sptr<WindowSessionProperty>& property);
sptr<WindowSessionProperty> GetSessionProperty() const;
void SetSessionRect(const WSRect& rect);
WSRect GetSessionRect() const;

View File

@ -53,7 +53,6 @@ public:
virtual WSError MarkProcessed(int32_t eventId) { return WSError::WS_OK; }
virtual WSError SetGlobalMaximizeMode(MaximizeMode mode) { return WSError::WS_OK; }
virtual WSError GetGlobalMaximizeMode(MaximizeMode& mode) { return WSError::WS_OK; }
virtual WSError SetSessionProperty(const sptr<WindowSessionProperty>& property) { return WSError::WS_OK; }
virtual WSError SetAspectRatio(float ratio) { return WSError::WS_OK; }
virtual WSError UpdateWindowAnimationFlag(bool needDefaultAnimationFlag) { return WSError::WS_OK; }
virtual WSError UpdateWindowSceneAfterCustomAnimation(bool isAdd) { return WSError::WS_OK; }

View File

@ -42,7 +42,6 @@ enum class SessionInterfaceCode {
TRANS_ID_GET_MAXIMIZE_MODE,
TRANS_ID_NEED_AVOID,
TRANS_ID_GET_AVOID_AREA,
TRANS_ID_SET_SESSION_PROPERTY,
TRANS_ID_SET_ASPECT_RATIO,
TRANS_ID_UPDATE_WINDOW_ANIMATION_FLAG,
TRANS_ID_UPDATE_CUSTOM_ANIMATION,

View File

@ -52,7 +52,6 @@ public:
WSError MarkProcessed(int32_t eventId) override;
WSError SetGlobalMaximizeMode(MaximizeMode mode) override;
WSError GetGlobalMaximizeMode(MaximizeMode& mode) override;
WSError SetSessionProperty(const sptr<WindowSessionProperty>& property) override;
WSError SetAspectRatio(float ratio) override;
WSError UpdateWindowAnimationFlag(bool needDefaultAnimationFlag) override;
WSError SetLandscapeMultiWindow(bool isLandscapeMultiWindow) override;

View File

@ -52,7 +52,6 @@ private:
int HandleGetGlobalMaximizeMode(MessageParcel& data, MessageParcel& reply);
int HandleNeedAvoid(MessageParcel& data, MessageParcel& reply);
int HandleGetAvoidAreaByType(MessageParcel& data, MessageParcel& reply);
int HandleSetSessionProperty(MessageParcel& data, MessageParcel& reply);
int HandleSetAspectRatio(MessageParcel& data, MessageParcel& reply);
int HandleSetWindowAnimationFlag(MessageParcel& data, MessageParcel& reply);
int HandleUpdateWindowSceneAfterCustomAnimation(MessageParcel& data, MessageParcel& reply);

View File

@ -714,28 +714,6 @@ WSError SessionProxy::GetGlobalMaximizeMode(MaximizeMode& mode)
return static_cast<WSError>(ret);
}
WSError SessionProxy::SetSessionProperty(const sptr<WindowSessionProperty>& property)
{
MessageParcel data;
MessageParcel reply;
MessageOption option;
if (!data.WriteInterfaceToken(GetDescriptor())) {
WLOGFE("WriteInterfaceToken failed");
return WSError::WS_ERROR_IPC_FAILED;
}
if (!data.WriteParcelable(property.GetRefPtr())) {
WLOGFE("Write property failed");
return WSError::WS_ERROR_IPC_FAILED;
}
if (Remote()->SendRequest(static_cast<uint32_t>(SessionInterfaceCode::TRANS_ID_SET_SESSION_PROPERTY),
data, reply, option) != ERR_NONE) {
WLOGFE("SendRequest failed");
return WSError::WS_ERROR_IPC_FAILED;
}
int32_t ret = reply.ReadInt32();
return static_cast<WSError>(ret);
}
WSError SessionProxy::SetAspectRatio(float ratio)
{
MessageParcel data;

View File

@ -71,8 +71,6 @@ const std::map<uint32_t, SessionStubFunc> SessionStub::stubFuncMap_ {
&SessionStub::HandleNeedAvoid),
std::make_pair(static_cast<uint32_t>(SessionInterfaceCode::TRANS_ID_GET_AVOID_AREA),
&SessionStub::HandleGetAvoidAreaByType),
std::make_pair(static_cast<uint32_t>(SessionInterfaceCode::TRANS_ID_SET_SESSION_PROPERTY),
&SessionStub::HandleSetSessionProperty),
std::make_pair(static_cast<uint32_t>(SessionInterfaceCode::TRANS_ID_SET_ASPECT_RATIO),
&SessionStub::HandleSetAspectRatio),
std::make_pair(static_cast<uint32_t>(SessionInterfaceCode::TRANS_ID_UPDATE_WINDOW_ANIMATION_FLAG),
@ -471,15 +469,6 @@ int SessionStub::HandleGetAvoidAreaByType(MessageParcel& data, MessageParcel& re
return ERR_NONE;
}
int SessionStub::HandleSetSessionProperty(MessageParcel& data, MessageParcel& reply)
{
WLOGFD("HandleSetSessionProperty!");
auto property = data.ReadStrongParcelable<WindowSessionProperty>();
auto errCode = SetSessionProperty(property);
reply.WriteUint32(static_cast<uint32_t>(errCode));
return ERR_NONE;
}
int SessionStub::HandleSetAspectRatio(MessageParcel& data, MessageParcel& reply)
{
WLOGFD("HandleSetAspectRatio!");

View File

@ -346,23 +346,6 @@ HWTEST_F(SessionProxyTest, GetGlobalMaximizeMode, Function | SmallTest | Level2)
GTEST_LOG_(INFO) << "SessionProxyTest: GetGlobalMaximizeMode end";
}
/**
* @tc.name: SetSessionProperty
* @tc.desc: normal function
* @tc.type: FUNC
*/
HWTEST_F(SessionProxyTest, SetSessionProperty, Function | SmallTest | Level2)
{
GTEST_LOG_(INFO) << "SessionProxyTest: SetSessionProperty start";
sptr<IRemoteObject> iRemoteObjectMocker = new IRemoteObjectMocker();
SessionProxy* sProxy = new(std::nothrow) SessionProxy(iRemoteObjectMocker);
sptr<WindowSessionProperty> property = new WindowSessionProperty();
WSError res = sProxy->SetSessionProperty(property);
ASSERT_EQ(res, WSError::WS_OK);
GTEST_LOG_(INFO) << "SessionProxyTest: SetSessionProperty end";
}
/**
* @tc.name: SetAspectRatio
* @tc.desc: normal function

View File

@ -158,8 +158,6 @@ HWTEST_F(SessionStubTest, sessionStubTest02, Function | SmallTest | Level2)
ASSERT_EQ(0, res);
res = session_->HandleGetAvoidAreaByType(data, reply);
ASSERT_EQ(0, res);
res = session_->HandleSetSessionProperty(data, reply);
ASSERT_EQ(0, res);
res = session_->HandleSetAspectRatio(data, reply);
ASSERT_EQ(0, res);
res = session_->HandleUpdateWindowSceneAfterCustomAnimation(data, reply);