mirror of
https://gitee.com/openharmony/window_window_manager
synced 2024-11-23 06:50:40 +00:00
删除UpdateActiveStatus客户端多余的实现
Signed-off-by: liusensen <liusen43@huawei.com>
This commit is contained in:
parent
7721be0b8a
commit
b4dcb43103
@ -110,8 +110,6 @@ void IPCSpecificInterfaceFuzzTest1(sptr<IRemoteObject> proxy, MessageParcel& sen
|
||||
sendData, reply, option);
|
||||
proxy->SendRequest(static_cast<uint32_t>(SessionInterfaceCode::TRANS_ID_DISCONNECT),
|
||||
sendData, reply, option);
|
||||
proxy->SendRequest(static_cast<uint32_t>(SessionInterfaceCode::TRANS_ID_UPDATE_ACTIVE_STATUS),
|
||||
sendData, reply, option);
|
||||
proxy->SendRequest(static_cast<uint32_t>(SessionInterfaceCode::TRANS_ID_SESSION_EVENT),
|
||||
sendData, reply, option);
|
||||
proxy->SendRequest(static_cast<uint32_t>(SessionInterfaceCode::TRANS_ID_UPDATE_SESSION_RECT),
|
||||
@ -195,9 +193,6 @@ void ProxyInterfaceFuzzTestPart1(const uint8_t* data, size_t size)
|
||||
proxy->Background();
|
||||
proxy->RaiseToAppTop();
|
||||
|
||||
bool active = source.GetObject<bool>();
|
||||
proxy->UpdateActiveStatus(active);
|
||||
|
||||
SessionEvent event = source.GetObject<SessionEvent>();
|
||||
proxy->OnSessionEvent(event);
|
||||
|
||||
|
@ -64,9 +64,6 @@ void SessionStubBaseTest(sptr<Session> sessionStub, MessageParcel& parcel)
|
||||
sessionStub->OnRemoteRequest(static_cast<uint32_t>(Rosen::SessionInterfaceCode::TRANS_ID_ACTIVE_PENDING_SESSION),
|
||||
parcel, reply, option);
|
||||
parcel.RewindRead(0);
|
||||
sessionStub->OnRemoteRequest(static_cast<uint32_t>(Rosen::SessionInterfaceCode::TRANS_ID_UPDATE_ACTIVE_STATUS),
|
||||
parcel, reply, option);
|
||||
parcel.RewindRead(0);
|
||||
sessionStub->OnRemoteRequest(static_cast<uint32_t>(Rosen::SessionInterfaceCode::TRANS_ID_TERMINATE),
|
||||
parcel, reply, option);
|
||||
parcel.RewindRead(0);
|
||||
|
@ -447,6 +447,7 @@ protected:
|
||||
virtual void UpdateSessionState(SessionState state);
|
||||
void NotifySessionStateChange(const SessionState& state);
|
||||
void UpdateSessionTouchable(bool touchable);
|
||||
virtual WSError UpdateActiveStatus(bool isActive);
|
||||
|
||||
WSRectF UpdateTopBottomArea(const WSRectF& rect, MMI::WindowArea area);
|
||||
WSRectF UpdateLeftRightArea(const WSRectF& rect, MMI::WindowArea area);
|
||||
|
@ -45,7 +45,6 @@ public:
|
||||
virtual WSError DrawingCompleted() = 0;
|
||||
|
||||
// scene session
|
||||
virtual WSError UpdateActiveStatus(bool isActive) { return WSError::WS_OK; }
|
||||
virtual WSError OnSessionEvent(SessionEvent event) { return WSError::WS_OK; }
|
||||
virtual WSError OnLayoutFullScreenChange(bool isLayoutFullScreen) { return WSError::WS_OK; }
|
||||
virtual WSError RaiseToAppTop() { return WSError::WS_OK; }
|
||||
|
@ -28,7 +28,6 @@ enum class SessionInterfaceCode {
|
||||
TRANS_ID_HIDE,
|
||||
TRANS_ID_CHANGE_SESSION_VISIBILITY_WITH_STATUS_BAR,
|
||||
TRANS_ID_ACTIVE_PENDING_SESSION,
|
||||
TRANS_ID_UPDATE_ACTIVE_STATUS,
|
||||
TRANS_ID_TERMINATE,
|
||||
TRANS_ID_EXCEPTION,
|
||||
TRANS_ID_DRAWING_COMPLETED,
|
||||
|
@ -37,7 +37,6 @@ public:
|
||||
sptr<WindowSessionProperty> property = nullptr, sptr<IRemoteObject> token = nullptr,
|
||||
const std::string& identityToken = "") override;
|
||||
WSError DrawingCompleted() override;
|
||||
WSError UpdateActiveStatus(bool isActive) override;
|
||||
WSError ChangeSessionVisibilityWithStatusBar(const sptr<AAFwk::SessionInfo> abilitySessionInfo,
|
||||
bool visible) override;
|
||||
WSError PendingSessionActivation(const sptr<AAFwk::SessionInfo> abilitySessionInfo) override;
|
||||
|
@ -42,7 +42,6 @@ private:
|
||||
int HandleDrawingCompleted(MessageParcel& data, MessageParcel& reply);
|
||||
|
||||
// scene session
|
||||
int HandleUpdateActivateStatus(MessageParcel& data, MessageParcel& reply);
|
||||
int HandleSessionEvent(MessageParcel& data, MessageParcel& reply);
|
||||
int HandleUpdateSessionRect(MessageParcel& data, MessageParcel& reply);
|
||||
int HandleRaiseToAppTop(MessageParcel& data, MessageParcel& reply);
|
||||
|
@ -2953,4 +2953,9 @@ bool Session::IsScbCoreEnabled()
|
||||
return system::GetParameter("const.product.devicetype", "unknown") == "phone" &&
|
||||
system::GetParameter("persist.window.scbcore.enable", "1") == "1";
|
||||
}
|
||||
|
||||
WSError UpdateActiveStatus(bool isActive)
|
||||
{
|
||||
return WSError::WS_OK;
|
||||
}
|
||||
} // namespace OHOS::Rosen
|
||||
|
@ -474,28 +474,6 @@ WSError SessionProxy::NotifySessionException(const sptr<AAFwk::SessionInfo> abil
|
||||
return static_cast<WSError>(ret);
|
||||
}
|
||||
|
||||
WSError SessionProxy::UpdateActiveStatus(bool isActive)
|
||||
{
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
MessageOption option(MessageOption::TF_ASYNC);
|
||||
if (!data.WriteInterfaceToken(GetDescriptor())) {
|
||||
WLOGFE("WriteInterfaceToken failed");
|
||||
return WSError::WS_ERROR_IPC_FAILED;
|
||||
}
|
||||
if (!(data.WriteBool(isActive))) {
|
||||
WLOGFE("Write active status failed");
|
||||
return WSError::WS_ERROR_IPC_FAILED;
|
||||
}
|
||||
if (Remote()->SendRequest(static_cast<uint32_t>(SessionInterfaceCode::TRANS_ID_UPDATE_ACTIVE_STATUS),
|
||||
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::OnSessionEvent(SessionEvent event)
|
||||
{
|
||||
MessageParcel data;
|
||||
|
@ -67,8 +67,6 @@ int SessionStub::ProcessRemoteRequest(uint32_t code, MessageParcel& data, Messag
|
||||
return HandleDrawingCompleted(data, reply);
|
||||
case static_cast<uint32_t>(SessionInterfaceCode::TRANS_ID_UPDATE_RECTCHANGE_LISTENER_REGISTERED):
|
||||
return HandleUpdateRectChangeListenerRegistered(data, reply);
|
||||
case static_cast<uint32_t>(SessionInterfaceCode::TRANS_ID_UPDATE_ACTIVE_STATUS):
|
||||
return HandleUpdateActivateStatus(data, reply);
|
||||
case static_cast<uint32_t>(SessionInterfaceCode::TRANS_ID_SESSION_EVENT):
|
||||
return HandleSessionEvent(data, reply);
|
||||
case static_cast<uint32_t>(SessionInterfaceCode::TRANS_ID_UPDATE_SESSION_RECT):
|
||||
@ -418,15 +416,6 @@ int SessionStub::HandlePendingSessionActivation(MessageParcel& data, MessageParc
|
||||
return ERR_NONE;
|
||||
}
|
||||
|
||||
int SessionStub::HandleUpdateActivateStatus(MessageParcel& data, MessageParcel& reply)
|
||||
{
|
||||
WLOGFD("HandleUpdateActivateStatus!");
|
||||
bool isActive = data.ReadBool();
|
||||
const WSError& errCode = UpdateActiveStatus(isActive);
|
||||
reply.WriteUint32(static_cast<uint32_t>(errCode));
|
||||
return ERR_NONE;
|
||||
}
|
||||
|
||||
int SessionStub::HandleUpdateSessionRect(MessageParcel& data, MessageParcel& reply)
|
||||
{
|
||||
WLOGFD("HandleUpdateSessionRect!");
|
||||
|
@ -47,7 +47,6 @@ public:
|
||||
MOCK_METHOD2(HandleForeground, int(MessageParcel& data, MessageParcel& reply));
|
||||
MOCK_METHOD2(HandleBackground, int(MessageParcel& data, MessageParcel& reply));
|
||||
MOCK_METHOD2(HandleDisconnect, int(MessageParcel& data, MessageParcel& reply));
|
||||
MOCK_METHOD2(HandleUpdateActivateStatus, int(MessageParcel& data, MessageParcel& reply));
|
||||
MOCK_METHOD2(HandleSessionEvent, int(MessageParcel& data, MessageParcel& reply));
|
||||
MOCK_METHOD2(HandleUpdateSessionRect, int(MessageParcel& data, MessageParcel& reply));
|
||||
MOCK_METHOD2(HandleRaiseToAppTop, int(MessageParcel& data, MessageParcel& reply));
|
||||
|
@ -195,24 +195,6 @@ HWTEST_F(SessionProxyTest, NotifySessionException, Function | SmallTest | Level2
|
||||
GTEST_LOG_(INFO) << "SessionProxyTest: NotifySessionException end";
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: UpdateActiveStatus
|
||||
* @tc.desc: normal function
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
HWTEST_F(SessionProxyTest, UpdateActiveStatus, Function | SmallTest | Level2)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "SessionProxyTest: UpdateActiveStatus start";
|
||||
sptr<IRemoteObject> iRemoteObjectMocker = new IRemoteObjectMocker();
|
||||
SessionProxy* sProxy = new(std::nothrow) SessionProxy(iRemoteObjectMocker);
|
||||
sptr<AAFwk::SessionInfo> abilitySessionInfo = new(std::nothrow) AAFwk::SessionInfo();
|
||||
ASSERT_NE(abilitySessionInfo, nullptr);
|
||||
|
||||
WSError res = sProxy->UpdateActiveStatus(abilitySessionInfo);
|
||||
ASSERT_EQ(res, WSError::WS_OK);
|
||||
GTEST_LOG_(INFO) << "SessionProxyTest: UpdateActiveStatus end";
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: OnSessionEvent
|
||||
* @tc.desc: normal function
|
||||
|
@ -118,8 +118,6 @@ HWTEST_F(SessionStubTest, sessionStubTest01, Function | SmallTest | Level2)
|
||||
EXPECT_NE(data.WriteParcelable(&options), false);
|
||||
res = session_->HandleTerminateSession(data, reply);
|
||||
ASSERT_EQ(0, res);
|
||||
res = session_->HandleUpdateActivateStatus(data, reply);
|
||||
ASSERT_EQ(0, res);
|
||||
res = session_->HandleUpdateSessionRect(data, reply);
|
||||
ASSERT_EQ(0, res);
|
||||
res = session_->HandleRaiseToAppTop(data, reply);
|
||||
|
Loading…
Reference in New Issue
Block a user