!10951 修改一些uiextension的代码格式

Merge pull request !10951 from lijie176/dev_blue_yellow
This commit is contained in:
openharmony_ci 2024-11-22 07:57:05 +00:00 committed by Gitee
commit 779fc79397
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 17 additions and 17 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2022 Huawei Device Co., Ltd. * Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at

View File

@ -467,7 +467,7 @@ void ExtensionSession::NotifyExtensionEventAsync(uint32_t notifyEvent)
WSError ExtensionSession::NotifyDumpInfo(const std::vector<std::string>& params, std::vector<std::string>& info) WSError ExtensionSession::NotifyDumpInfo(const std::vector<std::string>& params, std::vector<std::string>& info)
{ {
TLOGI(WmsLogTag::WMS_UIEXT, "Notify dump, persistenId: %{public}d", GetPersistentId()); TLOGI(WmsLogTag::WMS_UIEXT, "Notify dump, persistenId=%{public}d", GetPersistentId());
if (!IsSessionValid()) { if (!IsSessionValid()) {
return WSError::WS_ERROR_INVALID_SESSION; return WSError::WS_ERROR_INVALID_SESSION;
} }

View File

@ -32,8 +32,8 @@ public:
sptr<Window> GetWindow() override; sptr<Window> GetWindow() override;
WMError HideNonSecureWindows(bool shouldHide) override; WMError HideNonSecureWindows(bool shouldHide) override;
WMError SetWaterMarkFlag(bool isEnable) override; WMError SetWaterMarkFlag(bool isEnable) override;
bool IsPcOrPadFreeMultiWindowMode() const override;
WMError HidePrivacyContentForHost(bool needHide) override; WMError HidePrivacyContentForHost(bool needHide) override;
bool IsPcOrPadFreeMultiWindowMode() const override;
private: private:
sptr<Window> windowExtensionSessionImpl_; sptr<Window> windowExtensionSessionImpl_;

View File

@ -52,17 +52,17 @@ WMError ExtensionWindowImpl::SetWaterMarkFlag(bool isEnable)
return windowExtensionSessionImpl_->SetWaterMarkFlag(isEnable); return windowExtensionSessionImpl_->SetWaterMarkFlag(isEnable);
} }
bool ExtensionWindowImpl::IsPcOrPadFreeMultiWindowMode() const
{
TLOGI(WmsLogTag::WMS_UIEXT, "in");
return windowExtensionSessionImpl_->IsPcOrPadFreeMultiWindowMode();
}
WMError ExtensionWindowImpl::HidePrivacyContentForHost(bool needHide) WMError ExtensionWindowImpl::HidePrivacyContentForHost(bool needHide)
{ {
TLOGD(WmsLogTag::WMS_UIEXT, "enter"); TLOGD(WmsLogTag::WMS_UIEXT, "enter");
return windowExtensionSessionImpl_->HidePrivacyContentForHost(needHide); return windowExtensionSessionImpl_->HidePrivacyContentForHost(needHide);
} }
bool ExtensionWindowImpl::IsPcOrPadFreeMultiWindowMode() const
{
TLOGI(WmsLogTag::WMS_UIEXT, "in");
return windowExtensionSessionImpl_->IsPcOrPadFreeMultiWindowMode();
}
} // namespace Rosen } // namespace Rosen
} // namespace OHOS } // namespace OHOS

View File

@ -344,7 +344,7 @@ WMError WindowExtensionSessionImpl::HidePrivacyContentForHost(bool needHide)
ss << "ID: " << persistentId << ", needHide: " << needHide; ss << "ID: " << persistentId << ", needHide: " << needHide;
if (surfaceNode_ == nullptr) { if (surfaceNode_ == nullptr) {
TLOGE(WmsLogTag::WMS_UIEXT, "surfaceNode is null, %{public}s", ss.str().c_str()); TLOGI(WmsLogTag::WMS_UIEXT, "surfaceNode is null, %{public}s", ss.str().c_str());
return WMError::WM_ERROR_NULLPTR; return WMError::WM_ERROR_NULLPTR;
} }
@ -352,9 +352,9 @@ WMError WindowExtensionSessionImpl::HidePrivacyContentForHost(bool needHide)
auto errCode = surfaceNode_->SetHidePrivacyContent(needHide); auto errCode = surfaceNode_->SetHidePrivacyContent(needHide);
TLOGI(WmsLogTag::WMS_UIEXT, "Notify Render Service client finished, %{public}s, err: %{public}u", ss.str().c_str(), TLOGI(WmsLogTag::WMS_UIEXT, "Notify Render Service client finished, %{public}s, err: %{public}u", ss.str().c_str(),
errCode); errCode);
if (errCode == RSInterfaceErrorCode::NONSYSTEM_CALLING) { // not system app calling if (errCode == RSInterfaceErrorCode::NONSYSTEM_CALLING) { // not system app calling
return WMError::WM_ERROR_NOT_SYSTEM_APP; return WMError::WM_ERROR_NOT_SYSTEM_APP;
} else if (errCode != RSInterfaceErrorCode::NO_ERROR) { // other error } else if (errCode != RSInterfaceErrorCode::NO_ERROR) { // other error
return WMError::WM_ERROR_SYSTEM_ABNORMALLY; return WMError::WM_ERROR_SYSTEM_ABNORMALLY;
} }
@ -1257,7 +1257,7 @@ void WindowExtensionSessionImpl::NotifyExtensionEventAsync(uint32_t notifyEvent)
WSError WindowExtensionSessionImpl::NotifyDumpInfo(const std::vector<std::string>& params, WSError WindowExtensionSessionImpl::NotifyDumpInfo(const std::vector<std::string>& params,
std::vector<std::string>& info) std::vector<std::string>& info)
{ {
TLOGI(WmsLogTag::WMS_UIEXT, "Received dump request, persistentId: %{public}d", GetPersistentId()); TLOGI(WmsLogTag::WMS_UIEXT, "Received dump request, persistentId=%{public}d", GetPersistentId());
auto uiContentSharedPtr = GetUIContentSharedPtr(); auto uiContentSharedPtr = GetUIContentSharedPtr();
if (uiContentSharedPtr == nullptr) { if (uiContentSharedPtr == nullptr) {
TLOGE(WmsLogTag::WMS_UIEXT, "uiContent is nullptr"); TLOGE(WmsLogTag::WMS_UIEXT, "uiContent is nullptr");

View File

@ -1703,7 +1703,7 @@ HWTEST_F(WindowExtensionSessionImplTest, HideNonSecureWindows01, Function | Smal
ASSERT_EQ(WMError::WM_OK, window_->HideNonSecureWindows(true)); ASSERT_EQ(WMError::WM_OK, window_->HideNonSecureWindows(true));
ASSERT_TRUE(window_->extensionWindowFlags_.hideNonSecureWindowsFlag); ASSERT_TRUE(window_->extensionWindowFlags_.hideNonSecureWindowsFlag);
} }
/** /**
* @tc.name: HideNonSecureWindows02 * @tc.name: HideNonSecureWindows02
* @tc.desc: HideNonSecureWindows Test * @tc.desc: HideNonSecureWindows Test
@ -1725,7 +1725,7 @@ HWTEST_F(WindowExtensionSessionImplTest, HideNonSecureWindows02, Function | Smal
ASSERT_EQ(WMError::WM_OK, window_->HideNonSecureWindows(false)); ASSERT_EQ(WMError::WM_OK, window_->HideNonSecureWindows(false));
} }
/** /**
* @tc.name: HideNonSecureWindows03 * @tc.name: HideNonSecureWindows03
* @tc.desc: HideNonSecureWindows Test * @tc.desc: HideNonSecureWindows Test
@ -1736,7 +1736,7 @@ HWTEST_F(WindowExtensionSessionImplTest, HideNonSecureWindows03, Function | Smal
window_->state_ = WindowState::STATE_SHOWN; window_->state_ = WindowState::STATE_SHOWN;
ASSERT_EQ(WMError::WM_ERROR_INVALID_WINDOW, window_->HideNonSecureWindows(true)); ASSERT_EQ(WMError::WM_ERROR_INVALID_WINDOW, window_->HideNonSecureWindows(true));
} }
/** /**
* @tc.name: HideNonSecureWindows04 * @tc.name: HideNonSecureWindows04
* @tc.desc: HideNonSecureWindows Test * @tc.desc: HideNonSecureWindows Test
@ -1777,7 +1777,7 @@ HWTEST_F(WindowExtensionSessionImplTest, SetWaterMarkFlag01, Function | SmallTes
ASSERT_EQ(WMError::WM_OK, window_->SetWaterMarkFlag(true)); ASSERT_EQ(WMError::WM_OK, window_->SetWaterMarkFlag(true));
ASSERT_TRUE(window_->extensionWindowFlags_.waterMarkFlag); ASSERT_TRUE(window_->extensionWindowFlags_.waterMarkFlag);
} }
/** /**
* @tc.name: SetWaterMarkFlag02 * @tc.name: SetWaterMarkFlag02
* @tc.desc: SetWaterMarkFlag Test * @tc.desc: SetWaterMarkFlag Test