mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 12:43:16 -04:00
GetDialogSessionInfo修复抛错误码
Signed-off-by: lidongrui <lidongrui3@huawei.com> Change-Id: I274df517c0f3570a9f83d93934f53b6eb5602b74
This commit is contained in:
@@ -74,6 +74,7 @@ private:
|
||||
auto errcode = AbilityManagerClient::GetInstance()->GetDialogSessionInfo(dialogSessionId, dialogSessionInfo);
|
||||
if (errcode || dialogSessionInfo == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::DIALOG, "GetDialogSessionInfo error");
|
||||
ThrowErrorByNativeErr(env, errcode);
|
||||
return CreateJsUndefined(env);
|
||||
}
|
||||
#endif // SUPPORT_SCREEN
|
||||
|
||||
@@ -3367,7 +3367,7 @@ int AbilityManagerStub::GetDialogSessionInfoInner(MessageParcel &data, MessagePa
|
||||
int result = GetDialogSessionInfo(dialogSessionId, info);
|
||||
if (result != ERR_OK || info == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "not find dialogSessionInfo");
|
||||
return ERR_INVALID_VALUE;
|
||||
return result;
|
||||
}
|
||||
if (!reply.WriteParcelable(info)) {
|
||||
return ERR_INVALID_VALUE;
|
||||
|
||||
@@ -2773,7 +2773,7 @@ HWTEST_F(AbilityManagerStubTest, AbilityManagerStub_GetDialogSessionInfoInner_00
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
auto res = stub_->GetDialogSessionInfoInner(data, reply);
|
||||
EXPECT_EQ(res, ERR_INVALID_VALUE);
|
||||
EXPECT_EQ(res, NO_ERROR);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user