From 12e01b08a016d46bf5056abf19439a68874dd8eb Mon Sep 17 00:00:00 2001 From: wangjianqiang Date: Wed, 15 Jun 2022 19:46:28 +0800 Subject: [PATCH 1/2] add FAF frame Signed-off-by: wangjianqiang --- frameworks/innerkits/file_access/BUILD.gn | 2 + .../file_access/include/file_access_helper.h | 69 +++++++++++ .../file_access/include/file_ext_connection.h | 56 +++++++++ .../file_access/include/ifile_ext_base.h | 33 ++++++ .../file_access/src/file_access_helper.cpp | 112 ++++++++++++++++++ .../file_access/src/file_ext_connection.cpp | 91 ++++++++++++++ 6 files changed, 363 insertions(+) create mode 100644 frameworks/innerkits/file_access/include/file_access_helper.h create mode 100644 frameworks/innerkits/file_access/include/file_ext_connection.h create mode 100644 frameworks/innerkits/file_access/include/ifile_ext_base.h create mode 100644 frameworks/innerkits/file_access/src/file_access_helper.cpp create mode 100644 frameworks/innerkits/file_access/src/file_ext_connection.cpp diff --git a/frameworks/innerkits/file_access/BUILD.gn b/frameworks/innerkits/file_access/BUILD.gn index be069752..91a335f7 100644 --- a/frameworks/innerkits/file_access/BUILD.gn +++ b/frameworks/innerkits/file_access/BUILD.gn @@ -52,6 +52,8 @@ ohos_shared_library("file_access_ability_kit") { sources = [ "src/file_ext_ability.cpp", "src/js_file_ext_ability.cpp", + "src/file_access_helper.cpp", + "src/file_ext_connection.cpp", ] configs = [ ":ability_config" ] public_configs = [ diff --git a/frameworks/innerkits/file_access/include/file_access_helper.h b/frameworks/innerkits/file_access/include/file_access_helper.h new file mode 100644 index 00000000..df00dea5 --- /dev/null +++ b/frameworks/innerkits/file_access/include/file_access_helper.h @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2022 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. + */ + +#ifndef FILE_ACCESS_HELPER_H +#define FILE_ACCESS_HELPER_H + +#include +#include +#include + +#include "file_ext_connection.h" +#include "foundation/ability/ability_runtime/frameworks/kits/appkit/native/ability_runtime/context/context.h" +#include "ifile_ext_base.h" +#include "want.h" +#include "hilog_wrapper.h" + + +namespace OHOS { +namespace FileAccessFwk { +using string = std::string; +class FileAccessHelper final : public std::enable_shared_from_this { +public: + ~FileAccessHelper() = default; + + static std::shared_ptr Creator(const std::shared_ptr &context, + const AAFwk::Want &want); + +private: + FileAccessHelper(const std::shared_ptr &context, const AAFwk::Want &want, + const sptr &fileExtProxy); + void AddFileAccessDeathRecipient(const sptr &token); + void OnSchedulerDied(const wptr &remote); + + sptr token_ = {}; + AAFwk::Want want_ = {}; + sptr fileExtProxy_ = nullptr; + sptr callerDeathRecipient_ = nullptr; + sptr fileExtConnection_ = nullptr; +}; + + +class FileAccessDeathRecipient : public IRemoteObject::DeathRecipient { +public: + using RemoteDiedHandler = std::function &)>; + + explicit FileAccessDeathRecipient(RemoteDiedHandler handler); + + virtual ~FileAccessDeathRecipient(); + + virtual void OnRemoteDied(const wptr &remote); + +private: + RemoteDiedHandler handler_; +}; +} // namespace FileAccessFwk +} // namespace OHOS +#endif // FILE_ACCESS_HELPER_H diff --git a/frameworks/innerkits/file_access/include/file_ext_connection.h b/frameworks/innerkits/file_access/include/file_ext_connection.h new file mode 100644 index 00000000..9777cde9 --- /dev/null +++ b/frameworks/innerkits/file_access/include/file_ext_connection.h @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2022 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. + */ + +#ifndef FILE_EXT_CONNECTION_H +#define FILE_EXT_CONNECTION_H + +#include + +#include "ability_connect_callback_stub.h" +#include "event_handler.h" +#include "ifile_ext_base.h" +#include "want.h" + +namespace OHOS { +namespace FileAccessFwk { +class FileExtConnection : public AAFwk::AbilityConnectionStub { +public: + FileExtConnection() = default; + virtual ~FileExtConnection() = default; + + static sptr GetInstance(); + + void OnAbilityConnectDone( + const AppExecFwk::ElementName &element, const sptr &remoteObject, int resultCode) override; + + void OnAbilityDisconnectDone(const AppExecFwk::ElementName &element, int resultCode) override; + + void ConnectFileExtAbility(const AAFwk::Want &want, const sptr &token); + + void DisconnectFileExtAbility(); + + bool IsExtAbilityConnected(); + + sptr GetFileExtProxy(); + +private: + static sptr instance_; + static std::mutex mutex_; + std::atomic isConnected_ = {false}; + sptr fileExtProxy_; +}; +} // namespace FileAccessFwk +} // namespace OHOS +#endif // FILE_EXT_CONNECTION_H diff --git a/frameworks/innerkits/file_access/include/ifile_ext_base.h b/frameworks/innerkits/file_access/include/ifile_ext_base.h new file mode 100644 index 00000000..fffafa44 --- /dev/null +++ b/frameworks/innerkits/file_access/include/ifile_ext_base.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2022 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. + */ + +#ifndef I_FILE_EXT_BASE_H +#define I_FILE_EXT_BASE_H + +#include +#include +#include + +#include "uri.h" + +namespace OHOS { +namespace FileAccessFwk { +class IFileExtBase : public IRemoteBroker { +public: + DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.AppExecFwk.IFileExtBase"); +}; +} // namespace FileAccessFwk +} // namespace OHOS +#endif // I_FILE_EXT_BASE_H \ No newline at end of file diff --git a/frameworks/innerkits/file_access/src/file_access_helper.cpp b/frameworks/innerkits/file_access/src/file_access_helper.cpp new file mode 100644 index 00000000..49aeacd7 --- /dev/null +++ b/frameworks/innerkits/file_access/src/file_access_helper.cpp @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2022 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 "file_access_helper.h" + +#include "hilog_wrapper.h" +#include "ifile_ext_base.h" + +namespace OHOS { +namespace FileAccessFwk { +FileAccessHelper::FileAccessHelper(const std::shared_ptr &context, + const AAFwk::Want &want, const sptr &fileExtProxy) +{ + HILOG_INFO("tag dsa FileAccessHelper::FileAccessHelper start"); + token_ = context->GetToken(); + want_ = want; + fileExtProxy_ = fileExtProxy; + fileExtConnection_ = FileExtConnection::GetInstance(); + HILOG_INFO("tag dsa FileAccessHelper::FileAccessHelper end"); +} + +void FileAccessHelper::AddFileAccessDeathRecipient(const sptr &token) +{ + HILOG_INFO("tag dsa %{public}s called begin", __func__); + if (token != nullptr && callerDeathRecipient_ != nullptr) { + HILOG_INFO("tag dsa token RemoveDeathRecipient."); + token->RemoveDeathRecipient(callerDeathRecipient_); + } + if (callerDeathRecipient_ == nullptr) { + callerDeathRecipient_ = + new FileAccessDeathRecipient(std::bind(&FileAccessHelper::OnSchedulerDied, this, std::placeholders::_1)); + } + if (token != nullptr) { + HILOG_INFO("tag dsa token AddDeathRecipient."); + token->AddDeathRecipient(callerDeathRecipient_); + } + HILOG_INFO("tag dsa %{public}s called end", __func__); +} + +void FileAccessHelper::OnSchedulerDied(const wptr &remote) +{ + HILOG_INFO("tag dsa %{public}s called begin", __func__); + auto object = remote.promote(); + object = nullptr; + fileExtProxy_ = nullptr; + HILOG_INFO("tag dsa %{public}s called end", __func__); +} + +std::shared_ptr FileAccessHelper::Creator( + const std::shared_ptr &context, const AAFwk::Want &want) +{ + HILOG_INFO("tag dsa FileAccessHelper::Creator with runtime context, want and uri called start."); + if (context == nullptr) { + HILOG_ERROR("tag dsa ileAccessHelper::Creator failed, context == nullptr"); + return nullptr; + } + + HILOG_INFO("tag dsa FileAccessHelper::Creator before ConnectFileExtAbility."); + sptr fileExtProxy = nullptr; + + sptr fileExtConnection = FileExtConnection::GetInstance(); + if (!fileExtConnection->IsExtAbilityConnected()) { + fileExtConnection->ConnectFileExtAbility(want, context->GetToken()); + } + fileExtProxy = fileExtConnection->GetFileExtProxy(); + if (fileExtProxy == nullptr) { + HILOG_WARN("tag dsa FileAccessHelper::Creator get invalid fileExtProxy"); + } + HILOG_INFO("tag dsa FileAccessHelper::Creator after ConnectFileExtAbility."); + + FileAccessHelper *ptrFileAccessHelper = new (std::nothrow) FileAccessHelper(context, want, fileExtProxy); + if (ptrFileAccessHelper == nullptr) { + HILOG_ERROR("tag dsa FileAccessHelper::Creator failed, create FileAccessHelper failed"); + return nullptr; + } + + HILOG_INFO("tag dsa FileAccessHelper::Creator with runtime context, want and uri called end."); + return std::shared_ptr(ptrFileAccessHelper); +} + +void FileAccessDeathRecipient::OnRemoteDied(const wptr &remote) +{ + HILOG_INFO("tag dsa %{public}s begin.", __func__); + if (handler_) { + handler_(remote); + } + HILOG_INFO("tag dsa %{public}s begin.", __func__); +} + +FileAccessDeathRecipient::FileAccessDeathRecipient(RemoteDiedHandler handler) : handler_(handler) +{ + HILOG_INFO("tag dsa %{public}s begin.", __func__); +} + +FileAccessDeathRecipient::~FileAccessDeathRecipient() +{ + HILOG_INFO("tag dsa %{public}s begin.", __func__); +} +} // namespace FileAccessFwk +} // namespace OHOS \ No newline at end of file diff --git a/frameworks/innerkits/file_access/src/file_ext_connection.cpp b/frameworks/innerkits/file_access/src/file_ext_connection.cpp new file mode 100644 index 00000000..58ca80e8 --- /dev/null +++ b/frameworks/innerkits/file_access/src/file_ext_connection.cpp @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2022 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 "file_ext_connection.h" + +#include "ability_manager_client.h" +#include "hilog_wrapper.h" + +namespace OHOS { +namespace FileAccessFwk { +sptr FileExtConnection::instance_ = nullptr; +std::mutex FileExtConnection::mutex_; + +sptr FileExtConnection::GetInstance() +{ + HILOG_INFO("tag dsa %{public}s begin.", __func__); + if (instance_ == nullptr) { + std::lock_guard lock(mutex_); + if (instance_ == nullptr) { + instance_ = sptr(new (std::nothrow) FileExtConnection()); + } + } + HILOG_INFO("tag dsa %{public}s end.", __func__); + return instance_; +} + +void FileExtConnection::OnAbilityConnectDone( + const AppExecFwk::ElementName &element, const sptr &remoteObject, int resultCode) +{ + HILOG_INFO("tag dsa %{public}s called begin", __func__); + if (remoteObject == nullptr) { + HILOG_ERROR("tag dsa FileExtConnection::OnAbilityConnectDone failed, remote is nullptr"); + return; + } + if (fileExtProxy_ == nullptr) { + HILOG_ERROR("tag dsa FileExtConnection::OnAbilityConnectDone failed, fileExtProxy_ is nullptr"); + return; + } + isConnected_.store(true); + HILOG_INFO("tag dsa %{public}s end.", __func__); +} + +void FileExtConnection::OnAbilityDisconnectDone(const AppExecFwk::ElementName &element, int resultCode) +{ + HILOG_INFO("tag dsa %{public}s called begin", __func__); + fileExtProxy_ = nullptr; + isConnected_.store(false); + HILOG_INFO("tag dsa %{public}s called end", __func__); +} + +void FileExtConnection::ConnectFileExtAbility(const AAFwk::Want &want, const sptr &token) +{ + HILOG_INFO("tag dsa %{public}s called begin", __func__); + ErrCode ret = AAFwk::AbilityManagerClient::GetInstance()->ConnectAbility(want, this, token); + HILOG_INFO("tag dsa %{public}s called end, ret=%{public}d", __func__, ret); +} + +void FileExtConnection::DisconnectFileExtAbility() +{ + HILOG_INFO("tag dsa %{public}s called begin", __func__); + fileExtProxy_ = nullptr; + isConnected_.store(false); + ErrCode ret = AAFwk::AbilityManagerClient::GetInstance()->DisconnectAbility(this); + HILOG_INFO("tag dsa %{public}s called end, ret=%{public}d", __func__, ret); +} + +bool FileExtConnection::IsExtAbilityConnected() +{ + HILOG_INFO("tag dsa %{public}s called begin", __func__); + return isConnected_.load(); +} + +sptr FileExtConnection::GetFileExtProxy() +{ + HILOG_INFO("tag dsa %{public}s called begin", __func__); + return fileExtProxy_; +} +} // namespace FileAccessFwk +} // namespace OHOS \ No newline at end of file -- Gitee From d522520a99d94990a0e4eb95259d51f67d050205 Mon Sep 17 00:00:00 2001 From: wangjianqiang Date: Thu, 16 Jun 2022 12:50:44 +0800 Subject: [PATCH 2/2] revise opinion Signed-off-by: wangjianqiang --- .../file_access/src/file_access_helper.cpp | 38 +++++++++---------- .../file_access/src/file_ext_connection.cpp | 28 +++++++------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/frameworks/innerkits/file_access/src/file_access_helper.cpp b/frameworks/innerkits/file_access/src/file_access_helper.cpp index 49aeacd7..ad9ac293 100644 --- a/frameworks/innerkits/file_access/src/file_access_helper.cpp +++ b/frameworks/innerkits/file_access/src/file_access_helper.cpp @@ -23,19 +23,19 @@ namespace FileAccessFwk { FileAccessHelper::FileAccessHelper(const std::shared_ptr &context, const AAFwk::Want &want, const sptr &fileExtProxy) { - HILOG_INFO("tag dsa FileAccessHelper::FileAccessHelper start"); + HILOG_INFO("%{public}s start", __func__); token_ = context->GetToken(); want_ = want; fileExtProxy_ = fileExtProxy; fileExtConnection_ = FileExtConnection::GetInstance(); - HILOG_INFO("tag dsa FileAccessHelper::FileAccessHelper end"); + HILOG_INFO("%{public}s end", __func__); } void FileAccessHelper::AddFileAccessDeathRecipient(const sptr &token) { - HILOG_INFO("tag dsa %{public}s called begin", __func__); + HILOG_INFO("%{public}s called begin", __func__); if (token != nullptr && callerDeathRecipient_ != nullptr) { - HILOG_INFO("tag dsa token RemoveDeathRecipient."); + HILOG_INFO("token RemoveDeathRecipient."); token->RemoveDeathRecipient(callerDeathRecipient_); } if (callerDeathRecipient_ == nullptr) { @@ -43,31 +43,31 @@ void FileAccessHelper::AddFileAccessDeathRecipient(const sptr &to new FileAccessDeathRecipient(std::bind(&FileAccessHelper::OnSchedulerDied, this, std::placeholders::_1)); } if (token != nullptr) { - HILOG_INFO("tag dsa token AddDeathRecipient."); + HILOG_INFO("token AddDeathRecipient."); token->AddDeathRecipient(callerDeathRecipient_); } - HILOG_INFO("tag dsa %{public}s called end", __func__); + HILOG_INFO("%{public}s called end", __func__); } void FileAccessHelper::OnSchedulerDied(const wptr &remote) { - HILOG_INFO("tag dsa %{public}s called begin", __func__); + HILOG_INFO("%{public}s called begin", __func__); auto object = remote.promote(); object = nullptr; fileExtProxy_ = nullptr; - HILOG_INFO("tag dsa %{public}s called end", __func__); + HILOG_INFO("%{public}s called end", __func__); } std::shared_ptr FileAccessHelper::Creator( const std::shared_ptr &context, const AAFwk::Want &want) { - HILOG_INFO("tag dsa FileAccessHelper::Creator with runtime context, want and uri called start."); + HILOG_INFO("%{public}s with runtime context, want and uri called start.", __func__); if (context == nullptr) { - HILOG_ERROR("tag dsa ileAccessHelper::Creator failed, context == nullptr"); + HILOG_ERROR("%{public}s failed, context == nullptr", __func__); return nullptr; } - HILOG_INFO("tag dsa FileAccessHelper::Creator before ConnectFileExtAbility."); + HILOG_INFO("%{public}s before ConnectFileExtAbility.", __func__); sptr fileExtProxy = nullptr; sptr fileExtConnection = FileExtConnection::GetInstance(); @@ -76,37 +76,37 @@ std::shared_ptr FileAccessHelper::Creator( } fileExtProxy = fileExtConnection->GetFileExtProxy(); if (fileExtProxy == nullptr) { - HILOG_WARN("tag dsa FileAccessHelper::Creator get invalid fileExtProxy"); + HILOG_WARN("%{public}s get invalid fileExtProxy", __func__); } - HILOG_INFO("tag dsa FileAccessHelper::Creator after ConnectFileExtAbility."); + HILOG_INFO("%{public}s after ConnectFileExtAbility.", __func__); FileAccessHelper *ptrFileAccessHelper = new (std::nothrow) FileAccessHelper(context, want, fileExtProxy); if (ptrFileAccessHelper == nullptr) { - HILOG_ERROR("tag dsa FileAccessHelper::Creator failed, create FileAccessHelper failed"); + HILOG_ERROR("%{public}s failed, create FileAccessHelper failed", __func__); return nullptr; } - HILOG_INFO("tag dsa FileAccessHelper::Creator with runtime context, want and uri called end."); + HILOG_INFO("%{public}s with runtime context, want and uri called end.", __func__); return std::shared_ptr(ptrFileAccessHelper); } void FileAccessDeathRecipient::OnRemoteDied(const wptr &remote) { - HILOG_INFO("tag dsa %{public}s begin.", __func__); + HILOG_INFO("%{public}s begin.", __func__); if (handler_) { handler_(remote); } - HILOG_INFO("tag dsa %{public}s begin.", __func__); + HILOG_INFO("%{public}s end.", __func__); } FileAccessDeathRecipient::FileAccessDeathRecipient(RemoteDiedHandler handler) : handler_(handler) { - HILOG_INFO("tag dsa %{public}s begin.", __func__); + HILOG_INFO("%{public}s .", __func__); } FileAccessDeathRecipient::~FileAccessDeathRecipient() { - HILOG_INFO("tag dsa %{public}s begin.", __func__); + HILOG_INFO("%{public}s .", __func__); } } // namespace FileAccessFwk } // namespace OHOS \ No newline at end of file diff --git a/frameworks/innerkits/file_access/src/file_ext_connection.cpp b/frameworks/innerkits/file_access/src/file_ext_connection.cpp index 58ca80e8..915c58aa 100644 --- a/frameworks/innerkits/file_access/src/file_ext_connection.cpp +++ b/frameworks/innerkits/file_access/src/file_ext_connection.cpp @@ -25,66 +25,66 @@ std::mutex FileExtConnection::mutex_; sptr FileExtConnection::GetInstance() { - HILOG_INFO("tag dsa %{public}s begin.", __func__); + HILOG_INFO("%{public}s begin.", __func__); if (instance_ == nullptr) { std::lock_guard lock(mutex_); if (instance_ == nullptr) { instance_ = sptr(new (std::nothrow) FileExtConnection()); } } - HILOG_INFO("tag dsa %{public}s end.", __func__); + HILOG_INFO("%{public}s end.", __func__); return instance_; } void FileExtConnection::OnAbilityConnectDone( const AppExecFwk::ElementName &element, const sptr &remoteObject, int resultCode) { - HILOG_INFO("tag dsa %{public}s called begin", __func__); + HILOG_INFO("%{public}s called begin", __func__); if (remoteObject == nullptr) { - HILOG_ERROR("tag dsa FileExtConnection::OnAbilityConnectDone failed, remote is nullptr"); + HILOG_ERROR("%{public}s failed, remote is nullptr", __func__); return; } if (fileExtProxy_ == nullptr) { - HILOG_ERROR("tag dsa FileExtConnection::OnAbilityConnectDone failed, fileExtProxy_ is nullptr"); + HILOG_ERROR("%{public}s failed, fileExtProxy_ is nullptr", __func__); return; } isConnected_.store(true); - HILOG_INFO("tag dsa %{public}s end.", __func__); + HILOG_INFO("%{public}s end.", __func__); } void FileExtConnection::OnAbilityDisconnectDone(const AppExecFwk::ElementName &element, int resultCode) { - HILOG_INFO("tag dsa %{public}s called begin", __func__); + HILOG_INFO("%{public}s called begin", __func__); fileExtProxy_ = nullptr; isConnected_.store(false); - HILOG_INFO("tag dsa %{public}s called end", __func__); + HILOG_INFO("%{public}s called end", __func__); } void FileExtConnection::ConnectFileExtAbility(const AAFwk::Want &want, const sptr &token) { - HILOG_INFO("tag dsa %{public}s called begin", __func__); + HILOG_INFO("%{public}s called begin", __func__); ErrCode ret = AAFwk::AbilityManagerClient::GetInstance()->ConnectAbility(want, this, token); - HILOG_INFO("tag dsa %{public}s called end, ret=%{public}d", __func__, ret); + HILOG_INFO("%{public}s called end, ret=%{public}d", __func__, ret); } void FileExtConnection::DisconnectFileExtAbility() { - HILOG_INFO("tag dsa %{public}s called begin", __func__); + HILOG_INFO("%{public}s called begin", __func__); fileExtProxy_ = nullptr; isConnected_.store(false); ErrCode ret = AAFwk::AbilityManagerClient::GetInstance()->DisconnectAbility(this); - HILOG_INFO("tag dsa %{public}s called end, ret=%{public}d", __func__, ret); + HILOG_INFO("%{public}s called end, ret=%{public}d", __func__, ret); } bool FileExtConnection::IsExtAbilityConnected() { - HILOG_INFO("tag dsa %{public}s called begin", __func__); + HILOG_INFO("%{public}s called ", __func__); return isConnected_.load(); } sptr FileExtConnection::GetFileExtProxy() { - HILOG_INFO("tag dsa %{public}s called begin", __func__); + HILOG_INFO("%{public}s called ", __func__); return fileExtProxy_; } } // namespace FileAccessFwk -- Gitee