mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2024-10-07 00:13:56 +00:00
!9237 增加动效参数,解决rk下的任务列表截图问题
Merge pull request !9237 from gongyuechen/wms_param__4.1
This commit is contained in:
commit
6b9c642c30
@ -958,7 +958,8 @@ public:
|
||||
* @param handler Indidate handler of WindowManagerService.
|
||||
* @return ErrCode Returns ERR_OK on success, others on failure.
|
||||
*/
|
||||
ErrCode RegisterWindowManagerServiceHandler(sptr<IWindowManagerServiceHandler> handler);
|
||||
ErrCode RegisterWindowManagerServiceHandler(sptr<IWindowManagerServiceHandler> handler,
|
||||
bool animationEnabled = true);
|
||||
|
||||
/**
|
||||
* WindowManager notification AbilityManager after the first frame is drawn.
|
||||
|
@ -774,7 +774,11 @@ public:
|
||||
* @param handler Indidate handler of WindowManagerService.
|
||||
* @return ErrCode Returns ERR_OK on success, others on failure.
|
||||
*/
|
||||
virtual int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler) = 0;
|
||||
virtual int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler,
|
||||
bool animationEnabled)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* WindowManager notification AbilityManager after the first frame is drawn.
|
||||
|
@ -636,7 +636,8 @@ public:
|
||||
virtual int SetMissionIcon(const sptr<IRemoteObject> &token,
|
||||
const std::shared_ptr<OHOS::Media::PixelMap> &icon) override;
|
||||
|
||||
virtual int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler) override;
|
||||
virtual int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler,
|
||||
bool animationEnabled) override;
|
||||
|
||||
virtual void CompleteFirstFrameDrawing(const sptr<IRemoteObject> &abilityToken) override;
|
||||
|
||||
|
@ -909,7 +909,8 @@ public:
|
||||
virtual int SetMissionIcon(const sptr<IRemoteObject> &token,
|
||||
const std::shared_ptr<OHOS::Media::PixelMap> &icon) override;
|
||||
|
||||
virtual int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler) override;
|
||||
virtual int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler,
|
||||
bool animationEnabled) override;
|
||||
|
||||
virtual void CompleteFirstFrameDrawing(const sptr<IRemoteObject> &abilityToken) override;
|
||||
|
||||
@ -931,6 +932,8 @@ public:
|
||||
int CreateModalDialog(const Want &replaceWant, sptr<IRemoteObject> callerToken, std::string dialogSessionId);
|
||||
|
||||
virtual int SendDialogResult(const Want &want, const std::string dialogSessionId, bool isAllowed) override;
|
||||
|
||||
bool GetAnimationFlag();
|
||||
#endif
|
||||
|
||||
void ClearUserData(int32_t userId);
|
||||
@ -1907,6 +1910,7 @@ private:
|
||||
std::shared_ptr<ImplicitStartProcessor> implicitStartProcessor_;
|
||||
sptr<IWindowManagerServiceHandler> wmsHandler_;
|
||||
std::shared_ptr<DialogSessionRecord> dialogSessionRecord_;
|
||||
bool isAnimationEnabled_ = true; //only use on mission list
|
||||
#endif
|
||||
std::shared_ptr<AbilityInterceptorExecuter> interceptorExecuter_;
|
||||
std::shared_ptr<AbilityInterceptorExecuter> afterCheckExecuter_;
|
||||
|
@ -1182,11 +1182,12 @@ ErrCode AbilityManagerClient::SetMissionIcon(
|
||||
return abms->SetMissionIcon(abilityToken, icon);
|
||||
}
|
||||
|
||||
ErrCode AbilityManagerClient::RegisterWindowManagerServiceHandler(sptr<IWindowManagerServiceHandler> handler)
|
||||
ErrCode AbilityManagerClient::RegisterWindowManagerServiceHandler(sptr<IWindowManagerServiceHandler> handler,
|
||||
bool animationEnabled)
|
||||
{
|
||||
auto abms = GetAbilityManager();
|
||||
CHECK_POINTER_RETURN_NOT_CONNECTED(abms);
|
||||
return abms->RegisterWindowManagerServiceHandler(handler);
|
||||
return abms->RegisterWindowManagerServiceHandler(handler, animationEnabled);
|
||||
}
|
||||
|
||||
void AbilityManagerClient::CompleteFirstFrameDrawing(sptr<IRemoteObject> abilityToken)
|
||||
|
@ -2706,7 +2706,8 @@ int AbilityManagerProxy::SetMissionIcon(const sptr<IRemoteObject> &token,
|
||||
return reply.ReadInt32();
|
||||
}
|
||||
|
||||
int AbilityManagerProxy::RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler)
|
||||
int AbilityManagerProxy::RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler,
|
||||
bool animationEnabled)
|
||||
{
|
||||
if (!handler) {
|
||||
HILOG_ERROR("%{public}s: handler is nullptr.", __func__);
|
||||
@ -2721,6 +2722,10 @@ int AbilityManagerProxy::RegisterWindowManagerServiceHandler(const sptr<IWindowM
|
||||
HILOG_ERROR("%{public}s: handler write failed.", __func__);
|
||||
return INNER_ERR;
|
||||
}
|
||||
if (!data.WriteBool(animationEnabled)) {
|
||||
HILOG_ERROR("write animationEnabled fail.");
|
||||
return ERR_INVALID_VALUE;
|
||||
}
|
||||
MessageOption option;
|
||||
MessageParcel reply;
|
||||
auto error = SendRequest(AbilityManagerInterfaceCode::REGISTER_WMS_HANDLER, data, reply, option);
|
||||
|
@ -7837,7 +7837,8 @@ int AbilityManagerService::SetMissionIcon(const sptr<IRemoteObject> &token,
|
||||
return missionListManager->SetMissionIcon(token, icon);
|
||||
}
|
||||
|
||||
int AbilityManagerService::RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler> &handler)
|
||||
int AbilityManagerService::RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler> &handler,
|
||||
bool animationEnabled)
|
||||
{
|
||||
auto isSaCall = AAFwk::PermissionVerification::GetInstance()->IsSACall();
|
||||
if (!isSaCall) {
|
||||
@ -7845,6 +7846,7 @@ int AbilityManagerService::RegisterWindowManagerServiceHandler(const sptr<IWindo
|
||||
return CHECK_PERMISSION_FAILED;
|
||||
}
|
||||
wmsHandler_ = handler;
|
||||
isAnimationEnabled_ = animationEnabled;
|
||||
HILOG_DEBUG("%{public}s: WMS handler registered successfully.", __func__);
|
||||
return ERR_OK;
|
||||
}
|
||||
@ -8016,6 +8018,11 @@ void AbilityManagerService::InitPrepareTerminateConfig()
|
||||
isPrepareTerminateEnable_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool AbilityManagerService::GetAnimationFlag()
|
||||
{
|
||||
return isAnimationEnabled_;
|
||||
}
|
||||
#endif
|
||||
|
||||
int AbilityManagerService::CheckCallServicePermission(const AbilityRequest &abilityRequest)
|
||||
|
@ -2387,7 +2387,8 @@ int AbilityManagerStub::RegisterWindowManagerServiceHandlerInner(MessageParcel &
|
||||
HILOG_ERROR("%{public}s read WMS handler failed!", __func__);
|
||||
return ERR_NULL_OBJECT;
|
||||
}
|
||||
return RegisterWindowManagerServiceHandler(handler);
|
||||
bool animationEnabled = data.ReadBool();
|
||||
return RegisterWindowManagerServiceHandler(handler, animationEnabled);
|
||||
}
|
||||
|
||||
int AbilityManagerStub::CompleteFirstFrameDrawingInner(MessageParcel &data, MessageParcel &reply)
|
||||
|
@ -1981,7 +1981,8 @@ void MissionListManager::MoveToBackgroundTask(const std::shared_ptr<AbilityRecor
|
||||
HILOG_INFO("ability:%{public}s.", abilityRecord->GetAbilityInfo().name.c_str());
|
||||
abilityRecord->SetIsNewWant(false);
|
||||
if (abilityRecord->lifeCycleStateInfo_.sceneFlag != SCENE_FLAG_KEYGUARD &&
|
||||
!abilityRecord->IsClearMissionFlag() && !isClose) {
|
||||
!abilityRecord->IsClearMissionFlag() &&
|
||||
!(isClose && OHOS::DelayedSingleton<AbilityManagerService>::GetInstance()->GetAnimationFlag())) {
|
||||
UpdateMissionSnapshot(abilityRecord);
|
||||
}
|
||||
|
||||
|
@ -310,7 +310,8 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler) override
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler,
|
||||
bool animationEnabled = true) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -274,7 +274,8 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler) override
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler,
|
||||
bool animationEnabled = true) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -471,7 +471,8 @@ int MockAbilityDelegatorStub::SetMissionIcon(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int MockAbilityDelegatorStub::RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler)
|
||||
int MockAbilityDelegatorStub::RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler,
|
||||
bool animationEnabled)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -482,7 +483,8 @@ int MockAbilityDelegatorStub2::SetMissionIcon(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int MockAbilityDelegatorStub2::RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler)
|
||||
int MockAbilityDelegatorStub2::RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler,
|
||||
bool animationEnabled)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -183,7 +183,8 @@ public:
|
||||
MOCK_METHOD2(SetMissionLabel, int(const sptr<IRemoteObject>& token, const std::string& label));
|
||||
int SetMissionIcon(
|
||||
const sptr<IRemoteObject>& token, const std::shared_ptr<OHOS::Media::PixelMap>& icon) override;
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler);
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler,
|
||||
bool animationEnabled = true);
|
||||
void CompleteFirstFrameDrawing(const sptr<IRemoteObject>& abilityToken) override {}
|
||||
#endif
|
||||
MOCK_METHOD2(IsValidMissionIds, int32_t(const std::vector<int32_t>&, std::vector<MissionValidResult>&));
|
||||
@ -363,7 +364,8 @@ public:
|
||||
MOCK_METHOD2(SetMissionLabel, int(const sptr<IRemoteObject>& token, const std::string& label));
|
||||
int SetMissionIcon(
|
||||
const sptr<IRemoteObject>& token, const std::shared_ptr<OHOS::Media::PixelMap>& icon) override;
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler);
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler,
|
||||
bool animationEnabled = true);
|
||||
void CompleteFirstFrameDrawing(const sptr<IRemoteObject>& abilityToken) override {}
|
||||
#endif
|
||||
MOCK_METHOD2(IsValidMissionIds, int32_t(const std::vector<int32_t>&, std::vector<MissionValidResult>&));
|
||||
|
@ -265,7 +265,8 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler) override
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler,
|
||||
bool animationEnabled = true) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -288,7 +288,8 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler) override
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler,
|
||||
bool animationEnabled = true) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -190,7 +190,8 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler) override
|
||||
virtual int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler,
|
||||
bool animationEnabled = true) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -272,7 +272,8 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler) override
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler,
|
||||
bool animationEnabled = true) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -1580,7 +1580,7 @@ HWTEST_F(AbilityManagerProxyTest, AbilityManagerProxy_SetMissionLabel_001, TestS
|
||||
HWTEST_F(AbilityManagerProxyTest, AbilityManagerProxy_RegisterWindowManagerServiceHandler_001, TestSize.Level1)
|
||||
{
|
||||
sptr<IWindowManagerServiceHandler> handler = nullptr;
|
||||
auto res = proxy_->RegisterWindowManagerServiceHandler(handler);
|
||||
auto res = proxy_->RegisterWindowManagerServiceHandler(handler, true);
|
||||
EXPECT_EQ(res, INNER_ERR);
|
||||
}
|
||||
|
||||
|
@ -279,7 +279,8 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler) override
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler,
|
||||
bool animationEnabled = true) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -344,7 +344,8 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler) override
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler,
|
||||
bool animationEnabled = true) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -263,7 +263,8 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler) override
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler,
|
||||
bool animationEnabled = true) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -248,7 +248,8 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler) override
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler,
|
||||
bool animationEnabled = true) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -255,7 +255,8 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler) override
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler,
|
||||
bool animationEnabled = true) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -206,7 +206,8 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler) override
|
||||
int RegisterWindowManagerServiceHandler(const sptr<IWindowManagerServiceHandler>& handler,
|
||||
bool animationEnabled = true) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user