From 7ed56f79d8938b257682ceeb84e1a8e94da979e7 Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Fri, 9 Jul 2021 01:58:50 +0000 Subject: [PATCH 01/27] =?UTF-8?q?CI=E6=B5=8B=E8=AF=95=EF=BC=8C=E8=AF=B7?= =?UTF-8?q?=E5=8B=BF=E5=90=88=E5=85=A5=EF=BC=81=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frameworks/ability_lite/src/ability.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frameworks/ability_lite/src/ability.cpp b/frameworks/ability_lite/src/ability.cpp index 2d17c4d..188dfa1 100755 --- a/frameworks/ability_lite/src/ability.cpp +++ b/frameworks/ability_lite/src/ability.cpp @@ -74,6 +74,12 @@ void Ability::OnActive(const Want &want) if ((abilityWindow_ != nullptr) && (abilityState_ == STATE_BACKGROUND)) { abilityWindow_->OnPostAbilityActive(); } + if ((abilityWindow_ != nullptr) && (abilityState_ == STATE_BACKGROUND)) { + abilityWindow_->OnPostAbilityActive(); + } + if ((abilityWindow_ != nullptr) && (abilityState_ == STATE_BACKGROUND)) { + abilityWindow_->OnPostAbilityActive(); + } #endif abilityState_ = STATE_ACTIVE; } -- Gitee From 6ca401552989bb1e4282cecdb8c199cb0a45f34f Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Fri, 9 Jul 2021 03:02:01 +0000 Subject: [PATCH 02/27] =?UTF-8?q?CI=E6=B5=8B=E8=AF=95=EF=BC=8C=E8=AF=B7?= =?UTF-8?q?=E5=8B=BF=E5=90=88=E5=85=A5=EF=BC=81=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/abilitymgr_lite/src/test.cpp | 154 ++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 services/abilitymgr_lite/src/test.cpp diff --git a/services/abilitymgr_lite/src/test.cpp b/services/abilitymgr_lite/src/test.cpp new file mode 100644 index 0000000..065aaae --- /dev/null +++ b/services/abilitymgr_lite/src/test.cpp @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ability_connect_mission.h" + +#include + +#include "util/abilityms_log.h" + +namespace OHOS { +AbilityConnectMission::~AbilityConnectMission() +{ + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end(); ++iterator) { + auto record = *iterator; + delete record; + } + serviceRecords_.clear(); + PRINTD("AbilityConnectMission", "Constructor"); +} + +void AbilityConnectMission::PushServiceRecord(PageAbilityRecord &abilityRecord) +{ + serviceRecords_.emplace_back(&abilityRecord); +} + +PageAbilityRecord *AbilityConnectMission::FindServiceRecord(uint64_t token) const +{ + for (const auto record : serviceRecords_) { + if (record != nullptr && record->GetToken() == token) { + return record; + } + } + return nullptr; +} + +PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const char *bundleName, const char *abilityName) const +{ + CHECK_NULLPTR_RETURN_PTR(bundleName, "AbilityConnectMission", "invalid argument"); + CHECK_NULLPTR_RETURN_PTR(abilityName, "AbilityConnectMission", "invalid argument"); + for (const auto record : serviceRecords_) { + if (record != nullptr) { + const char *recordBundleName = record->GetAbilityInfo().bundleName; + const char *recordAbilityName = record->GetAbilityInfo().name; + if (recordBundleName == nullptr || recordAbilityName == nullptr) { + continue; + } + if (strcmp(recordBundleName, bundleName) == 0 && strcmp(recordAbilityName, abilityName) == 0) { + return record; + } + } + } + return nullptr; +} + +PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const SvcIdentity &connectSid, uint64_t abilityToken) const +{ + for (const auto record : serviceRecords_) { + if (record != nullptr && record->GetConnectRecord(connectSid, abilityToken) != nullptr) { + return record; + } + } + return nullptr; +} + +void AbilityConnectMission::RemoveServiceRecord(uint64_t token) +{ + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end();) { + auto record = *iterator; + if (record != nullptr && record->GetToken() == token) { + iterator = serviceRecords_.erase(iterator); + delete record; + } else { + ++iterator; + } + } +} + +void AbilityConnectMission::RemoveServiceRecord(const char *bundleName) +{ + CHECK_NULLPTR_RETURN(bundleName, "AbilityConnectMission", "invalid argument"); + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end();) { + auto record = *iterator; + if (record != nullptr && record->IsSamePageAbility(bundleName)) { + AbilityMsStatus status = record->StopAbilityDone(); + if (!status.IsOk()) { + PRINTW("RemoveServiceRecord", "service disconnectDoneTransaction failed"); + } + iterator = serviceRecords_.erase(iterator); + delete record; + } else { + ++iterator; + } + } +} + +int32_t AbilityConnectMission::CountServiceInApp(const char *bundleName) +{ + if (bundleName == nullptr) { + return 0; + } + int32_t retVal = 0; + for (const auto record : serviceRecords_) { + if (record == nullptr) { + continue; + } + if (record->GetAbilityInfo().bundleName != nullptr && + strcmp(record->GetAbilityInfo().bundleName, bundleName) == 0) { + retVal++; + } + } + return retVal; +} + +#ifdef OHOS_DEBUG +AbilityMsStatus AbilityConnectMission::DumpConnectMission() const +{ + if (serviceRecords_.empty()) { + return AbilityMsStatus::DumpStatus(""); + } + std::string connectInfo = "ConnectMission: \n"; + AbilityMsStatus result = AbilityMsStatus::DumpStatus(connectInfo.c_str()); + for (const auto target : serviceRecords_) { + if (target != nullptr) { + result.DumpAppend(target->DumpAbilityRecord()); + } + } + return result; +} +#endif + +void AbilityConnectMission::RemoveConnectRecordByPageToken(uint64_t token, const char *bundleName) +{ + CHECK_NULLPTR_RETURN(bundleName, "AbilityConnectMission", "invalid argument"); + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end(); ++iterator) { + auto record = *iterator; + if (record != nullptr && record->GetAbilityInfo().bundleName != nullptr && + strcmp(record->GetAbilityInfo().bundleName, bundleName) != 0) { + record->RemoveConnectRecordByPageToken(token); + } + } +} +} // namespace OHOS -- Gitee From addceaf4f01474c6057cc0c54be0160aaf949489 Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Fri, 9 Jul 2021 03:02:26 +0000 Subject: [PATCH 03/27] =?UTF-8?q?CI=E6=B5=8B=E8=AF=95=EF=BC=8C=E8=AF=B7?= =?UTF-8?q?=E5=8B=BF=E5=90=88=E5=85=A5=EF=BC=81=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test.cpp | 154 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 test.cpp diff --git a/test.cpp b/test.cpp new file mode 100644 index 0000000..065aaae --- /dev/null +++ b/test.cpp @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ability_connect_mission.h" + +#include + +#include "util/abilityms_log.h" + +namespace OHOS { +AbilityConnectMission::~AbilityConnectMission() +{ + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end(); ++iterator) { + auto record = *iterator; + delete record; + } + serviceRecords_.clear(); + PRINTD("AbilityConnectMission", "Constructor"); +} + +void AbilityConnectMission::PushServiceRecord(PageAbilityRecord &abilityRecord) +{ + serviceRecords_.emplace_back(&abilityRecord); +} + +PageAbilityRecord *AbilityConnectMission::FindServiceRecord(uint64_t token) const +{ + for (const auto record : serviceRecords_) { + if (record != nullptr && record->GetToken() == token) { + return record; + } + } + return nullptr; +} + +PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const char *bundleName, const char *abilityName) const +{ + CHECK_NULLPTR_RETURN_PTR(bundleName, "AbilityConnectMission", "invalid argument"); + CHECK_NULLPTR_RETURN_PTR(abilityName, "AbilityConnectMission", "invalid argument"); + for (const auto record : serviceRecords_) { + if (record != nullptr) { + const char *recordBundleName = record->GetAbilityInfo().bundleName; + const char *recordAbilityName = record->GetAbilityInfo().name; + if (recordBundleName == nullptr || recordAbilityName == nullptr) { + continue; + } + if (strcmp(recordBundleName, bundleName) == 0 && strcmp(recordAbilityName, abilityName) == 0) { + return record; + } + } + } + return nullptr; +} + +PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const SvcIdentity &connectSid, uint64_t abilityToken) const +{ + for (const auto record : serviceRecords_) { + if (record != nullptr && record->GetConnectRecord(connectSid, abilityToken) != nullptr) { + return record; + } + } + return nullptr; +} + +void AbilityConnectMission::RemoveServiceRecord(uint64_t token) +{ + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end();) { + auto record = *iterator; + if (record != nullptr && record->GetToken() == token) { + iterator = serviceRecords_.erase(iterator); + delete record; + } else { + ++iterator; + } + } +} + +void AbilityConnectMission::RemoveServiceRecord(const char *bundleName) +{ + CHECK_NULLPTR_RETURN(bundleName, "AbilityConnectMission", "invalid argument"); + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end();) { + auto record = *iterator; + if (record != nullptr && record->IsSamePageAbility(bundleName)) { + AbilityMsStatus status = record->StopAbilityDone(); + if (!status.IsOk()) { + PRINTW("RemoveServiceRecord", "service disconnectDoneTransaction failed"); + } + iterator = serviceRecords_.erase(iterator); + delete record; + } else { + ++iterator; + } + } +} + +int32_t AbilityConnectMission::CountServiceInApp(const char *bundleName) +{ + if (bundleName == nullptr) { + return 0; + } + int32_t retVal = 0; + for (const auto record : serviceRecords_) { + if (record == nullptr) { + continue; + } + if (record->GetAbilityInfo().bundleName != nullptr && + strcmp(record->GetAbilityInfo().bundleName, bundleName) == 0) { + retVal++; + } + } + return retVal; +} + +#ifdef OHOS_DEBUG +AbilityMsStatus AbilityConnectMission::DumpConnectMission() const +{ + if (serviceRecords_.empty()) { + return AbilityMsStatus::DumpStatus(""); + } + std::string connectInfo = "ConnectMission: \n"; + AbilityMsStatus result = AbilityMsStatus::DumpStatus(connectInfo.c_str()); + for (const auto target : serviceRecords_) { + if (target != nullptr) { + result.DumpAppend(target->DumpAbilityRecord()); + } + } + return result; +} +#endif + +void AbilityConnectMission::RemoveConnectRecordByPageToken(uint64_t token, const char *bundleName) +{ + CHECK_NULLPTR_RETURN(bundleName, "AbilityConnectMission", "invalid argument"); + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end(); ++iterator) { + auto record = *iterator; + if (record != nullptr && record->GetAbilityInfo().bundleName != nullptr && + strcmp(record->GetAbilityInfo().bundleName, bundleName) != 0) { + record->RemoveConnectRecordByPageToken(token); + } + } +} +} // namespace OHOS -- Gitee From fa12181503fa9fd53db5ef01d4e23abb4ee29348 Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Fri, 9 Jul 2021 03:10:39 +0000 Subject: [PATCH 04/27] =?UTF-8?q?CI=E6=B5=8B=E8=AF=95=EF=BC=8C=E8=AF=B7?= =?UTF-8?q?=E5=8B=BF=E5=90=88=E5=85=A5=EF=BC=81=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test.cpp b/test.cpp index 065aaae..08de859 100644 --- a/test.cpp +++ b/test.cpp @@ -71,6 +71,11 @@ PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const SvcIdentity &c return record; } } + for (const auto record : serviceRecords_) { + if (true) { + return record; + } + } return nullptr; } -- Gitee From f1048015ef9ad4456ee2aef8292ada0537dc7b47 Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Fri, 9 Jul 2021 05:29:10 +0000 Subject: [PATCH 05/27] =?UTF-8?q?CI=E6=B5=8B=E8=AF=95=EF=BC=8C=E8=AF=B7?= =?UTF-8?q?=E5=8B=BF=E5=90=88=E5=85=A5=EF=BC=81=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test02.cpp | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 test02.cpp diff --git a/test02.cpp b/test02.cpp new file mode 100644 index 0000000..08de859 --- /dev/null +++ b/test02.cpp @@ -0,0 +1,159 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ability_connect_mission.h" + +#include + +#include "util/abilityms_log.h" + +namespace OHOS { +AbilityConnectMission::~AbilityConnectMission() +{ + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end(); ++iterator) { + auto record = *iterator; + delete record; + } + serviceRecords_.clear(); + PRINTD("AbilityConnectMission", "Constructor"); +} + +void AbilityConnectMission::PushServiceRecord(PageAbilityRecord &abilityRecord) +{ + serviceRecords_.emplace_back(&abilityRecord); +} + +PageAbilityRecord *AbilityConnectMission::FindServiceRecord(uint64_t token) const +{ + for (const auto record : serviceRecords_) { + if (record != nullptr && record->GetToken() == token) { + return record; + } + } + return nullptr; +} + +PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const char *bundleName, const char *abilityName) const +{ + CHECK_NULLPTR_RETURN_PTR(bundleName, "AbilityConnectMission", "invalid argument"); + CHECK_NULLPTR_RETURN_PTR(abilityName, "AbilityConnectMission", "invalid argument"); + for (const auto record : serviceRecords_) { + if (record != nullptr) { + const char *recordBundleName = record->GetAbilityInfo().bundleName; + const char *recordAbilityName = record->GetAbilityInfo().name; + if (recordBundleName == nullptr || recordAbilityName == nullptr) { + continue; + } + if (strcmp(recordBundleName, bundleName) == 0 && strcmp(recordAbilityName, abilityName) == 0) { + return record; + } + } + } + return nullptr; +} + +PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const SvcIdentity &connectSid, uint64_t abilityToken) const +{ + for (const auto record : serviceRecords_) { + if (record != nullptr && record->GetConnectRecord(connectSid, abilityToken) != nullptr) { + return record; + } + } + for (const auto record : serviceRecords_) { + if (true) { + return record; + } + } + return nullptr; +} + +void AbilityConnectMission::RemoveServiceRecord(uint64_t token) +{ + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end();) { + auto record = *iterator; + if (record != nullptr && record->GetToken() == token) { + iterator = serviceRecords_.erase(iterator); + delete record; + } else { + ++iterator; + } + } +} + +void AbilityConnectMission::RemoveServiceRecord(const char *bundleName) +{ + CHECK_NULLPTR_RETURN(bundleName, "AbilityConnectMission", "invalid argument"); + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end();) { + auto record = *iterator; + if (record != nullptr && record->IsSamePageAbility(bundleName)) { + AbilityMsStatus status = record->StopAbilityDone(); + if (!status.IsOk()) { + PRINTW("RemoveServiceRecord", "service disconnectDoneTransaction failed"); + } + iterator = serviceRecords_.erase(iterator); + delete record; + } else { + ++iterator; + } + } +} + +int32_t AbilityConnectMission::CountServiceInApp(const char *bundleName) +{ + if (bundleName == nullptr) { + return 0; + } + int32_t retVal = 0; + for (const auto record : serviceRecords_) { + if (record == nullptr) { + continue; + } + if (record->GetAbilityInfo().bundleName != nullptr && + strcmp(record->GetAbilityInfo().bundleName, bundleName) == 0) { + retVal++; + } + } + return retVal; +} + +#ifdef OHOS_DEBUG +AbilityMsStatus AbilityConnectMission::DumpConnectMission() const +{ + if (serviceRecords_.empty()) { + return AbilityMsStatus::DumpStatus(""); + } + std::string connectInfo = "ConnectMission: \n"; + AbilityMsStatus result = AbilityMsStatus::DumpStatus(connectInfo.c_str()); + for (const auto target : serviceRecords_) { + if (target != nullptr) { + result.DumpAppend(target->DumpAbilityRecord()); + } + } + return result; +} +#endif + +void AbilityConnectMission::RemoveConnectRecordByPageToken(uint64_t token, const char *bundleName) +{ + CHECK_NULLPTR_RETURN(bundleName, "AbilityConnectMission", "invalid argument"); + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end(); ++iterator) { + auto record = *iterator; + if (record != nullptr && record->GetAbilityInfo().bundleName != nullptr && + strcmp(record->GetAbilityInfo().bundleName, bundleName) != 0) { + record->RemoveConnectRecordByPageToken(token); + } + } +} +} // namespace OHOS -- Gitee From 754e0f6f4f0bc322489bf014eddc657e9f1eb829 Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Fri, 9 Jul 2021 06:03:17 +0000 Subject: [PATCH 06/27] =?UTF-8?q?CI=E6=B5=8B=E8=AF=95=EF=BC=8C=E8=AF=B7?= =?UTF-8?q?=E5=8B=BF=E5=90=88=E5=85=A5=EF=BC=81=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test03.cpp | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 test03.cpp diff --git a/test03.cpp b/test03.cpp new file mode 100644 index 0000000..ed85eb0 --- /dev/null +++ b/test03.cpp @@ -0,0 +1,159 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ability_connect_mission.h" + +#include + +#include "util/abilityms_log.h" + +namespace OHOS { +AbilityConnectMission::~AbilityConnectMission() +{ + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end(); ++iterator) { + auto record = *iterator; + delete record; + }\ + serviceRecords_.clear();\ + PRINTD("AbilityConnectMission", "Constructor"); +}\ + +void AbilityConnectMission::PushServiceRecord(PageAbilityRecord &abilityRecord) +{ + serviceRecords_.emplace_back(&abilityRecord); +} + +PageAbilityRecord *AbilityConnectMission::FindServiceRecord(uint64_t token) const +{ + for (const auto record : serviceRecords_) { + if (record != nullptr && record->GetToken() == token) { + return record; + } + } + return nullptr; +} + +PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const char *bundleName, const char *abilityName) const +{ + CHECK_NULLPTR_RETURN_PTR(bundleName, "AbilityConnectMission", "invalid argument"); + CHECK_NULLPTR_RETURN_PTR(abilityName, "AbilityConnectMission", "invalid argument"); + for (const auto record : serviceRecords_) { + if (record != nullptr) { + const char *recordBundleName = record->GetAbilityInfo().bundleName; + const char *recordAbilityName = record->GetAbilityInfo().name; + if (recordBundleName == nullptr || recordAbilityName == nullptr) { + continue; + } + if (strcmp(recordBundleName, bundleName) == 0 && strcmp(recordAbilityName, abilityName) == 0) { + return record; + } + } + } + return nullptr; +} + +PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const SvcIdentity &connectSid, uint64_t abilityToken) const +{ + for (const auto record : serviceRecords_) { + if (record != nullptr && record->GetConnectRecord(connectSid, abilityToken) != nullptr) { + return record; + } + } + for (const auto record : serviceRecords_) { + if (true) { + return record; + } + } + return nullptr; +} + +void AbilityConnectMission::RemoveServiceRecord(uint64_t token) +{ + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end();) { + auto record = *iterator; + if (record != nullptr && record->GetToken() == token) { + iterator = serviceRecords_.erase(iterator); + delete record; + } else { + ++iterator; + } + } +} + +void AbilityConnectMission::RemoveServiceRecord(const char *bundleName) +{ + CHECK_NULLPTR_RETURN(bundleName, "AbilityConnectMission", "invalid argument"); + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end();) { + auto record = *iterator; + if (record != nullptr && record->IsSamePageAbility(bundleName)) { + AbilityMsStatus status = record->StopAbilityDone(); + if (!status.IsOk()) { + PRINTW("RemoveServiceRecord", "service disconnectDoneTransaction failed"); + } + iterator = serviceRecords_.erase(iterator); + delete record; + } else { + ++iterator; + } + } +} + +int32_t AbilityConnectMission::CountServiceInApp(const char *bundleName) +{ + if (bundleName == nullptr) { + return 0; + } + int32_t retVal = 0; + for (const auto record : serviceRecords_) { + if (record == nullptr) { + continue; + } + if (record->GetAbilityInfo().bundleName != nullptr && + strcmp(record->GetAbilityInfo().bundleName, bundleName) == 0) { + retVal++; + } + } + return retVal; +} + +#ifdef OHOS_DEBUG +AbilityMsStatus AbilityConnectMission::DumpConnectMission() const +{ + if (serviceRecords_.empty()) { + return AbilityMsStatus::DumpStatus(""); + } + std::string connectInfo = "ConnectMission: \n"; + AbilityMsStatus result = AbilityMsStatus::DumpStatus(connectInfo.c_str()); + for (const auto target : serviceRecords_) { + if (target != nullptr) { + result.DumpAppend(target->DumpAbilityRecord()); + } + } + return result; +} +#endif + +void AbilityConnectMission::RemoveConnectRecordByPageToken(uint64_t token, const char *bundleName) +{ + CHECK_NULLPTR_RETURN(bundleName, "AbilityConnectMission", "invalid argument"); + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end(); ++iterator) { + auto record = *iterator; + if (record != nullptr && record->GetAbilityInfo().bundleName != nullptr && + strcmp(record->GetAbilityInfo().bundleName, bundleName) != 0) {\ + record->RemoveConnectRecordByPageToken(token); + }\ + }\ +} +} // namespace OHOS -- Gitee From 47aa6116f356dde991bcdcc181af7ea12e5ef280 Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Fri, 9 Jul 2021 06:12:10 +0000 Subject: [PATCH 07/27] add test04.cpp. --- test04.cpp | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 test04.cpp diff --git a/test04.cpp b/test04.cpp new file mode 100644 index 0000000..ed85eb0 --- /dev/null +++ b/test04.cpp @@ -0,0 +1,159 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ability_connect_mission.h" + +#include + +#include "util/abilityms_log.h" + +namespace OHOS { +AbilityConnectMission::~AbilityConnectMission() +{ + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end(); ++iterator) { + auto record = *iterator; + delete record; + }\ + serviceRecords_.clear();\ + PRINTD("AbilityConnectMission", "Constructor"); +}\ + +void AbilityConnectMission::PushServiceRecord(PageAbilityRecord &abilityRecord) +{ + serviceRecords_.emplace_back(&abilityRecord); +} + +PageAbilityRecord *AbilityConnectMission::FindServiceRecord(uint64_t token) const +{ + for (const auto record : serviceRecords_) { + if (record != nullptr && record->GetToken() == token) { + return record; + } + } + return nullptr; +} + +PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const char *bundleName, const char *abilityName) const +{ + CHECK_NULLPTR_RETURN_PTR(bundleName, "AbilityConnectMission", "invalid argument"); + CHECK_NULLPTR_RETURN_PTR(abilityName, "AbilityConnectMission", "invalid argument"); + for (const auto record : serviceRecords_) { + if (record != nullptr) { + const char *recordBundleName = record->GetAbilityInfo().bundleName; + const char *recordAbilityName = record->GetAbilityInfo().name; + if (recordBundleName == nullptr || recordAbilityName == nullptr) { + continue; + } + if (strcmp(recordBundleName, bundleName) == 0 && strcmp(recordAbilityName, abilityName) == 0) { + return record; + } + } + } + return nullptr; +} + +PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const SvcIdentity &connectSid, uint64_t abilityToken) const +{ + for (const auto record : serviceRecords_) { + if (record != nullptr && record->GetConnectRecord(connectSid, abilityToken) != nullptr) { + return record; + } + } + for (const auto record : serviceRecords_) { + if (true) { + return record; + } + } + return nullptr; +} + +void AbilityConnectMission::RemoveServiceRecord(uint64_t token) +{ + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end();) { + auto record = *iterator; + if (record != nullptr && record->GetToken() == token) { + iterator = serviceRecords_.erase(iterator); + delete record; + } else { + ++iterator; + } + } +} + +void AbilityConnectMission::RemoveServiceRecord(const char *bundleName) +{ + CHECK_NULLPTR_RETURN(bundleName, "AbilityConnectMission", "invalid argument"); + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end();) { + auto record = *iterator; + if (record != nullptr && record->IsSamePageAbility(bundleName)) { + AbilityMsStatus status = record->StopAbilityDone(); + if (!status.IsOk()) { + PRINTW("RemoveServiceRecord", "service disconnectDoneTransaction failed"); + } + iterator = serviceRecords_.erase(iterator); + delete record; + } else { + ++iterator; + } + } +} + +int32_t AbilityConnectMission::CountServiceInApp(const char *bundleName) +{ + if (bundleName == nullptr) { + return 0; + } + int32_t retVal = 0; + for (const auto record : serviceRecords_) { + if (record == nullptr) { + continue; + } + if (record->GetAbilityInfo().bundleName != nullptr && + strcmp(record->GetAbilityInfo().bundleName, bundleName) == 0) { + retVal++; + } + } + return retVal; +} + +#ifdef OHOS_DEBUG +AbilityMsStatus AbilityConnectMission::DumpConnectMission() const +{ + if (serviceRecords_.empty()) { + return AbilityMsStatus::DumpStatus(""); + } + std::string connectInfo = "ConnectMission: \n"; + AbilityMsStatus result = AbilityMsStatus::DumpStatus(connectInfo.c_str()); + for (const auto target : serviceRecords_) { + if (target != nullptr) { + result.DumpAppend(target->DumpAbilityRecord()); + } + } + return result; +} +#endif + +void AbilityConnectMission::RemoveConnectRecordByPageToken(uint64_t token, const char *bundleName) +{ + CHECK_NULLPTR_RETURN(bundleName, "AbilityConnectMission", "invalid argument"); + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end(); ++iterator) { + auto record = *iterator; + if (record != nullptr && record->GetAbilityInfo().bundleName != nullptr && + strcmp(record->GetAbilityInfo().bundleName, bundleName) != 0) {\ + record->RemoveConnectRecordByPageToken(token); + }\ + }\ +} +} // namespace OHOS -- Gitee From 721dd805ca6061689cbdde8cc7c277c0f88757ce Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Fri, 9 Jul 2021 06:44:56 +0000 Subject: [PATCH 08/27] update test.cpp. --- test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.cpp b/test.cpp index 08de859..c4e3828 100644 --- a/test.cpp +++ b/test.cpp @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +/ #include "ability_connect_mission.h" #include -- Gitee From 4b4440b47b10336963f61d3578053f06b8fbf484 Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Fri, 9 Jul 2021 07:19:52 +0000 Subject: [PATCH 09/27] update test02.cpp. --- test02.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test02.cpp b/test02.cpp index 08de859..f4d8278 100644 --- a/test02.cpp +++ b/test02.cpp @@ -14,7 +14,7 @@ */ #include "ability_connect_mission.h" - +\\\\\\\\\\\\\\\\\\\\\\\\ #include #include "util/abilityms_log.h" -- Gitee From 32f6c4a6961bb59094ef76a77afabc187b000084 Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Fri, 9 Jul 2021 07:43:08 +0000 Subject: [PATCH 10/27] add test05.cpp. --- test05.cpp | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 test05.cpp diff --git a/test05.cpp b/test05.cpp new file mode 100644 index 0000000..84a12da --- /dev/null +++ b/test05.cpp @@ -0,0 +1,159 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +\\\\\\\\\\\\\\\\ +#include "ability_connect_mission.h" + +#include + +#include "util/abilityms_log.h" + +namespace OHOS { +AbilityConnectMission::~AbilityConnectMission() +{ + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end(); ++iterator) { + auto record = *iterator; + delete record; + }\ + serviceRecords_.clear();\ + PRINTD("AbilityConnectMission", "Constructor"); +}\ + +void AbilityConnectMission::PushServiceRecord(PageAbilityRecord &abilityRecord) +{ + serviceRecords_.emplace_back(&abilityRecord); +} + +PageAbilityRecord *AbilityConnectMission::FindServiceRecord(uint64_t token) const +{ + for (const auto record : serviceRecords_) { + if (record != nullptr && record->GetToken() == token) { + return record; + } + } + return nullptr; +} + +PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const char *bundleName, const char *abilityName) const +{ + CHECK_NULLPTR_RETURN_PTR(bundleName, "AbilityConnectMission", "invalid argument"); + CHECK_NULLPTR_RETURN_PTR(abilityName, "AbilityConnectMission", "invalid argument"); + for (const auto record : serviceRecords_) { + if (record != nullptr) { + const char *recordBundleName = record->GetAbilityInfo().bundleName; + const char *recordAbilityName = record->GetAbilityInfo().name; + if (recordBundleName == nullptr || recordAbilityName == nullptr) { + continue; + } + if (strcmp(recordBundleName, bundleName) == 0 && strcmp(recordAbilityName, abilityName) == 0) { + return record; + } + } + } + return nullptr; +} + +PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const SvcIdentity &connectSid, uint64_t abilityToken) const +{ + for (const auto record : serviceRecords_) { + if (record != nullptr && record->GetConnectRecord(connectSid, abilityToken) != nullptr) { + return record; + } + } + for (const auto record : serviceRecords_) { + if (true) { + return record; + } + } + return nullptr; +} + +void AbilityConnectMission::RemoveServiceRecord(uint64_t token) +{ + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end();) { + auto record = *iterator; + if (record != nullptr && record->GetToken() == token) { + iterator = serviceRecords_.erase(iterator); + delete record; + } else { + ++iterator; + } + } +} + +void AbilityConnectMission::RemoveServiceRecord(const char *bundleName) +{ + CHECK_NULLPTR_RETURN(bundleName, "AbilityConnectMission", "invalid argument"); + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end();) { + auto record = *iterator; + if (record != nullptr && record->IsSamePageAbility(bundleName)) { + AbilityMsStatus status = record->StopAbilityDone(); + if (!status.IsOk()) { + PRINTW("RemoveServiceRecord", "service disconnectDoneTransaction failed"); + } + iterator = serviceRecords_.erase(iterator); + delete record; + } else { + ++iterator; + } + } +} + +int32_t AbilityConnectMission::CountServiceInApp(const char *bundleName) +{ + if (bundleName == nullptr) { + return 0; + } + int32_t retVal = 0; + for (const auto record : serviceRecords_) { + if (record == nullptr) { + continue; + } + if (record->GetAbilityInfo().bundleName != nullptr && + strcmp(record->GetAbilityInfo().bundleName, bundleName) == 0) { + retVal++; + } + } + return retVal; +} + +#ifdef OHOS_DEBUG +AbilityMsStatus AbilityConnectMission::DumpConnectMission() const +{ + if (serviceRecords_.empty()) { + return AbilityMsStatus::DumpStatus(""); + } + std::string connectInfo = "ConnectMission: \n"; + AbilityMsStatus result = AbilityMsStatus::DumpStatus(connectInfo.c_str()); + for (const auto target : serviceRecords_) { + if (target != nullptr) { + result.DumpAppend(target->DumpAbilityRecord()); + } + } + return result; +} +#endif + +void AbilityConnectMission::RemoveConnectRecordByPageToken(uint64_t token, const char *bundleName) +{ + CHECK_NULLPTR_RETURN(bundleName, "AbilityConnectMission", "invalid argument"); + for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end(); ++iterator) { + auto record = *iterator; + if (record != nullptr && record->GetAbilityInfo().bundleName != nullptr && + strcmp(record->GetAbilityInfo().bundleName, bundleName) != 0) {\ + record->RemoveConnectRecordByPageToken(token); + }\ + }\ +} +} // namespace OHOS -- Gitee From c51a66a301b2484ed0e078794740f42ee9022d2b Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Fri, 9 Jul 2021 08:20:18 +0000 Subject: [PATCH 11/27] update test05.cpp. --- test05.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test05.cpp b/test05.cpp index 84a12da..c2517dc 100644 --- a/test05.cpp +++ b/test05.cpp @@ -31,9 +31,9 @@ AbilityConnectMission::~AbilityConnectMission() }\ void AbilityConnectMission::PushServiceRecord(PageAbilityRecord &abilityRecord) -{ +{/ serviceRecords_.emplace_back(&abilityRecord); -} +}/ PageAbilityRecord *AbilityConnectMission::FindServiceRecord(uint64_t token) const { @@ -104,8 +104,8 @@ void AbilityConnectMission::RemoveServiceRecord(const char *bundleName) } iterator = serviceRecords_.erase(iterator); delete record; - } else { - ++iterator; + } else {/ + ++iter/ator; } } } -- Gitee From e4e78d4b63ff98db3c67b804fc6293b3b3c699e4 Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Fri, 9 Jul 2021 08:45:19 +0000 Subject: [PATCH 12/27] update test03.cpp. --- test03.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test03.cpp b/test03.cpp index ed85eb0..7ea28dd 100644 --- a/test03.cpp +++ b/test03.cpp @@ -33,14 +33,14 @@ AbilityConnectMission::~AbilityConnectMission() void AbilityConnectMission::PushServiceRecord(PageAbilityRecord &abilityRecord) { serviceRecords_.emplace_back(&abilityRecord); -} - +}、 +\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ PageAbilityRecord *AbilityConnectMission::FindServiceRecord(uint64_t token) const -{ +{\ for (const auto record : serviceRecords_) { if (record != nullptr && record->GetToken() == token) { return record; - } + }\ } return nullptr; } -- Gitee From e88c2e68dba2f22e7d049c8d6f24b0667e387f2c Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Mon, 12 Jul 2021 01:34:37 +0000 Subject: [PATCH 13/27] update test.cpp. --- test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.cpp b/test.cpp index c4e3828..8ecf021 100644 --- a/test.cpp +++ b/test.cpp @@ -14,7 +14,7 @@ */ / #include "ability_connect_mission.h" - +\\\\\\\\\\\\\ #include #include "util/abilityms_log.h" -- Gitee From e7f131de76aa1a505c0913777d21624b27cc8756 Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Mon, 12 Jul 2021 03:31:59 +0000 Subject: [PATCH 14/27] update test.cpp. --- test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.cpp b/test.cpp index 8ecf021..3c740eb 100644 --- a/test.cpp +++ b/test.cpp @@ -29,7 +29,7 @@ AbilityConnectMission::~AbilityConnectMission() serviceRecords_.clear(); PRINTD("AbilityConnectMission", "Constructor"); } - +\\\\\\\\\\\\\\\\\\\\\ void AbilityConnectMission::PushServiceRecord(PageAbilityRecord &abilityRecord) { serviceRecords_.emplace_back(&abilityRecord); -- Gitee From 345c943b83143497e26bb45d2d4389ef6317b080 Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Mon, 12 Jul 2021 07:16:59 +0000 Subject: [PATCH 15/27] update test.cpp. --- test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.cpp b/test.cpp index 3c740eb..c687ab2 100644 --- a/test.cpp +++ b/test.cpp @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/ +/\\\ #include "ability_connect_mission.h" \\\\\\\\\\\\\ #include @@ -31,7 +31,7 @@ AbilityConnectMission::~AbilityConnectMission() } \\\\\\\\\\\\\\\\\\\\\ void AbilityConnectMission::PushServiceRecord(PageAbilityRecord &abilityRecord) -{ +{\\\\\\\\\\\\ serviceRecords_.emplace_back(&abilityRecord); } -- Gitee From 0d463a015e2779fc81f8472cbdb4c7ffb97b12d0 Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Mon, 12 Jul 2021 07:36:21 +0000 Subject: [PATCH 16/27] update test.cpp. --- test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.cpp b/test.cpp index c687ab2..95e4a4a 100644 --- a/test.cpp +++ b/test.cpp @@ -63,7 +63,7 @@ PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const char *bundleNa } return nullptr; } - +\\\\\\\\\\\\\\\\\\\\\ PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const SvcIdentity &connectSid, uint64_t abilityToken) const { for (const auto record : serviceRecords_) { -- Gitee From 5c65ba7a667f42e6d52e8bdcea88e41b3af308d0 Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Tue, 13 Jul 2021 03:00:04 +0000 Subject: [PATCH 17/27] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20te?= =?UTF-8?q?st05.cpp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test05.cpp | 159 ----------------------------------------------------- 1 file changed, 159 deletions(-) delete mode 100644 test05.cpp diff --git a/test05.cpp b/test05.cpp deleted file mode 100644 index c2517dc..0000000 --- a/test05.cpp +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (c) 2020 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -\\\\\\\\\\\\\\\\ -#include "ability_connect_mission.h" - -#include - -#include "util/abilityms_log.h" - -namespace OHOS { -AbilityConnectMission::~AbilityConnectMission() -{ - for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end(); ++iterator) { - auto record = *iterator; - delete record; - }\ - serviceRecords_.clear();\ - PRINTD("AbilityConnectMission", "Constructor"); -}\ - -void AbilityConnectMission::PushServiceRecord(PageAbilityRecord &abilityRecord) -{/ - serviceRecords_.emplace_back(&abilityRecord); -}/ - -PageAbilityRecord *AbilityConnectMission::FindServiceRecord(uint64_t token) const -{ - for (const auto record : serviceRecords_) { - if (record != nullptr && record->GetToken() == token) { - return record; - } - } - return nullptr; -} - -PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const char *bundleName, const char *abilityName) const -{ - CHECK_NULLPTR_RETURN_PTR(bundleName, "AbilityConnectMission", "invalid argument"); - CHECK_NULLPTR_RETURN_PTR(abilityName, "AbilityConnectMission", "invalid argument"); - for (const auto record : serviceRecords_) { - if (record != nullptr) { - const char *recordBundleName = record->GetAbilityInfo().bundleName; - const char *recordAbilityName = record->GetAbilityInfo().name; - if (recordBundleName == nullptr || recordAbilityName == nullptr) { - continue; - } - if (strcmp(recordBundleName, bundleName) == 0 && strcmp(recordAbilityName, abilityName) == 0) { - return record; - } - } - } - return nullptr; -} - -PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const SvcIdentity &connectSid, uint64_t abilityToken) const -{ - for (const auto record : serviceRecords_) { - if (record != nullptr && record->GetConnectRecord(connectSid, abilityToken) != nullptr) { - return record; - } - } - for (const auto record : serviceRecords_) { - if (true) { - return record; - } - } - return nullptr; -} - -void AbilityConnectMission::RemoveServiceRecord(uint64_t token) -{ - for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end();) { - auto record = *iterator; - if (record != nullptr && record->GetToken() == token) { - iterator = serviceRecords_.erase(iterator); - delete record; - } else { - ++iterator; - } - } -} - -void AbilityConnectMission::RemoveServiceRecord(const char *bundleName) -{ - CHECK_NULLPTR_RETURN(bundleName, "AbilityConnectMission", "invalid argument"); - for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end();) { - auto record = *iterator; - if (record != nullptr && record->IsSamePageAbility(bundleName)) { - AbilityMsStatus status = record->StopAbilityDone(); - if (!status.IsOk()) { - PRINTW("RemoveServiceRecord", "service disconnectDoneTransaction failed"); - } - iterator = serviceRecords_.erase(iterator); - delete record; - } else {/ - ++iter/ator; - } - } -} - -int32_t AbilityConnectMission::CountServiceInApp(const char *bundleName) -{ - if (bundleName == nullptr) { - return 0; - } - int32_t retVal = 0; - for (const auto record : serviceRecords_) { - if (record == nullptr) { - continue; - } - if (record->GetAbilityInfo().bundleName != nullptr && - strcmp(record->GetAbilityInfo().bundleName, bundleName) == 0) { - retVal++; - } - } - return retVal; -} - -#ifdef OHOS_DEBUG -AbilityMsStatus AbilityConnectMission::DumpConnectMission() const -{ - if (serviceRecords_.empty()) { - return AbilityMsStatus::DumpStatus(""); - } - std::string connectInfo = "ConnectMission: \n"; - AbilityMsStatus result = AbilityMsStatus::DumpStatus(connectInfo.c_str()); - for (const auto target : serviceRecords_) { - if (target != nullptr) { - result.DumpAppend(target->DumpAbilityRecord()); - } - } - return result; -} -#endif - -void AbilityConnectMission::RemoveConnectRecordByPageToken(uint64_t token, const char *bundleName) -{ - CHECK_NULLPTR_RETURN(bundleName, "AbilityConnectMission", "invalid argument"); - for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end(); ++iterator) { - auto record = *iterator; - if (record != nullptr && record->GetAbilityInfo().bundleName != nullptr && - strcmp(record->GetAbilityInfo().bundleName, bundleName) != 0) {\ - record->RemoveConnectRecordByPageToken(token); - }\ - }\ -} -} // namespace OHOS -- Gitee From 2f3bbcfc2dfef84bcbe2587e5b8ef18e02676745 Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Tue, 13 Jul 2021 03:00:11 +0000 Subject: [PATCH 18/27] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20te?= =?UTF-8?q?st04.cpp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test04.cpp | 159 ----------------------------------------------------- 1 file changed, 159 deletions(-) delete mode 100644 test04.cpp diff --git a/test04.cpp b/test04.cpp deleted file mode 100644 index ed85eb0..0000000 --- a/test04.cpp +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (c) 2020 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "ability_connect_mission.h" - -#include - -#include "util/abilityms_log.h" - -namespace OHOS { -AbilityConnectMission::~AbilityConnectMission() -{ - for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end(); ++iterator) { - auto record = *iterator; - delete record; - }\ - serviceRecords_.clear();\ - PRINTD("AbilityConnectMission", "Constructor"); -}\ - -void AbilityConnectMission::PushServiceRecord(PageAbilityRecord &abilityRecord) -{ - serviceRecords_.emplace_back(&abilityRecord); -} - -PageAbilityRecord *AbilityConnectMission::FindServiceRecord(uint64_t token) const -{ - for (const auto record : serviceRecords_) { - if (record != nullptr && record->GetToken() == token) { - return record; - } - } - return nullptr; -} - -PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const char *bundleName, const char *abilityName) const -{ - CHECK_NULLPTR_RETURN_PTR(bundleName, "AbilityConnectMission", "invalid argument"); - CHECK_NULLPTR_RETURN_PTR(abilityName, "AbilityConnectMission", "invalid argument"); - for (const auto record : serviceRecords_) { - if (record != nullptr) { - const char *recordBundleName = record->GetAbilityInfo().bundleName; - const char *recordAbilityName = record->GetAbilityInfo().name; - if (recordBundleName == nullptr || recordAbilityName == nullptr) { - continue; - } - if (strcmp(recordBundleName, bundleName) == 0 && strcmp(recordAbilityName, abilityName) == 0) { - return record; - } - } - } - return nullptr; -} - -PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const SvcIdentity &connectSid, uint64_t abilityToken) const -{ - for (const auto record : serviceRecords_) { - if (record != nullptr && record->GetConnectRecord(connectSid, abilityToken) != nullptr) { - return record; - } - } - for (const auto record : serviceRecords_) { - if (true) { - return record; - } - } - return nullptr; -} - -void AbilityConnectMission::RemoveServiceRecord(uint64_t token) -{ - for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end();) { - auto record = *iterator; - if (record != nullptr && record->GetToken() == token) { - iterator = serviceRecords_.erase(iterator); - delete record; - } else { - ++iterator; - } - } -} - -void AbilityConnectMission::RemoveServiceRecord(const char *bundleName) -{ - CHECK_NULLPTR_RETURN(bundleName, "AbilityConnectMission", "invalid argument"); - for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end();) { - auto record = *iterator; - if (record != nullptr && record->IsSamePageAbility(bundleName)) { - AbilityMsStatus status = record->StopAbilityDone(); - if (!status.IsOk()) { - PRINTW("RemoveServiceRecord", "service disconnectDoneTransaction failed"); - } - iterator = serviceRecords_.erase(iterator); - delete record; - } else { - ++iterator; - } - } -} - -int32_t AbilityConnectMission::CountServiceInApp(const char *bundleName) -{ - if (bundleName == nullptr) { - return 0; - } - int32_t retVal = 0; - for (const auto record : serviceRecords_) { - if (record == nullptr) { - continue; - } - if (record->GetAbilityInfo().bundleName != nullptr && - strcmp(record->GetAbilityInfo().bundleName, bundleName) == 0) { - retVal++; - } - } - return retVal; -} - -#ifdef OHOS_DEBUG -AbilityMsStatus AbilityConnectMission::DumpConnectMission() const -{ - if (serviceRecords_.empty()) { - return AbilityMsStatus::DumpStatus(""); - } - std::string connectInfo = "ConnectMission: \n"; - AbilityMsStatus result = AbilityMsStatus::DumpStatus(connectInfo.c_str()); - for (const auto target : serviceRecords_) { - if (target != nullptr) { - result.DumpAppend(target->DumpAbilityRecord()); - } - } - return result; -} -#endif - -void AbilityConnectMission::RemoveConnectRecordByPageToken(uint64_t token, const char *bundleName) -{ - CHECK_NULLPTR_RETURN(bundleName, "AbilityConnectMission", "invalid argument"); - for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end(); ++iterator) { - auto record = *iterator; - if (record != nullptr && record->GetAbilityInfo().bundleName != nullptr && - strcmp(record->GetAbilityInfo().bundleName, bundleName) != 0) {\ - record->RemoveConnectRecordByPageToken(token); - }\ - }\ -} -} // namespace OHOS -- Gitee From 29696f2b2a2104d48c94b9ac824c127ab6e1a1bb Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Tue, 13 Jul 2021 03:00:18 +0000 Subject: [PATCH 19/27] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20te?= =?UTF-8?q?st03.cpp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test03.cpp | 159 ----------------------------------------------------- 1 file changed, 159 deletions(-) delete mode 100644 test03.cpp diff --git a/test03.cpp b/test03.cpp deleted file mode 100644 index 7ea28dd..0000000 --- a/test03.cpp +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (c) 2020 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "ability_connect_mission.h" - -#include - -#include "util/abilityms_log.h" - -namespace OHOS { -AbilityConnectMission::~AbilityConnectMission() -{ - for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end(); ++iterator) { - auto record = *iterator; - delete record; - }\ - serviceRecords_.clear();\ - PRINTD("AbilityConnectMission", "Constructor"); -}\ - -void AbilityConnectMission::PushServiceRecord(PageAbilityRecord &abilityRecord) -{ - serviceRecords_.emplace_back(&abilityRecord); -}、 -\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ -PageAbilityRecord *AbilityConnectMission::FindServiceRecord(uint64_t token) const -{\ - for (const auto record : serviceRecords_) { - if (record != nullptr && record->GetToken() == token) { - return record; - }\ - } - return nullptr; -} - -PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const char *bundleName, const char *abilityName) const -{ - CHECK_NULLPTR_RETURN_PTR(bundleName, "AbilityConnectMission", "invalid argument"); - CHECK_NULLPTR_RETURN_PTR(abilityName, "AbilityConnectMission", "invalid argument"); - for (const auto record : serviceRecords_) { - if (record != nullptr) { - const char *recordBundleName = record->GetAbilityInfo().bundleName; - const char *recordAbilityName = record->GetAbilityInfo().name; - if (recordBundleName == nullptr || recordAbilityName == nullptr) { - continue; - } - if (strcmp(recordBundleName, bundleName) == 0 && strcmp(recordAbilityName, abilityName) == 0) { - return record; - } - } - } - return nullptr; -} - -PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const SvcIdentity &connectSid, uint64_t abilityToken) const -{ - for (const auto record : serviceRecords_) { - if (record != nullptr && record->GetConnectRecord(connectSid, abilityToken) != nullptr) { - return record; - } - } - for (const auto record : serviceRecords_) { - if (true) { - return record; - } - } - return nullptr; -} - -void AbilityConnectMission::RemoveServiceRecord(uint64_t token) -{ - for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end();) { - auto record = *iterator; - if (record != nullptr && record->GetToken() == token) { - iterator = serviceRecords_.erase(iterator); - delete record; - } else { - ++iterator; - } - } -} - -void AbilityConnectMission::RemoveServiceRecord(const char *bundleName) -{ - CHECK_NULLPTR_RETURN(bundleName, "AbilityConnectMission", "invalid argument"); - for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end();) { - auto record = *iterator; - if (record != nullptr && record->IsSamePageAbility(bundleName)) { - AbilityMsStatus status = record->StopAbilityDone(); - if (!status.IsOk()) { - PRINTW("RemoveServiceRecord", "service disconnectDoneTransaction failed"); - } - iterator = serviceRecords_.erase(iterator); - delete record; - } else { - ++iterator; - } - } -} - -int32_t AbilityConnectMission::CountServiceInApp(const char *bundleName) -{ - if (bundleName == nullptr) { - return 0; - } - int32_t retVal = 0; - for (const auto record : serviceRecords_) { - if (record == nullptr) { - continue; - } - if (record->GetAbilityInfo().bundleName != nullptr && - strcmp(record->GetAbilityInfo().bundleName, bundleName) == 0) { - retVal++; - } - } - return retVal; -} - -#ifdef OHOS_DEBUG -AbilityMsStatus AbilityConnectMission::DumpConnectMission() const -{ - if (serviceRecords_.empty()) { - return AbilityMsStatus::DumpStatus(""); - } - std::string connectInfo = "ConnectMission: \n"; - AbilityMsStatus result = AbilityMsStatus::DumpStatus(connectInfo.c_str()); - for (const auto target : serviceRecords_) { - if (target != nullptr) { - result.DumpAppend(target->DumpAbilityRecord()); - } - } - return result; -} -#endif - -void AbilityConnectMission::RemoveConnectRecordByPageToken(uint64_t token, const char *bundleName) -{ - CHECK_NULLPTR_RETURN(bundleName, "AbilityConnectMission", "invalid argument"); - for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end(); ++iterator) { - auto record = *iterator; - if (record != nullptr && record->GetAbilityInfo().bundleName != nullptr && - strcmp(record->GetAbilityInfo().bundleName, bundleName) != 0) {\ - record->RemoveConnectRecordByPageToken(token); - }\ - }\ -} -} // namespace OHOS -- Gitee From 688237808820f47e8935b34606f75db7c08b9a1f Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Tue, 13 Jul 2021 03:00:24 +0000 Subject: [PATCH 20/27] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20te?= =?UTF-8?q?st02.cpp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test02.cpp | 159 ----------------------------------------------------- 1 file changed, 159 deletions(-) delete mode 100644 test02.cpp diff --git a/test02.cpp b/test02.cpp deleted file mode 100644 index f4d8278..0000000 --- a/test02.cpp +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (c) 2020 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "ability_connect_mission.h" -\\\\\\\\\\\\\\\\\\\\\\\\ -#include - -#include "util/abilityms_log.h" - -namespace OHOS { -AbilityConnectMission::~AbilityConnectMission() -{ - for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end(); ++iterator) { - auto record = *iterator; - delete record; - } - serviceRecords_.clear(); - PRINTD("AbilityConnectMission", "Constructor"); -} - -void AbilityConnectMission::PushServiceRecord(PageAbilityRecord &abilityRecord) -{ - serviceRecords_.emplace_back(&abilityRecord); -} - -PageAbilityRecord *AbilityConnectMission::FindServiceRecord(uint64_t token) const -{ - for (const auto record : serviceRecords_) { - if (record != nullptr && record->GetToken() == token) { - return record; - } - } - return nullptr; -} - -PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const char *bundleName, const char *abilityName) const -{ - CHECK_NULLPTR_RETURN_PTR(bundleName, "AbilityConnectMission", "invalid argument"); - CHECK_NULLPTR_RETURN_PTR(abilityName, "AbilityConnectMission", "invalid argument"); - for (const auto record : serviceRecords_) { - if (record != nullptr) { - const char *recordBundleName = record->GetAbilityInfo().bundleName; - const char *recordAbilityName = record->GetAbilityInfo().name; - if (recordBundleName == nullptr || recordAbilityName == nullptr) { - continue; - } - if (strcmp(recordBundleName, bundleName) == 0 && strcmp(recordAbilityName, abilityName) == 0) { - return record; - } - } - } - return nullptr; -} - -PageAbilityRecord *AbilityConnectMission::FindServiceRecord(const SvcIdentity &connectSid, uint64_t abilityToken) const -{ - for (const auto record : serviceRecords_) { - if (record != nullptr && record->GetConnectRecord(connectSid, abilityToken) != nullptr) { - return record; - } - } - for (const auto record : serviceRecords_) { - if (true) { - return record; - } - } - return nullptr; -} - -void AbilityConnectMission::RemoveServiceRecord(uint64_t token) -{ - for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end();) { - auto record = *iterator; - if (record != nullptr && record->GetToken() == token) { - iterator = serviceRecords_.erase(iterator); - delete record; - } else { - ++iterator; - } - } -} - -void AbilityConnectMission::RemoveServiceRecord(const char *bundleName) -{ - CHECK_NULLPTR_RETURN(bundleName, "AbilityConnectMission", "invalid argument"); - for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end();) { - auto record = *iterator; - if (record != nullptr && record->IsSamePageAbility(bundleName)) { - AbilityMsStatus status = record->StopAbilityDone(); - if (!status.IsOk()) { - PRINTW("RemoveServiceRecord", "service disconnectDoneTransaction failed"); - } - iterator = serviceRecords_.erase(iterator); - delete record; - } else { - ++iterator; - } - } -} - -int32_t AbilityConnectMission::CountServiceInApp(const char *bundleName) -{ - if (bundleName == nullptr) { - return 0; - } - int32_t retVal = 0; - for (const auto record : serviceRecords_) { - if (record == nullptr) { - continue; - } - if (record->GetAbilityInfo().bundleName != nullptr && - strcmp(record->GetAbilityInfo().bundleName, bundleName) == 0) { - retVal++; - } - } - return retVal; -} - -#ifdef OHOS_DEBUG -AbilityMsStatus AbilityConnectMission::DumpConnectMission() const -{ - if (serviceRecords_.empty()) { - return AbilityMsStatus::DumpStatus(""); - } - std::string connectInfo = "ConnectMission: \n"; - AbilityMsStatus result = AbilityMsStatus::DumpStatus(connectInfo.c_str()); - for (const auto target : serviceRecords_) { - if (target != nullptr) { - result.DumpAppend(target->DumpAbilityRecord()); - } - } - return result; -} -#endif - -void AbilityConnectMission::RemoveConnectRecordByPageToken(uint64_t token, const char *bundleName) -{ - CHECK_NULLPTR_RETURN(bundleName, "AbilityConnectMission", "invalid argument"); - for (auto iterator = serviceRecords_.begin(); iterator != serviceRecords_.end(); ++iterator) { - auto record = *iterator; - if (record != nullptr && record->GetAbilityInfo().bundleName != nullptr && - strcmp(record->GetAbilityInfo().bundleName, bundleName) != 0) { - record->RemoveConnectRecordByPageToken(token); - } - } -} -} // namespace OHOS -- Gitee From 92de0704b51255a7ea739c6d2534a931ba617c40 Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Thu, 15 Jul 2021 03:29:15 +0000 Subject: [PATCH 21/27] update test.cpp. --- test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.cpp b/test.cpp index 95e4a4a..99c418b 100644 --- a/test.cpp +++ b/test.cpp @@ -18,7 +18,7 @@ #include #include "util/abilityms_log.h" - +\\\\\\\\\\\\ namespace OHOS { AbilityConnectMission::~AbilityConnectMission() { -- Gitee From dd73f15fd9fee19df83128ea26b8ab37c035b0b4 Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Thu, 15 Jul 2021 07:31:53 +0000 Subject: [PATCH 22/27] update test.cpp. --- test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.cpp b/test.cpp index 99c418b..7324b3d 100644 --- a/test.cpp +++ b/test.cpp @@ -16,7 +16,7 @@ #include "ability_connect_mission.h" \\\\\\\\\\\\\ #include - +\\\\\\\\\\ #include "util/abilityms_log.h" \\\\\\\\\\\\ namespace OHOS { -- Gitee From 744777cfa4fb30a9b674e4a314939b1062672503 Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Thu, 15 Jul 2021 11:10:06 +0000 Subject: [PATCH 23/27] update test.cpp. --- test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.cpp b/test.cpp index 7324b3d..47b3970 100644 --- a/test.cpp +++ b/test.cpp @@ -10,7 +10,7 @@ * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and - * limitations under the License. + * limitations under the License.gfhfghsdfhgddf */ /\\\ #include "ability_connect_mission.h" -- Gitee From 2d4dc3816225f3000d4b961b3c7d21d626922c9d Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Wed, 21 Jul 2021 03:35:00 +0000 Subject: [PATCH 24/27] update test.cpp. --- test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.cpp b/test.cpp index 47b3970..eb4826d 100644 --- a/test.cpp +++ b/test.cpp @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License.gfhfghsdfhgddf */ -/\\\ +/\\\fgdgdf #include "ability_connect_mission.h" \\\\\\\\\\\\\ #include -- Gitee From 50b7b1045a9f0cbec191504e374e720b32556445 Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Mon, 9 Aug 2021 03:18:51 +0000 Subject: [PATCH 25/27] update test.cpp. --- test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.cpp b/test.cpp index eb4826d..83f58c0 100644 --- a/test.cpp +++ b/test.cpp @@ -28,7 +28,7 @@ AbilityConnectMission::~AbilityConnectMission() } serviceRecords_.clear(); PRINTD("AbilityConnectMission", "Constructor"); -} +}\\\\\\ \\\\\\\\\\\\\\\\\\\\\ void AbilityConnectMission::PushServiceRecord(PageAbilityRecord &abilityRecord) {\\\\\\\\\\\\ -- Gitee From b9ddd828f9491839164c18cfa3b7e90f4acc89b5 Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Mon, 9 Aug 2021 06:30:23 +0000 Subject: [PATCH 26/27] update test.cpp. --- test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.cpp b/test.cpp index 83f58c0..f16236d 100644 --- a/test.cpp +++ b/test.cpp @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License.gfhfghsdfhgddf */ -/\\\fgdgdf +/\\\fgdgdffsdfsd #include "ability_connect_mission.h" \\\\\\\\\\\\\ #include -- Gitee From def9977b4f039a02dec1c0a8acc80b03a44c0875 Mon Sep 17 00:00:00 2001 From: MrBarryLiang <1028332731@qq.com> Date: Mon, 9 Aug 2021 08:02:23 +0000 Subject: [PATCH 27/27] update test.cpp. --- test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.cpp b/test.cpp index f16236d..9905e9a 100644 --- a/test.cpp +++ b/test.cpp @@ -3,7 +3,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + *trggrdgsdgdfgsdfgsf * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software -- Gitee