!7953 函数入参排查

Merge pull request !7953 from yecong2332/checkCleanCode
This commit is contained in:
openharmony_ci 2024-08-12 07:40:51 +00:00 committed by Gitee
commit e776630cc1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
131 changed files with 450 additions and 450 deletions

View File

@ -39,7 +39,7 @@ public:
*
* @return errCode WM_OK on success, others on failure.
*/
WMError StartAbility(const AAFwk::Want &want, const AAFwk::StartOptions &startOptions) const;
WMError StartAbility(const AAFwk::Want& want, const AAFwk::StartOptions& startOptions) const;
static const size_t CONTEXT_TYPE_ID;
private:

View File

@ -51,7 +51,7 @@ public:
}
};
napi_value AttachWindowExtensionContext(napi_env env, void *value, void *)
napi_value AttachWindowExtensionContext(napi_env env, void* value, void *)
{
WLOGI("AttachWindowExtensionContext");
if (value == nullptr) {
@ -82,7 +82,7 @@ napi_value AttachWindowExtensionContext(napi_env env, void *value, void *)
return nullptr;
}
napi_wrap(env, contextObj, workContext,
[](napi_env, void *data, void *) {
[](napi_env, void* data, void *) {
WLOGI("Finalizer for weak_ptr service extension context is called");
delete static_cast<std::weak_ptr<WindowExtensionContext> *>(data);
}, nullptr, nullptr);
@ -174,7 +174,7 @@ void JsWindowExtension::BindContext(napi_env env, napi_value obj)
napi_set_named_property(env, obj, "context", contextObj);
napi_wrap(env, contextObj, workContext,
[](napi_env, void *data, void *) {
[](napi_env, void* data, void *) {
WLOGI("Finalizer for weak_ptr extension context is called");
delete static_cast<std::weak_ptr<WindowExtensionContext>*>(data);
}, nullptr, nullptr);

View File

@ -29,7 +29,7 @@ namespace {
const size_t WindowExtensionContext::CONTEXT_TYPE_ID(std::hash<const char*> {} ("WindowExtensionContext"));
int WindowExtensionContext::ILLEGAL_REQUEST_CODE(-1);
WMError WindowExtensionContext::StartAbility(const AAFwk::Want &want, const AAFwk::StartOptions &startOptions) const
WMError WindowExtensionContext::StartAbility(const AAFwk::Want& want, const AAFwk::StartOptions& startOptions) const
{
WLOGFD("Start ability begin, ability:%{public}s.", want.GetElement().GetAbilityName().c_str());
ErrCode err = AAFwk::AbilityManagerClient::GetInstance()->StartAbility(want, startOptions, token_,

View File

@ -639,7 +639,7 @@ public:
* @param infos session infos
* @return WM_OK means set success, others means set failed.
*/
WMError DumpSessionAll(std::vector<std::string> &infos);
WMError DumpSessionAll(std::vector<std::string>& infos);
/**
* @brief Dump session info with id
@ -647,7 +647,7 @@ public:
* @param infos session infos
* @return WM_OK means set success, others means set failed.
*/
WMError DumpSessionWithId(int32_t persistentId, std::vector<std::string> &infos);
WMError DumpSessionWithId(int32_t persistentId, std::vector<std::string>& infos);
/**
* @brief Get uiContent remote object

View File

@ -446,7 +446,7 @@ struct PointInfo {
* @brief topN main window info.
*/
struct MainWindowInfo : public Parcelable {
virtual bool Marshalling(Parcel &parcel) const override
virtual bool Marshalling(Parcel& parcel) const override
{
if (!parcel.WriteInt32(pid_)) {
return false;

View File

@ -31,7 +31,7 @@ extern "C" __attribute__((constructor)) void NAPI_application_embeddablewindowst
}
extern "C" __attribute__((visibility("default")))
void NAPI_application_embeddablewindowstage_GetJSCode(const char **buf, int *bufLen)
void NAPI_application_embeddablewindowstage_GetJSCode(const char** buf, int* bufLen)
{
if (buf != nullptr) {
*buf = _binary_embeddable_window_stage_js_start;
@ -44,7 +44,7 @@ void NAPI_application_embeddablewindowstage_GetJSCode(const char **buf, int *buf
// embeddable_window_stage JS register
extern "C" __attribute__((visibility("default")))
void NAPI_application_embeddablewindowstage_GetABCCode(const char **buf, int *buflen)
void NAPI_application_embeddablewindowstage_GetABCCode(const char** buf, int* buflen)
{
if (buf != nullptr) {
*buf = _binary_embeddable_window_stage_abc_start;

View File

@ -31,7 +31,7 @@ extern "C" __attribute__((constructor)) void NAPI_application_extensionWindow_Au
}
extern "C" __attribute__((visibility("default")))
void NAPI_application_extensionWindow_GetJSCode(const char **buf, int *bufLen)
void NAPI_application_extensionWindow_GetJSCode(const char** buf, int* bufLen)
{
if (buf != nullptr) {
*buf = _binary_extension_window_js_start;
@ -44,7 +44,7 @@ void NAPI_application_extensionWindow_GetJSCode(const char **buf, int *bufLen)
// extension_window JS register
extern "C" __attribute__((visibility("default")))
void NAPI_application_extensionWindow_GetABCCode(const char **buf, int *buflen)
void NAPI_application_extensionWindow_GetABCCode(const char** buf, int* buflen)
{
if (buf != nullptr) {
*buf = _binary_extension_window_abc_start;

View File

@ -125,7 +125,7 @@ void JsExtensionWindowListener::OnAvoidAreaChanged(const AvoidArea avoidArea, Av
TLOGI(WmsLogTag::WMS_UIEXT, "[NAPI]OnAvoidAreaChanged");
// js callback should run in js thread
std::unique_ptr<NapiAsyncTask::CompleteCallback> complete = std::make_unique<NapiAsyncTask::CompleteCallback> (
[self = weakRef_, avoidArea, type, eng = env_] (napi_env env, NapiAsyncTask &task, int32_t status) {
[self = weakRef_, avoidArea, type, eng = env_] (napi_env env, NapiAsyncTask& task, int32_t status) {
auto thisListener = self.promote();
if (thisListener == nullptr || eng == nullptr) {
TLOGE(WmsLogTag::WMS_UIEXT, "[NAPI]this listener or eng is nullptr");

View File

@ -36,7 +36,7 @@ namespace {
const std::string CONTROL_EVENT_CB = "controlEvent";
}
void BindFunctions(napi_env env, napi_value object, const char *moduleName)
void BindFunctions(napi_env env, napi_value object, const char* moduleName)
{
BindNativeFunction(env, object, "startPiP", moduleName, JsPipController::StartPictureInPicture);
BindNativeFunction(env, object, "stopPiP", moduleName, JsPipController::StopPictureInPicture);

View File

@ -32,7 +32,7 @@ void NAPI_application_WindowExtensionAbility_AutoRegister()
}
extern "C" __attribute__((visibility("default")))
void NAPI_application_WindowExtensionAbility_GetJSCode(const char **buf, int *bufLen)
void NAPI_application_WindowExtensionAbility_GetJSCode(const char** buf, int* bufLen)
{
if (buf != nullptr) {
*buf = _binary_window_extension_ability_js_start;
@ -44,7 +44,7 @@ void NAPI_application_WindowExtensionAbility_GetJSCode(const char **buf, int *bu
}
extern "C" __attribute__((visibility("default")))
void NAPI_application_WindowExtensionAbility_GetABCCode(const char **buf, int *buflen)
void NAPI_application_WindowExtensionAbility_GetABCCode(const char** buf, int* buflen)
{
if (buf != nullptr) {
*buf = _binary_window_extension_ability_abc_start;

View File

@ -31,7 +31,7 @@ extern "C" __attribute__((constructor)) void NAPI_application_WindowExtensionCon
}
extern "C" __attribute__((visibility("default"))) void NAPI_application_WindowExtensionContext_GetJSCode(
const char **buf, int *bufLen)
const char** buf, int* bufLen)
{
if (buf != nullptr) {
*buf = _binary_window_extension_context_js_start;
@ -44,7 +44,7 @@ extern "C" __attribute__((visibility("default"))) void NAPI_application_WindowEx
// window extension context JS register
extern "C" __attribute__((visibility("default"))) void NAPI_application_WindowExtensionContext_GetABCCode(
const char **buf, int *buflen)
const char** buf, int* buflen)
{
if (buf != nullptr) {
*buf = _binary_window_extension_context_abc_start;

View File

@ -2683,7 +2683,7 @@ napi_value JsWindow::OnDisableLandscapeMultiWindow(napi_env env, napi_callback_i
wptr<Window> weakToken(windowToken_);
NapiAsyncTask::CompleteCallback complete =
[weakToken, err](napi_env env, NapiAsyncTask &task, int32_t status) mutable {
[weakToken, err](napi_env env, NapiAsyncTask& task, int32_t status) mutable {
auto weakWindow = weakToken.promote();
err = (weakWindow == nullptr) ? WmErrorCode::WM_ERROR_STATE_ABNORMALLY : err;
if (err != WmErrorCode::WM_OK) {
@ -4120,7 +4120,7 @@ napi_value JsWindow::OnSetSingleFrameComposerEnabled(napi_env env, napi_callback
return result;
}
void GetSubWindowId(napi_env env, napi_value nativeVal, WmErrorCode &errCode, int32_t &subWindowId)
void GetSubWindowId(napi_env env, napi_value nativeVal, WmErrorCode& errCode, int32_t& subWindowId)
{
if (nativeVal == nullptr) {
WLOGFE("Failed to get subWindowId");
@ -6286,7 +6286,7 @@ napi_value JsWindow::OnStartMoving(napi_env env, napi_callback_info info)
return result;
}
void BindFunctions(napi_env env, napi_value object, const char *moduleName)
void BindFunctions(napi_env env, napi_value object, const char* moduleName)
{
BindNativeFunction(env, object, "startMoving", moduleName, JsWindow::StartMoving);
BindNativeFunction(env, object, "show", moduleName, JsWindow::Show);

View File

@ -33,7 +33,7 @@ namespace OHOS {
namespace Rosen {
napi_value CreateJsWindowObject(napi_env env, sptr<Window>& window);
std::shared_ptr<NativeReference> FindJsWindowObject(const std::string& windowName);
void BindFunctions(napi_env env, napi_value object, const char *moduleName);
void BindFunctions(napi_env env, napi_value object, const char* moduleName);
napi_value NapiGetUndefined(napi_env env);
napi_valuetype GetType(napi_env env, napi_value value);
bool NapiIsCallable(napi_env env, napi_value value);

View File

@ -118,7 +118,7 @@ void JsWindowListener::OnSystemBarPropertyChange(DisplayId displayId, const Syst
// js callback should run in js thread
std::unique_ptr<NapiAsyncTask::CompleteCallback> complete = std::make_unique<NapiAsyncTask::CompleteCallback> (
[self = weakRef_, displayId, tints, eng = env_] (napi_env env,
NapiAsyncTask &task, int32_t status) {
NapiAsyncTask& task, int32_t status) {
auto thisListener = self.promote();
if (thisListener == nullptr || eng == nullptr) {
@ -152,7 +152,7 @@ void JsWindowListener::OnAvoidAreaChanged(const AvoidArea avoidArea, AvoidAreaTy
// js callback should run in js thread
std::unique_ptr<NapiAsyncTask::CompleteCallback> complete = std::make_unique<NapiAsyncTask::CompleteCallback> (
[self = weakRef_, avoidArea, type, eng = env_] (napi_env env,
NapiAsyncTask &task, int32_t status) {
NapiAsyncTask& task, int32_t status) {
auto thisListener = self.promote();
if (thisListener == nullptr || eng == nullptr) {
WLOGFE("[NAPI]this listener or eng is nullptr");
@ -270,7 +270,7 @@ void JsWindowListener::OnSizeChange(const sptr<OccupiedAreaChangeInfo>& info,
// js callback should run in js thread
std::unique_ptr<NapiAsyncTask::CompleteCallback> complete = std::make_unique<NapiAsyncTask::CompleteCallback> (
[self = weakRef_, info, eng = env_] (napi_env env,
NapiAsyncTask &task, int32_t status) {
NapiAsyncTask& task, int32_t status) {
auto thisListener = self.promote();
if (thisListener == nullptr || eng == nullptr) {
WLOGFE("[NAPI]this listener or eng is nullptr");
@ -291,7 +291,7 @@ void JsWindowListener::OnTouchOutside() const
{
WLOGI("CALLED");
std::unique_ptr<NapiAsyncTask::CompleteCallback> complete = std::make_unique<NapiAsyncTask::CompleteCallback> (
[self = weakRef_] (napi_env env, NapiAsyncTask &task, int32_t status) {
[self = weakRef_] (napi_env env, NapiAsyncTask& task, int32_t status) {
auto thisListener = self.promote();
if (thisListener == nullptr) {
WLOGFE("[NAPI]this listener is nullptr");
@ -311,7 +311,7 @@ void JsWindowListener::OnScreenshot()
{
WLOGI("CALLED");
std::unique_ptr<NapiAsyncTask::CompleteCallback> complete = std::make_unique<NapiAsyncTask::CompleteCallback> (
[self = wptr<JsWindowListener>(this)] (napi_env env, NapiAsyncTask &task, int32_t status) {
[self = wptr<JsWindowListener>(this)] (napi_env env, NapiAsyncTask& task, int32_t status) {
auto thisListener = self.promote();
if (thisListener == nullptr) {
WLOGFE("[NAPI]this listener is nullptr");
@ -330,7 +330,7 @@ void JsWindowListener::OnScreenshot()
void JsWindowListener::OnDialogTargetTouch() const
{
std::unique_ptr<NapiAsyncTask::CompleteCallback> complete = std::make_unique<NapiAsyncTask::CompleteCallback> (
[self = weakRef_] (napi_env env, NapiAsyncTask &task, int32_t status) {
[self = weakRef_] (napi_env env, NapiAsyncTask& task, int32_t status) {
auto thisListener = self.promote();
if (thisListener == nullptr) {
WLOGFE("[NAPI]this listener is nullptr");
@ -349,7 +349,7 @@ void JsWindowListener::OnDialogTargetTouch() const
void JsWindowListener::OnDialogDeathRecipient() const
{
std::unique_ptr<NapiAsyncTask::CompleteCallback> complete = std::make_unique<NapiAsyncTask::CompleteCallback> (
[self = weakRef_] (napi_env env, NapiAsyncTask &task, int32_t status) {
[self = weakRef_] (napi_env env, NapiAsyncTask& task, int32_t status) {
auto thisListener = self.promote();
if (thisListener == nullptr) {
WLOGFE("[NAPI]this listener is nullptr");
@ -368,7 +368,7 @@ void JsWindowListener::OnDialogDeathRecipient() const
void JsWindowListener::OnGestureNavigationEnabledUpdate(bool enable)
{
std::unique_ptr<NapiAsyncTask::CompleteCallback> complete = std::make_unique<NapiAsyncTask::CompleteCallback> (
[self = weakRef_, enable, eng = env_] (napi_env env, NapiAsyncTask &task, int32_t status) {
[self = weakRef_, enable, eng = env_] (napi_env env, NapiAsyncTask& task, int32_t status) {
auto thisListener = self.promote();
if (thisListener == nullptr || eng == nullptr) {
WLOGFE("[NAPI]this listener or eng is nullptr");
@ -388,7 +388,7 @@ void JsWindowListener::OnGestureNavigationEnabledUpdate(bool enable)
void JsWindowListener::OnWaterMarkFlagUpdate(bool showWaterMark)
{
std::unique_ptr<NapiAsyncTask::CompleteCallback> complete = std::make_unique<NapiAsyncTask::CompleteCallback> (
[self = weakRef_, showWaterMark, eng = env_] (napi_env env, NapiAsyncTask &task, int32_t status) {
[self = weakRef_, showWaterMark, eng = env_] (napi_env env, NapiAsyncTask& task, int32_t status) {
auto thisListener = self.promote();
if (thisListener == nullptr || eng == nullptr) {
WLOGFE("[NAPI]this listener or eng is nullptr");
@ -418,7 +418,7 @@ int64_t JsWindowListener::GetTimeout() const
void JsWindowListener::OnWindowNoInteractionCallback()
{
std::unique_ptr<NapiAsyncTask::CompleteCallback> complete = std::make_unique<NapiAsyncTask::CompleteCallback> (
[self = weakRef_] (napi_env env, NapiAsyncTask &task, int32_t status) {
[self = weakRef_] (napi_env env, NapiAsyncTask& task, int32_t status) {
auto thisListener = self.promote();
if (thisListener == nullptr) {
WLOGFE("[NAPI]this listener is nullptr");
@ -440,7 +440,7 @@ void JsWindowListener::OnWindowStatusChange(WindowStatus windowstatus)
// js callback should run in js thread
std::unique_ptr<NapiAsyncTask::CompleteCallback> complete = std::make_unique<NapiAsyncTask::CompleteCallback> (
[self = weakRef_, windowstatus, eng = env_] (napi_env env,
NapiAsyncTask &task, int32_t status) {
NapiAsyncTask& task, int32_t status) {
auto thisListener = self.promote();
if (thisListener == nullptr || eng == nullptr) {
WLOGFE("[NAPI]this listener or eng is nullptr");
@ -463,7 +463,7 @@ void JsWindowListener::OnWindowStatusChange(WindowStatus windowstatus)
void JsWindowListener::OnWindowVisibilityChangedCallback(const bool isVisible)
{
std::unique_ptr<NapiAsyncTask::CompleteCallback> complete = std::make_unique<NapiAsyncTask::CompleteCallback>(
[self = weakRef_, isVisible, eng = env_] (napi_env env, NapiAsyncTask &task, int32_t status) {
[self = weakRef_, isVisible, eng = env_] (napi_env env, NapiAsyncTask& task, int32_t status) {
auto thisListener = self.promote();
if (thisListener == nullptr || eng == nullptr) {
WLOGFE("This listener or eng is nullptr");
@ -485,7 +485,7 @@ void JsWindowListener::OnWindowTitleButtonRectChanged(const TitleButtonRect& tit
WLOGFD("[NAPI]OnWindowTitleButtonRectChanged");
std::unique_ptr<NapiAsyncTask::CompleteCallback> complete = std::make_unique<NapiAsyncTask::CompleteCallback> (
[self = weakRef_, titleButtonRect, eng = env_] (napi_env env,
NapiAsyncTask &task, int32_t status) {
NapiAsyncTask& task, int32_t status) {
auto thisListener = self.promote();
if (thisListener == nullptr || eng == nullptr) {
WLOGFE("[NAPI]this listener or eng is nullptr");

View File

@ -728,7 +728,7 @@ napi_value CreateJsWindowStage(napi_env env, std::shared_ptr<Rosen::WindowScene>
std::unique_ptr<JsWindowStage> jsWindowStage = std::make_unique<JsWindowStage>(windowScene);
napi_wrap(env, objValue, jsWindowStage.release(), JsWindowStage::Finalizer, nullptr, nullptr);
const char *moduleName = "JsWindowStage";
const char* moduleName = "JsWindowStage";
BindNativeFunction(env,
objValue, "setUIContent", moduleName, JsWindowStage::SetUIContent);
BindNativeFunction(env,

View File

@ -31,7 +31,7 @@ extern "C" __attribute__((constructor)) void NAPI_application_WindowStage_AutoRe
}
extern "C" __attribute__((visibility("default")))
void NAPI_application_WindowStage_GetJSCode(const char **buf, int *bufLen)
void NAPI_application_WindowStage_GetJSCode(const char** buf, int* bufLen)
{
if (buf != nullptr) {
*buf = _binary_window_stage_js_start;
@ -44,7 +44,7 @@ void NAPI_application_WindowStage_GetJSCode(const char **buf, int *bufLen)
// window_stage JS register
extern "C" __attribute__((visibility("default")))
void NAPI_application_WindowStage_GetABCCode(const char **buf, int *buflen)
void NAPI_application_WindowStage_GetABCCode(const char** buf, int* buflen)
{
if (buf != nullptr) {
*buf = _binary_window_stage_abc_start;

View File

@ -39,7 +39,7 @@ public:
: env_(env), jsCallBack_(callback), weakRef_(wptr<JsWindowListener>(this)) {}
~JsWindowListener();
void OnAvoidAreaChanged(const AvoidArea avoidArea, AvoidAreaType type) override;
void CallJsMethod(const char* methodName, napi_value const *argv = nullptr, size_t argc = 0);
void CallJsMethod(const char* methodName, napi_value const* argv = nullptr, size_t argc = 0);
void SetMainEventHandler();
private:

View File

@ -33,7 +33,7 @@ public:
SetResolutionUtils() = default;
~SetResolutionUtils() = default;
static void PrintUsage(const std::string &cmdLine);
static void PrintUsage(const std::string& cmdLine);
static bool ProcessArgs(int argc, char * const argv[], CmdArgments& cmdArgments);
};
}

View File

@ -20,13 +20,13 @@
#include <string>
namespace OHOS {
void SetResolutionUtils::PrintUsage(const std::string &cmdLine)
void SetResolutionUtils::PrintUsage(const std::string& cmdLine)
{
std::cout << "usage: " << cmdLine.c_str() <<
" [-w width] [-h height] [-d dpi] [-m]" << std::endl;
}
bool SetResolutionUtils::ProcessArgs(int argc, char * const argv[], CmdArgments &cmdArgments)
bool SetResolutionUtils::ProcessArgs(int argc, char * const argv[], CmdArgments& cmdArgments)
{
int opt = 0;
const struct option longOption[] = {

View File

@ -49,23 +49,23 @@ public:
SnapShotUtils() = default;
~SnapShotUtils() = default;
static void PrintUsage(const std::string &cmdLine);
static bool CheckFileNameValid(const std::string &fileName, std::string fileType = "jpeg");
static void PrintUsage(const std::string& cmdLine);
static bool CheckFileNameValid(const std::string& fileName, std::string fileType = "jpeg");
static std::string GenerateFileName(std::string fileType, int offset = 0);
static bool CheckWidthAndHeightValid(int32_t w, int32_t h);
static bool RGBA8888ToRGB888(const uint8_t* rgba8888Buf, uint8_t *rgb888Buf, int32_t size);
static bool RGB565ToRGB888(const uint8_t* rgb565Buf, uint8_t *rgb888Buf, int32_t size);
static bool RGBA8888ToRGB888(const uint8_t* rgba8888Buf, uint8_t* rgb888Buf, int32_t size);
static bool RGB565ToRGB888(const uint8_t* rgb565Buf, uint8_t* rgb888Buf, int32_t size);
static bool WriteRgb888ToJpeg(FILE* file, uint32_t width, uint32_t height, const uint8_t* data);
static bool WriteToJpeg(const std::string &fileName, const WriteToJpegParam &param);
static bool WriteToJpeg(int fd, const WriteToJpegParam &param);
static bool WriteToJpegWithPixelMap(const std::string &fileName, Media::PixelMap &pixelMap);
static bool WriteToJpegWithPixelMap(int fd, Media::PixelMap &pixelMap);
static bool WriteToJpeg(const std::string& fileName, const WriteToJpegParam& param);
static bool WriteToJpeg(int fd, const WriteToJpegParam& param);
static bool WriteToJpegWithPixelMap(const std::string& fileName, Media::PixelMap& pixelMap);
static bool WriteToJpegWithPixelMap(int fd, Media::PixelMap& pixelMap);
static bool ProcessArgs(int argc, char * const argv[], CmdArguments& cmdArgments);
static bool CheckWHValid(int32_t param);
static bool CheckParamValid(const WriteToJpegParam &param);
static bool SaveSnapShot(const std::string &filename, Media::PixelMap &pixelMap, std::string fileType = "jpeg");
static bool CheckParamValid(const WriteToJpegParam& param);
static bool SaveSnapShot(const std::string& filename, Media::PixelMap& pixelMap, std::string fileType = "jpeg");
private:
static bool ProcessDisplayId(Rosen::DisplayId &displayId, bool isDisplayIdSet);
static bool ProcessDisplayId(Rosen::DisplayId& displayId, bool isDisplayIdSet);
};
}

View File

@ -80,7 +80,7 @@ const char *DEFAULT_SNAPSHOT_PREFIX = "/snapshot";
const char *VALID_SNAPSHOT_SUFFIX = ".jpeg";
const char *VALID_SNAPSHOT_PNG_SUFFIX = ".png";
void SnapShotUtils::PrintUsage(const std::string &cmdLine)
void SnapShotUtils::PrintUsage(const std::string& cmdLine)
{
std::cout << "usage: " << cmdLine.c_str() <<
" [-i displayId] [-f output_file] [-w width] [-h height] [-t type] [-m]" << std::endl;
@ -108,7 +108,7 @@ std::string SnapShotUtils::GenerateFileName(std::string fileType, int offset)
return fileName;
}
bool SnapShotUtils::CheckFileNameValid(const std::string &fileName, std::string fileType)
bool SnapShotUtils::CheckFileNameValid(const std::string& fileName, std::string fileType)
{
std::cout << "fileType: " << fileType << std::endl;
size_t fileMinLength = (fileType == "png") ? strlen(VALID_SNAPSHOT_PNG_SUFFIX) : strlen(VALID_SNAPSHOT_SUFFIX);
@ -156,7 +156,7 @@ bool SnapShotUtils::CheckWidthAndHeightValid(int32_t w, int32_t h)
return CheckWHValid(w) && CheckWHValid(h);
}
bool SnapShotUtils::CheckParamValid(const WriteToJpegParam &param)
bool SnapShotUtils::CheckParamValid(const WriteToJpegParam& param)
{
switch (param.format) {
case Media::PixelFormat::RGBA_8888:
@ -188,7 +188,7 @@ bool SnapShotUtils::CheckParamValid(const WriteToJpegParam &param)
return true;
}
bool SnapShotUtils::RGBA8888ToRGB888(const uint8_t* rgba8888Buf, uint8_t *rgb888Buf, int32_t size)
bool SnapShotUtils::RGBA8888ToRGB888(const uint8_t* rgba8888Buf, uint8_t* rgb888Buf, int32_t size)
{
if (rgba8888Buf == nullptr || rgb888Buf == nullptr || size <= 0) {
std::cout << __func__ << ": params are invalid." << std::endl;
@ -203,7 +203,7 @@ bool SnapShotUtils::RGBA8888ToRGB888(const uint8_t* rgba8888Buf, uint8_t *rgb888
return true;
}
bool SnapShotUtils::RGB565ToRGB888(const uint8_t* rgb565Buf, uint8_t *rgb888Buf, int32_t size)
bool SnapShotUtils::RGB565ToRGB888(const uint8_t* rgb565Buf, uint8_t* rgb888Buf, int32_t size)
{
if (rgb565Buf == nullptr || rgb888Buf == nullptr || size <= 0) {
std::cout << __func__ << ": params are invalid." << std::endl;
@ -267,7 +267,7 @@ bool SnapShotUtils::WriteRgb888ToJpeg(FILE* file, uint32_t width, uint32_t heigh
return true;
}
bool SnapShotUtils::WriteToJpeg(const std::string &fileName, const WriteToJpegParam &param)
bool SnapShotUtils::WriteToJpeg(const std::string& fileName, const WriteToJpegParam& param)
{
bool ret = false;
if (!CheckFileNameValid(fileName)) {
@ -315,7 +315,7 @@ bool SnapShotUtils::WriteToJpeg(const std::string &fileName, const WriteToJpegPa
return ret;
}
bool SnapShotUtils::WriteToJpeg(int fd, const WriteToJpegParam &param)
bool SnapShotUtils::WriteToJpeg(int fd, const WriteToJpegParam& param)
{
bool ret = false;
if (!CheckParamValid(param)) {
@ -358,7 +358,7 @@ bool SnapShotUtils::WriteToJpeg(int fd, const WriteToJpegParam &param)
return ret;
}
bool SnapShotUtils::SaveSnapShot(const std::string &fileName, Media::PixelMap &pixelMap, std::string fileType)
bool SnapShotUtils::SaveSnapShot(const std::string& fileName, Media::PixelMap& pixelMap, std::string fileType)
{
OHOS::Media::ImagePacker imagePacker;
OHOS::Media::PackOption option;
@ -383,7 +383,7 @@ bool SnapShotUtils::SaveSnapShot(const std::string &fileName, Media::PixelMap &p
return true;
}
bool SnapShotUtils::WriteToJpegWithPixelMap(const std::string &fileName, Media::PixelMap &pixelMap)
bool SnapShotUtils::WriteToJpegWithPixelMap(const std::string& fileName, Media::PixelMap& pixelMap)
{
if (pixelMap.GetAllocatorType() == Media::AllocatorType::DMA_ALLOC) {
return SaveSnapShot(fileName, pixelMap);
@ -397,7 +397,7 @@ bool SnapShotUtils::WriteToJpegWithPixelMap(const std::string &fileName, Media::
return SnapShotUtils::WriteToJpeg(fileName, param);
}
bool SnapShotUtils::WriteToJpegWithPixelMap(int fd, Media::PixelMap &pixelMap)
bool SnapShotUtils::WriteToJpegWithPixelMap(int fd, Media::PixelMap& pixelMap)
{
WriteToJpegParam param;
param.width = static_cast<uint32_t>(pixelMap.GetWidth());
@ -408,7 +408,7 @@ bool SnapShotUtils::WriteToJpegWithPixelMap(int fd, Media::PixelMap &pixelMap)
return SnapShotUtils::WriteToJpeg(fd, param);
}
bool SnapShotUtils::ProcessDisplayId(Rosen::DisplayId &displayId, bool isDisplayIdSet)
bool SnapShotUtils::ProcessDisplayId(Rosen::DisplayId& displayId, bool isDisplayIdSet)
{
if (!isDisplayIdSet) {
displayId = DisplayManager::GetInstance().GetDefaultDisplayId();
@ -433,7 +433,7 @@ bool SnapShotUtils::ProcessDisplayId(Rosen::DisplayId &displayId, bool isDisplay
return true;
}
bool SnapShotUtils::ProcessArgs(int argc, char * const argv[], CmdArguments &cmdArguments)
bool SnapShotUtils::ProcessArgs(int argc, char* const argv[], CmdArguments& cmdArguments)
{
int opt = 0;
const struct option longOption[] = {

View File

@ -35,7 +35,7 @@ public:
return 0;
}
int SendRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option)
int SendRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option)
{
return 0;
}
@ -50,12 +50,12 @@ public:
return true;
}
bool AddDeathRecipient(const sptr<DeathRecipient> &recipient)
bool AddDeathRecipient(const sptr<DeathRecipient>& recipient)
{
return true;
}
bool RemoveDeathRecipient(const sptr<DeathRecipient> &recipient)
bool RemoveDeathRecipient(const sptr<DeathRecipient>& recipient)
{
return true;
}
@ -65,7 +65,7 @@ public:
return nullptr;
}
int Dump(int fd, const std::vector<std::u16string> &args)
int Dump(int fd, const std::vector<std::u16string>& args)
{
return 0;
}
@ -85,7 +85,7 @@ public:
return 0;
}
int SendRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option)
int SendRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option)
{
return sendRequestResult_;
}
@ -100,12 +100,12 @@ public:
return true;
}
bool AddDeathRecipient(const sptr<DeathRecipient> &recipient)
bool AddDeathRecipient(const sptr<DeathRecipient>& recipient)
{
return true;
}
bool RemoveDeathRecipient(const sptr<DeathRecipient> &recipient)
bool RemoveDeathRecipient(const sptr<DeathRecipient>& recipient)
{
return true;
}
@ -115,7 +115,7 @@ public:
return nullptr;
}
int Dump(int fd, const std::vector<std::u16string> &args)
int Dump(int fd, const std::vector<std::u16string>& args)
{
return 0;
}

View File

@ -88,10 +88,10 @@ public:
int64_t baseParent, std::list<Accessibility::AccessibilityElementInfo>& output));
MOCK_METHOD4(
FindFocusedElementInfo, void(int64_t elementId,
int32_t focusType, int64_t baseParent, Accessibility::AccessibilityElementInfo &output));
int32_t focusType, int64_t baseParent, Accessibility::AccessibilityElementInfo& output));
MOCK_METHOD4(
FocusMoveSearch, void(int64_t elementId, int32_t direction, int64_t baseParent,
Accessibility::AccessibilityElementInfo &output));
Accessibility::AccessibilityElementInfo& output));
MOCK_METHOD1(GetAppPaintSize, void(OHOS::Rosen::Rect& drawableRect));
MOCK_METHOD2(SetContainerModalTitleVisible, void(bool customTitleSettedShow, bool floatingTitleSettedShow));
MOCK_METHOD1(SetContainerModalTitleHeight, void(int height));

View File

@ -22,7 +22,7 @@
using namespace OHOS;
using namespace OHOS::Rosen;
int main(int argc, char *argv[])
int main(int argc, char* argv[])
{
SessionManager sessionManager;

View File

@ -53,7 +53,7 @@ void OutputWindowInfos(const std::vector<sptr<AccessibilityWindowInfo>>& infos)
}
}
int main(int argc, char *argv[])
int main(int argc, char* argv[])
{
std::cout << "===========================Start===========================" << std::endl;
std::cout << "Wait 20s, The Windows will close itself" << std::endl;

View File

@ -42,7 +42,7 @@ public:
using namespace OHOS;
using namespace OHOS::Rosen;
int main(int argc, char *argv[])
int main(int argc, char* argv[])
{
std::cout << "===========================Start===========================" << std::endl;

View File

@ -41,7 +41,7 @@ public:
using namespace OHOS;
using namespace OHOS::Rosen;
int main(int argc, char *argv[])
int main(int argc, char* argv[])
{
std::cout << "===========================Start===========================" << std::endl;

View File

@ -35,7 +35,7 @@ namespace {
constexpr size_t DATA_MIN_SIZE = 2;
}
void SceneSessionMgrLsTest(MessageParcel &parcel, MessageParcel &reply, MessageOption &option)
void SceneSessionMgrLsTest(MessageParcel& parcel, MessageParcel& reply, MessageOption& option)
{
parcel.RewindRead(0);
SceneSessionManagerLite::GetInstance().OnRemoteRequest(static_cast<uint32_t>(ISceneSessionManagerLite::

View File

@ -31,7 +31,7 @@ namespace {
}
template<class T>
size_t GetObject(T &object, const uint8_t *data, size_t size)
size_t GetObject(T& object, const uint8_t* data, size_t size)
{
size_t objectSize = sizeof(object);
if (objectSize > size) {

View File

@ -221,7 +221,7 @@ public:
};
template<class T>
size_t GetObject(T &object, const uint8_t *data, size_t size)
size_t GetObject(T& object, const uint8_t* data, size_t size)
{
size_t objectSize = sizeof(object);
if (objectSize > size) {
@ -231,7 +231,7 @@ size_t GetObject(T &object, const uint8_t *data, size_t size)
}
/* 调用该接口后, 需要释放内存 */
char *CopyDataToString(const uint8_t *data, size_t size)
char *CopyDataToString(const uint8_t* data, size_t size)
{
if (size > DATA_MAX_SIZE) {
return nullptr;

View File

@ -34,7 +34,7 @@ namespace {
}
template<class T>
size_t GetObject(T &object, const uint8_t *data, size_t size)
size_t GetObject(T& object, const uint8_t* data, size_t size)
{
size_t objectSize = sizeof(object);
if (objectSize > size) {

View File

@ -28,7 +28,7 @@ namespace {
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerIPC_Fuzzer"};
}
template<class T>
size_t GetObject(T &object, const uint8_t *data, size_t size)
size_t GetObject(T& object, const uint8_t* data, size_t size)
{
size_t objectSize = sizeof(object);
if (objectSize > size) {

View File

@ -28,7 +28,7 @@ namespace {
}
template<class T>
size_t GetObject(T &object, const uint8_t *data, size_t size)
size_t GetObject(T& object, const uint8_t* data, size_t size)
{
size_t objectSize = sizeof(object);
if (objectSize > size) {

View File

@ -63,7 +63,7 @@ public:
};
template<class T>
size_t GetObject(T &object, const uint8_t *data, size_t size)
size_t GetObject(T& object, const uint8_t* data, size_t size)
{
size_t objectSize = sizeof(object);
if (objectSize > size) {
@ -72,7 +72,7 @@ size_t GetObject(T &object, const uint8_t *data, size_t size)
return memcpy_s(&object, objectSize, data, objectSize) == EOK ? objectSize : 0;
}
size_t InitWindowOption1(WindowOption &windowOption, const uint8_t *data, size_t size)
size_t InitWindowOption1(WindowOption& windowOption, const uint8_t* data, size_t size)
{
size_t startPos = 0;
Rect windowRect;
@ -106,7 +106,7 @@ size_t InitWindowOption1(WindowOption &windowOption, const uint8_t *data, size_t
return startPos;
}
size_t InitWindowOption2(WindowOption &windowOption, const uint8_t *data, size_t size)
size_t InitWindowOption2(WindowOption& windowOption, const uint8_t* data, size_t size)
{
size_t startPos = 0;
uint32_t flags;
@ -150,7 +150,7 @@ size_t InitWindowOption2(WindowOption &windowOption, const uint8_t *data, size_t
return startPos;
}
size_t InitWindowOption(WindowOption &windowOption, const uint8_t *data, size_t size)
size_t InitWindowOption(WindowOption& windowOption, const uint8_t* data, size_t size)
{
size_t startPos = 0;
startPos += InitWindowOption1(windowOption, data + startPos, size - startPos);

View File

@ -32,7 +32,7 @@ namespace {
}
template<class T>
size_t GetObject(T &object, const uint8_t *data, size_t size)
size_t GetObject(T& object, const uint8_t* data, size_t size)
{
size_t objectSize = sizeof(object);
if (objectSize > size) {
@ -42,7 +42,7 @@ size_t GetObject(T &object, const uint8_t *data, size_t size)
}
size_t InitMatrix3(OHOS::Rosen::TransformHelper::Matrix3& mat3,
const uint8_t *data, size_t size, size_t startPos)
const uint8_t* data, size_t size, size_t startPos)
{
if (data == nullptr || size < DATA_MIN_SIZE) {
return 0;
@ -58,7 +58,7 @@ size_t InitMatrix3(OHOS::Rosen::TransformHelper::Matrix3& mat3,
}
void InitMatrix4(OHOS::Rosen::TransformHelper::Matrix4& mat4,
const uint8_t *data, size_t size, size_t& startPos)
const uint8_t* data, size_t size, size_t& startPos)
{
if (data == nullptr || size < DATA_MIN_SIZE) {
return;
@ -73,7 +73,7 @@ void InitMatrix4(OHOS::Rosen::TransformHelper::Matrix4& mat4,
}
void InitVector2(OHOS::Rosen::TransformHelper::Vector2& vec2,
const uint8_t *data, size_t size, size_t& startPos)
const uint8_t* data, size_t size, size_t& startPos)
{
if (data == nullptr || size < DATA_MIN_SIZE) {
return;
@ -83,7 +83,7 @@ void InitVector2(OHOS::Rosen::TransformHelper::Vector2& vec2,
}
void InitVector3(OHOS::Rosen::TransformHelper::Vector3& vec3,
const uint8_t *data, size_t size, size_t& startPos)
const uint8_t* data, size_t size, size_t& startPos)
{
if (data == nullptr || size < DATA_MIN_SIZE) {
return;
@ -93,7 +93,7 @@ void InitVector3(OHOS::Rosen::TransformHelper::Vector3& vec3,
startPos += GetObject<float>(vec3.y_, data + startPos, size - startPos);
}
void WindowUtilMathFuzzPart1(const uint8_t *data, size_t size)
void WindowUtilMathFuzzPart1(const uint8_t* data, size_t size)
{
if (data == nullptr || size < DATA_MIN_SIZE) {
return;
@ -137,7 +137,7 @@ void WindowUtilMathFuzzPart1(const uint8_t *data, size_t size)
OHOS::Rosen::TransformHelper::CreateTranslation(vec3);
}
void WindowUtilMathFuzzPart2(const uint8_t *data, size_t size)
void WindowUtilMathFuzzPart2(const uint8_t* data, size_t size)
{
if (data == nullptr || size < DATA_MIN_SIZE) {
return;

View File

@ -52,9 +52,9 @@ public:
DEFINE_VAR_FUNC_GET_SET(std::vector<DMRect>, BoundingRects, boundingRects);
private:
const static uint32_t MAX_CUTOUT_INFO_SIZE = 20;
bool WriteBoundingRectsVector(const std::vector<DMRect>& boundingRects, Parcel &parcel) const;
static bool ReadBoundingRectsVector(std::vector<DMRect>& unmarBoundingRects, Parcel &parcel);
static bool ReadWaterfallDisplayAreaRects(WaterfallDisplayAreaRects& waterfallDisplayAreaRects, Parcel &parcel);
bool WriteBoundingRectsVector(const std::vector<DMRect>& boundingRects, Parcel& parcel) const;
static bool ReadBoundingRectsVector(std::vector<DMRect>& unmarBoundingRects, Parcel& parcel);
static bool ReadWaterfallDisplayAreaRects(WaterfallDisplayAreaRects& waterfallDisplayAreaRects, Parcel& parcel);
};
} // namespace OHOS::Rosen
#endif // FOUNDATION_DMSERVER_CUTOUT_INFO_H

View File

@ -61,7 +61,7 @@ public:
}
}
static FocusChangeInfo* Unmarshalling(Parcel &parcel)
static FocusChangeInfo* Unmarshalling(Parcel& parcel)
{
auto focusChangeInfo = new FocusChangeInfo();
bool res = parcel.ReadInt32(focusChangeInfo->windowId_) && parcel.ReadUint64(focusChangeInfo->displayId_) &&

View File

@ -23,7 +23,7 @@ class MarshallingHelper : public Parcelable {
public:
MarshallingHelper() = delete;
template<class T>
static bool MarshallingVectorParcelableObj(Parcel &parcel, const std::vector<sptr<T>>& data)
static bool MarshallingVectorParcelableObj(Parcel& parcel, const std::vector<sptr<T>>& data)
{
if (data.size() > INT_MAX) {
return false;
@ -40,7 +40,7 @@ public:
}
template<class T>
static bool UnmarshallingVectorParcelableObj(Parcel &parcel, std::vector<sptr<T>>& data)
static bool UnmarshallingVectorParcelableObj(Parcel& parcel, std::vector<sptr<T>>& data)
{
int32_t len = parcel.ReadInt32();
if (len < 0) {
@ -71,7 +71,7 @@ public:
}
template<class T>
static bool MarshallingVectorObj(Parcel &parcel, const std::vector<T>& data,
static bool MarshallingVectorObj(Parcel& parcel, const std::vector<T>& data,
std::function<bool(Parcel&, const T&)> func)
{
if (data.size() > INT_MAX) {
@ -92,7 +92,7 @@ public:
}
template<class T>
static bool UnmarshallingVectorObj(Parcel &parcel, std::vector<T>& data, std::function<bool(Parcel&, T&)> func)
static bool UnmarshallingVectorObj(Parcel& parcel, std::vector<T>& data, std::function<bool(Parcel&, T&)> func)
{
if (func == nullptr) {
return false;

View File

@ -26,10 +26,10 @@ class PiPReporter {
WM_DECLARE_SINGLE_INSTANCE(PiPReporter);
public:
void SetCurrentPackageName(const std::string &packageName);
void ReportPiPStartWindow(int32_t source, int32_t templateType, int32_t isSuccess, const std::string &errorReason);
void ReportPiPStopWindow(int32_t source, int32_t templateType, int32_t isSuccess, const std::string &errorReason);
void ReportPiPActionEvent(int32_t templateType, const std::string &actionEvent);
void SetCurrentPackageName(const std::string& packageName);
void ReportPiPStartWindow(int32_t source, int32_t templateType, int32_t isSuccess, const std::string& errorReason);
void ReportPiPStopWindow(int32_t source, int32_t templateType, int32_t isSuccess, const std::string& errorReason);
void ReportPiPActionEvent(int32_t templateType, const std::string& actionEvent);
void ReportPiPControlEvent(int32_t templateType, PiPControlType controlType);
void ReportPiPRatio(int32_t windowWidth, int32_t windowHeight);
void ReportPiPRestore();

View File

@ -45,14 +45,14 @@ public:
Rect transparentRect);
private:
static bool DoDraw(uint8_t *addr, uint32_t width, uint32_t height, const std::string& imagePath);
static bool DoDraw(uint8_t *addr, uint32_t width, uint32_t height, uint32_t color);
static bool DoDraw(uint8_t *addr, uint32_t width, uint32_t height, std::shared_ptr<Media::PixelMap> pixelMap);
static bool DoDraw(uint8_t* addr, uint32_t width, uint32_t height, const std::string& imagePath);
static bool DoDraw(uint8_t* addr, uint32_t width, uint32_t height, uint32_t color);
static bool DoDraw(uint8_t* addr, uint32_t width, uint32_t height, std::shared_ptr<Media::PixelMap> pixelMap);
static sptr<OHOS::Surface> GetLayer(std::shared_ptr<RSSurfaceNode> surfaceNode);
static sptr<OHOS::SurfaceBuffer> GetSurfaceBuffer(sptr<OHOS::Surface> layer, int32_t bufferWidth,
int32_t bufferHeight);
static void DrawPixelmap(Drawing::Canvas &canvas, const std::string& imagePath);
static std::unique_ptr<OHOS::Media::PixelMap> DecodeImageToPixelMap(const std::string &imagePath);
static void DrawPixelmap(Drawing::Canvas& canvas, const std::string& imagePath);
static std::unique_ptr<OHOS::Media::PixelMap> DecodeImageToPixelMap(const std::string& imagePath);
static bool DoDrawImageRect(sptr<OHOS::SurfaceBuffer> buffer, const Rect& rect,
std::shared_ptr<Media::PixelMap> pixelMap, uint32_t color, bool fillWindow = false);
};

View File

@ -37,7 +37,7 @@ public:
private:
class BufferListener : public IBufferConsumerListener {
public:
explicit BufferListener(SurfaceReader &surfaceReader): surfaceReader_(surfaceReader)
explicit BufferListener(SurfaceReader& surfaceReader): surfaceReader_(surfaceReader)
{
}
~BufferListener() noexcept override = default;
@ -52,7 +52,7 @@ private:
friend class BufferListener;
void OnVsync();
bool ProcessBuffer(const sptr<SurfaceBuffer> &buf);
bool ProcessBuffer(const sptr<SurfaceBuffer>& buf);
sptr<IBufferConsumerListener> listener_ = nullptr;
sptr<IConsumerSurface> csurface_ = nullptr; // cosumer surface

View File

@ -22,7 +22,7 @@ CutoutInfo::CutoutInfo(const std::vector<DMRect>& boundingRects,
{
}
bool CutoutInfo::Marshalling(Parcel &parcel) const
bool CutoutInfo::Marshalling(Parcel& parcel) const
{
return parcel.WriteInt32(waterfallDisplayAreaRects_.left.posX_) &&
parcel.WriteInt32(waterfallDisplayAreaRects_.left.posY_) &&
@ -43,7 +43,7 @@ bool CutoutInfo::Marshalling(Parcel &parcel) const
WriteBoundingRectsVector(boundingRects_, parcel);
}
CutoutInfo *CutoutInfo::Unmarshalling(Parcel &parcel)
CutoutInfo *CutoutInfo::Unmarshalling(Parcel& parcel)
{
WaterfallDisplayAreaRects waterfallDisplayAreaRects;
std::vector<DMRect> boundingRects;
@ -53,7 +53,7 @@ CutoutInfo *CutoutInfo::Unmarshalling(Parcel &parcel)
return cutoutInfo;
}
bool CutoutInfo::WriteBoundingRectsVector(const std::vector<DMRect>& boundingRects, Parcel &parcel) const
bool CutoutInfo::WriteBoundingRectsVector(const std::vector<DMRect>& boundingRects, Parcel& parcel) const
{
uint32_t size = static_cast<uint32_t>(boundingRects.size());
if (!parcel.WriteUint32(size)) {
@ -71,7 +71,7 @@ bool CutoutInfo::WriteBoundingRectsVector(const std::vector<DMRect>& boundingRec
return true;
}
bool CutoutInfo::ReadBoundingRectsVector(std::vector<DMRect>& unmarBoundingRects, Parcel &parcel)
bool CutoutInfo::ReadBoundingRectsVector(std::vector<DMRect>& unmarBoundingRects, Parcel& parcel)
{
uint32_t size;
if (!parcel.ReadUint32(size)) {
@ -95,7 +95,7 @@ bool CutoutInfo::ReadBoundingRectsVector(std::vector<DMRect>& unmarBoundingRects
return true;
}
bool CutoutInfo::ReadWaterfallDisplayAreaRects(WaterfallDisplayAreaRects& waterfallDisplayAreaRects, Parcel &parcel)
bool CutoutInfo::ReadWaterfallDisplayAreaRects(WaterfallDisplayAreaRects& waterfallDisplayAreaRects, Parcel& parcel)
{
if (!(parcel.ReadInt32(waterfallDisplayAreaRects.left.posX_) &&
parcel.ReadInt32(waterfallDisplayAreaRects.left.posY_) &&

View File

@ -57,7 +57,7 @@ constexpr char EVENT_KEY_ACTION_EVENT[] = "ACTION_EVENT";
constexpr char EVENT_KEY_WINDOW_WIDTH[] = "WINDOW_WIDTH";
constexpr char EVENT_KEY_WINDOW_HEIGHT[] = "WINDOW_HEIGHT";
void PiPReporter::SetCurrentPackageName(const std::string &packageName)
void PiPReporter::SetCurrentPackageName(const std::string& packageName)
{
std::lock_guard<std::mutex> lock(packageNameMutex_);
packageName_ = packageName;
@ -113,7 +113,7 @@ void PiPReporter::ReportPiPStopWindow(int32_t source, int32_t templateType,
LOG_WHEN_ERROR(ret);
}
void PiPReporter::ReportPiPActionEvent(int32_t templateType, const std::string &actionEvent)
void PiPReporter::ReportPiPActionEvent(int32_t templateType, const std::string& actionEvent)
{
TLOGI(WmsLogTag::WMS_PIP, "Report pip widow action event");
std::string eventName = "CONTROL_PANNEL_ACTION_EVENT";

View File

@ -157,7 +157,7 @@ sptr<OHOS::SurfaceBuffer> SurfaceDraw::GetSurfaceBuffer(sptr<OHOS::Surface> laye
return buffer;
}
std::unique_ptr<OHOS::Media::PixelMap> SurfaceDraw::DecodeImageToPixelMap(const std::string &imagePath)
std::unique_ptr<OHOS::Media::PixelMap> SurfaceDraw::DecodeImageToPixelMap(const std::string& imagePath)
{
OHOS::Media::SourceOptions opts;
opts.formatHint = "image/png";
@ -179,7 +179,7 @@ std::unique_ptr<OHOS::Media::PixelMap> SurfaceDraw::DecodeImageToPixelMap(const
return pixelMap;
}
void SurfaceDraw::DrawPixelmap(Drawing::Canvas &canvas, const std::string& imagePath)
void SurfaceDraw::DrawPixelmap(Drawing::Canvas& canvas, const std::string& imagePath)
{
std::unique_ptr<OHOS::Media::PixelMap> pixelmap = DecodeImageToPixelMap(imagePath);
if (pixelmap == nullptr) {
@ -195,7 +195,7 @@ void SurfaceDraw::DrawPixelmap(Drawing::Canvas &canvas, const std::string& image
RSPixelMapUtil::DrawPixelMap(canvas, *pixelmap, 0, 0);
}
bool SurfaceDraw::DoDraw(uint8_t *addr, uint32_t width, uint32_t height, const std::string& imagePath)
bool SurfaceDraw::DoDraw(uint8_t* addr, uint32_t width, uint32_t height, const std::string& imagePath)
{
Drawing::Bitmap bitmap;
Drawing::BitmapFormat format { Drawing::ColorType::COLORTYPE_RGBA_8888,
@ -214,7 +214,7 @@ bool SurfaceDraw::DoDraw(uint8_t *addr, uint32_t width, uint32_t height, const s
return true;
}
bool SurfaceDraw::DoDraw(uint8_t *addr, uint32_t width, uint32_t height, std::shared_ptr<Media::PixelMap> pixelMap)
bool SurfaceDraw::DoDraw(uint8_t* addr, uint32_t width, uint32_t height, std::shared_ptr<Media::PixelMap> pixelMap)
{
Drawing::Bitmap bitmap;
Drawing::Canvas canvas;
@ -244,7 +244,7 @@ bool SurfaceDraw::DoDraw(uint8_t *addr, uint32_t width, uint32_t height, std::sh
return true;
}
bool SurfaceDraw::DoDraw(uint8_t *addr, uint32_t width, uint32_t height, uint32_t color)
bool SurfaceDraw::DoDraw(uint8_t* addr, uint32_t width, uint32_t height, uint32_t color)
{
Drawing::Bitmap bitmap;
Drawing::BitmapFormat format { Drawing::ColorType::COLORTYPE_RGBA_8888,

View File

@ -107,7 +107,7 @@ void SurfaceReader::SetHandler(sptr<SurfaceReaderHandler> handler)
handler_ = handler;
}
bool SurfaceReader::ProcessBuffer(const sptr<SurfaceBuffer> &buf)
bool SurfaceReader::ProcessBuffer(const sptr<SurfaceBuffer>& buf)
{
if (handler_ == nullptr) {
WLOGFE("SurfaceReaderHandler not set");

View File

@ -21,14 +21,14 @@ namespace {
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowDrawingContentInfo"};
}
bool WindowDrawingContentInfo::Marshalling(Parcel &parcel) const
bool WindowDrawingContentInfo::Marshalling(Parcel& parcel) const
{
return parcel.WriteUint32(windowId_) && parcel.WriteInt32(pid_) &&
parcel.WriteInt32(uid_) && parcel.WriteUint32(static_cast<uint32_t>(drawingContentState_)) &&
parcel.WriteUint32(static_cast<uint32_t>(windowType_));
}
WindowDrawingContentInfo* WindowDrawingContentInfo::Unmarshalling(Parcel &parcel)
WindowDrawingContentInfo* WindowDrawingContentInfo::Unmarshalling(Parcel& parcel)
{
auto windowDrawingContentInfo = new (std::nothrow) WindowDrawingContentInfo();
if (windowDrawingContentInfo == nullptr) {

View File

@ -21,7 +21,7 @@ namespace {
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowVisibilityInfo"};
}
bool WindowVisibilityInfo::Marshalling(Parcel &parcel) const
bool WindowVisibilityInfo::Marshalling(Parcel& parcel) const
{
return parcel.WriteUint32(windowId_) && parcel.WriteInt32(pid_) &&
parcel.WriteInt32(uid_) && parcel.WriteUint32(static_cast<uint32_t>(visibilityState_)) &&
@ -31,7 +31,7 @@ bool WindowVisibilityInfo::Marshalling(Parcel &parcel) const
parcel.WriteString(bundleName_) && parcel.WriteString(abilityName_);
}
WindowVisibilityInfo* WindowVisibilityInfo::Unmarshalling(Parcel &parcel)
WindowVisibilityInfo* WindowVisibilityInfo::Unmarshalling(Parcel& parcel)
{
auto windowVisibilityInfo = new (std::nothrow) WindowVisibilityInfo();
if (windowVisibilityInfo == nullptr) {

View File

@ -58,7 +58,7 @@ sptr<AppExecFwk::IBundleMgr> GetBundleManagerProxy()
return bundleManagerServiceProxy;
}
bool GetInputMethodBundleName(std::string &name)
bool GetInputMethodBundleName(std::string& name)
{
auto imc = MiscServices::InputMethodController::GetInstance();
if (!imc) {

View File

@ -33,7 +33,7 @@ class ANRHandler {
public:
DISALLOW_COPY_AND_MOVE(ANRHandler);
void SetSessionStage(int32_t eventId, const wptr<ISessionStage> &sessionStage);
void SetSessionStage(int32_t eventId, const wptr<ISessionStage>& sessionStage);
void HandleEventConsumed(int32_t eventId, int64_t actionTime);
void OnWindowDestroyed(int32_t persistentId);

View File

@ -49,7 +49,7 @@ ANRHandler::ANRHandler()
ANRHandler::~ANRHandler() {}
void ANRHandler::SetSessionStage(int32_t eventId, const wptr<ISessionStage> &sessionStage)
void ANRHandler::SetSessionStage(int32_t eventId, const wptr<ISessionStage>& sessionStage)
{
auto task = [this, eventId, sessionStage]() {
sptr<ISessionStage> session = sessionStage.promote();

View File

@ -78,7 +78,7 @@ std::vector<int32_t> EventStage::DelEvents(int32_t persistentId, int32_t eventId
return {};
}
auto &events = events_[persistentId];
auto fistMatchIter = find_if(events.begin(), events.end(), [eventId](const auto &item) {
auto fistMatchIter = find_if(events.begin(), events.end(), [eventId](const auto& item) {
return item.eventId > eventId;
});
std::vector<int32_t> timerIds;

View File

@ -26,7 +26,7 @@ int64_t GetSysClockTime();
int64_t GetMillisTime();
template<typename T>
bool AddInt(T op1, T op2, T minVal, T maxVal, T &res)
bool AddInt(T op1, T op2, T minVal, T maxVal, T& res)
{
if (op1 >= 0) {
if (op2 > maxVal - op1) {
@ -41,12 +41,12 @@ bool AddInt(T op1, T op2, T minVal, T maxVal, T &res)
return true;
}
inline bool AddInt32(int32_t op1, int32_t op2, int32_t &res)
inline bool AddInt32(int32_t op1, int32_t op2, int32_t& res)
{
return AddInt(op1, op2, INT32_MIN, INT32_MAX, res);
}
inline bool AddInt64(int64_t op1, int64_t op2, int64_t &res)
inline bool AddInt64(int64_t op1, int64_t op2, int64_t& res)
{
return AddInt(op1, op2, INT64_MIN, INT64_MAX, res);
}

View File

@ -2309,7 +2309,7 @@ void JsSceneSession::TerminateSessionTotal(const SessionInfo& info, TerminateTyp
taskScheduler_->PostMainThreadTask(task, "TerminateSessionTotal:name:" + info.abilityName_);
}
void JsSceneSession::UpdateSessionLabel(const std::string &label)
void JsSceneSession::UpdateSessionLabel(const std::string& label)
{
WLOGFI("[NAPI]run UpdateSessionLabel");
@ -2359,7 +2359,7 @@ void JsSceneSession::ProcessUpdateSessionIconRegister()
WLOGFD("ProcessUpdateSessionIconRegister success");
}
void JsSceneSession::UpdateSessionIcon(const std::string &iconPath)
void JsSceneSession::UpdateSessionIcon(const std::string& iconPath)
{
WLOGFI("[NAPI]run UpdateSessionIcon");

View File

@ -237,8 +237,8 @@ private:
void TerminateSession(const SessionInfo& info);
void TerminateSessionNew(const SessionInfo& info, bool needStartCaller, bool isFromBroker);
void TerminateSessionTotal(const SessionInfo& info, TerminateType terminateType);
void UpdateSessionLabel(const std::string &label);
void UpdateSessionIcon(const std::string &iconPath);
void UpdateSessionLabel(const std::string& label);
void UpdateSessionIcon(const std::string& iconPath);
void OnSessionException(const SessionInfo& info, bool needRemoveSession);
void OnSystemBarPropertyChange(const std::unordered_map<WindowType, SystemBarProperty>& propertyMap);
void OnNeedAvoid(bool status);

View File

@ -1061,7 +1061,7 @@ napi_value JsSceneSessionManager::OnGetAllAbilityInfos(napi_env env, napi_callba
*errCode = static_cast<int32_t>(code);
};
auto complete = [obj = this, errCode, infos = scbAbilityInfos]
(napi_env env, NapiAsyncTask &task, int32_t status) {
(napi_env env, NapiAsyncTask& task, int32_t status) {
if (*errCode != static_cast<int32_t>(WSErrorCode::WS_OK)) {
std::string errMsg = "invalid params can not get All AbilityInfos!";
task.RejectWithCustomize(env, CreateJsValue(env, *errCode), CreateJsValue(env, errMsg));

View File

@ -641,7 +641,7 @@ bool ConvertDeviceIdFromJs(napi_env env, napi_value jsObject, MMI::PointerEvent&
return true;
}
bool ConvertInt32ArrayFromJs(napi_env env, napi_value jsObject, std::vector<int32_t> &intList)
bool ConvertInt32ArrayFromJs(napi_env env, napi_value jsObject, std::vector<int32_t>& intList)
{
bool isArray = false;
napi_is_array(env, jsObject, &isArray);
@ -666,7 +666,7 @@ bool ConvertInt32ArrayFromJs(napi_env env, napi_value jsObject, std::vector<int3
return true;
}
bool ConvertStringMapFromJs(napi_env env, napi_value value, std::unordered_map<std::string, std::string> &stringMap)
bool ConvertStringMapFromJs(napi_env env, napi_value value, std::unordered_map<std::string, std::string>& stringMap)
{
if (value == nullptr) {
WLOGFE("value is nullptr");
@ -707,7 +707,7 @@ bool ConvertStringMapFromJs(napi_env env, napi_value value, std::unordered_map<s
return true;
}
bool ParseArrayStringValue(napi_env env, napi_value array, std::vector<std::string> &vector)
bool ParseArrayStringValue(napi_env env, napi_value array, std::vector<std::string>& vector)
{
if (array == nullptr) {
WLOGFE("array is nullptr!");
@ -798,7 +798,7 @@ napi_value CreateJsSessionInfo(napi_env env, const SessionInfo& sessionInfo)
}
napi_value CreateJsSessionRecoverInfo(
napi_env env, const SessionInfo &sessionInfo, const sptr<WindowSessionProperty> property)
napi_env env, const SessionInfo& sessionInfo, const sptr<WindowSessionProperty> property)
{
napi_value objValue = nullptr;
napi_create_object(env, &objValue);

View File

@ -148,13 +148,13 @@ bool ConvertSessionInfoFromJs(napi_env env, napi_value jsObject, SessionInfo& se
bool ConvertPointerEventFromJs(napi_env env, napi_value jsObject, MMI::PointerEvent& pointerEvent);
bool ConvertDeviceIdFromJs(napi_env env, napi_value jsObject, MMI::PointerEvent& pointerEvent);
bool ConvertInt32ArrayFromJs(napi_env env, napi_value jsObject, std::vector<int32_t>& intList);
bool ConvertStringMapFromJs(napi_env env, napi_value value, std::unordered_map<std::string, std::string> &stringMap);
bool ParseArrayStringValue(napi_env env, napi_value array, std::vector<std::string> &vector);
bool ConvertStringMapFromJs(napi_env env, napi_value value, std::unordered_map<std::string, std::string>& stringMap);
bool ParseArrayStringValue(napi_env env, napi_value array, std::vector<std::string>& vector);
bool ConvertProcessOptionFromJs(napi_env env, napi_value jsObject,
std::shared_ptr<AAFwk::ProcessOptions> processOptions);
napi_value CreateJsSessionInfo(napi_env env, const SessionInfo& sessionInfo);
napi_value CreateJsSessionRecoverInfo(
napi_env env, const SessionInfo &sessionInfo, const sptr<WindowSessionProperty> property);
napi_env env, const SessionInfo& sessionInfo, const sptr<WindowSessionProperty> property);
void SetJsSessionInfoByWant(napi_env env, const SessionInfo& sessionInfo, napi_value objValue);
napi_value CreateJsProcessOption(napi_env env, std::shared_ptr<AAFwk::ProcessOptions> processOptions);
napi_value CreateJsSessionStartupVisibility(napi_env env);

View File

@ -30,8 +30,8 @@ public:
SessionStageStub() = default;
~SessionStageStub() = default;
int OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply,
MessageOption &option) override;
int OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply,
MessageOption& option) override;
private:
int HandleSetActive(MessageParcel& data, MessageParcel& reply);

View File

@ -28,8 +28,8 @@ public:
WindowEventChannelStub() = default;
~WindowEventChannelStub() = default;
int OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply,
MessageOption &option) override;
int OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply,
MessageOption& option) override;
private:
int HandleTransferBackpressedEvent(MessageParcel& data, MessageParcel& reply);

View File

@ -27,7 +27,7 @@ namespace {
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "SessionStageStub"};
}
int SessionStageStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option)
int SessionStageStub::OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option)
{
WLOGFD("Scene session stage on remote request!, code: %{public}u", code);
if (data.ReadInterfaceToken() != GetDescriptor()) {

View File

@ -30,8 +30,8 @@ namespace {
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowEventChannelStub"};
}
int WindowEventChannelStub::OnRemoteRequest(uint32_t code, MessageParcel &data,
MessageParcel &reply, MessageOption &option)
int WindowEventChannelStub::OnRemoteRequest(uint32_t code, MessageParcel& data,
MessageParcel& reply, MessageOption& option)
{
WLOGFD("Window event channel on remote request!, code: %{public}u", code);
if (data.ReadInterfaceToken() != GetDescriptor()) {
@ -178,7 +178,7 @@ int WindowEventChannelStub::HandleTransferAccessibilityHoverEvent(MessageParcel&
return ERR_NONE;
}
int32_t WindowEventChannelStub::HandleTransferAccessibilityChildTreeRegister(MessageParcel &data, MessageParcel &reply)
int32_t WindowEventChannelStub::HandleTransferAccessibilityChildTreeRegister(MessageParcel& data, MessageParcel& reply)
{
uint32_t windowId = 0;
int32_t treeId = -1;
@ -195,14 +195,14 @@ int32_t WindowEventChannelStub::HandleTransferAccessibilityChildTreeRegister(Mes
}
int32_t WindowEventChannelStub::HandleTransferAccessibilityChildTreeUnregister(
MessageParcel &data, MessageParcel &reply)
MessageParcel& data, MessageParcel& reply)
{
WSError errCode = TransferAccessibilityChildTreeUnregister();
reply.WriteInt32(static_cast<int32_t>(errCode));
return ERR_NONE;
}
int32_t WindowEventChannelStub::HandleTransferAccessibilityDumpChildInfo(MessageParcel &data, MessageParcel &reply)
int32_t WindowEventChannelStub::HandleTransferAccessibilityDumpChildInfo(MessageParcel& data, MessageParcel& reply)
{
std::vector<std::string> params;
if (!data.ReadStringVector(&params)) {

View File

@ -276,7 +276,7 @@ public:
void NotifyWindowVisibility();
WSError UpdateAvoidArea(const sptr<AvoidArea>& avoidArea, AvoidAreaType type) override;
WSError OnShowWhenLocked(bool showWhenLocked);
void SaveUpdatedIcon(const std::shared_ptr<Media::PixelMap> &icon);
void SaveUpdatedIcon(const std::shared_ptr<Media::PixelMap>& icon);
void NotifyTouchOutside();
bool CheckOutTouchOutsideRegister();
void UpdateNativeVisibility(bool visible);
@ -284,7 +284,7 @@ public:
void DumpSessionElementInfo(const std::vector<std::string>& params);
void NotifyForceHideChange(bool hide);
WSError BindDialogSessionTarget(const sptr<SceneSession>& sceneSession);
void DumpSessionInfo(std::vector<std::string> &info) const;
void DumpSessionInfo(std::vector<std::string>& info) const;
bool AddSubSession(const sptr<SceneSession>& subSession);
bool RemoveSubSession(int32_t persistentId);
bool AddToastSession(const sptr<SceneSession>& toastSession);
@ -438,7 +438,7 @@ private:
bool SaveAspectRatio(float ratio);
void NotifyPropertyWhenConnect();
WSError RaiseAppMainWindowToTop() override;
void SetSurfaceBounds(const WSRect &rect);
void SetSurfaceBounds(const WSRect& rect);
void UpdateWinRectForSystemBar(WSRect& rect);
bool UpdateInputMethodSessionRect(const WSRect& rect, WSRect& newWinRect, WSRect& newRequestRect);
bool IsMovableWindowType();

View File

@ -63,8 +63,8 @@ using NotifyTerminateSessionFunc = std::function<void(const SessionInfo& info)>;
using NotifyTerminateSessionFuncNew =
std::function<void(const SessionInfo& info, bool needStartCaller, bool isFromBroker)>;
using NotifyTerminateSessionFuncTotal = std::function<void(const SessionInfo& info, TerminateType terminateType)>;
using NofitySessionLabelUpdatedFunc = std::function<void(const std::string &label)>;
using NofitySessionIconUpdatedFunc = std::function<void(const std::string &iconPath)>;
using NofitySessionLabelUpdatedFunc = std::function<void(const std::string& label)>;
using NofitySessionIconUpdatedFunc = std::function<void(const std::string& iconPath)>;
using NotifySessionExceptionFunc = std::function<void(const SessionInfo& info, bool needRemoveSession)>;
using NotifySessionSnapshotFunc = std::function<void(const int32_t& persistentId)>;
using NotifyPendingSessionToForegroundFunc = std::function<void(const SessionInfo& info)>;
@ -235,9 +235,9 @@ public:
WSError TerminateSessionTotal(const sptr<AAFwk::SessionInfo> info, TerminateType terminateType);
void SetTerminateSessionListenerTotal(const NotifyTerminateSessionFuncTotal& func);
WSError Clear(bool needStartCaller = false);
WSError SetSessionLabel(const std::string &label);
WSError SetSessionLabel(const std::string& label);
void SetUpdateSessionLabelListener(const NofitySessionLabelUpdatedFunc& func);
WSError SetSessionIcon(const std::shared_ptr<Media::PixelMap> &icon);
WSError SetSessionIcon(const std::shared_ptr<Media::PixelMap>& icon);
void SetUpdateSessionIconListener(const NofitySessionIconUpdatedFunc& func);
void SetSessionStateChangeListenser(const NotifySessionStateChangeFunc& func);
void SetBufferAvailableChangeListener(const NotifyBufferAvailableChangeFunc& func);
@ -360,8 +360,8 @@ public:
void SetRaiseToAppTopForPointDownFunc(const NotifyRaiseToTopForPointDownFunc& func);
void NotifyScreenshot();
void RemoveLifeCycleTask(const LifeCycleTaskType &taskType);
void PostLifeCycleTask(Task &&task, const std::string &name, const LifeCycleTaskType &taskType);
void RemoveLifeCycleTask(const LifeCycleTaskType& taskType);
void PostLifeCycleTask(Task &&task, const std::string& name, const LifeCycleTaskType& taskType);
WSError UpdateMaximizeMode(bool isMaximize);
void NotifySessionForeground(uint32_t reason, bool withAnimation);
void NotifySessionBackground(uint32_t reason, bool withAnimation, bool isFromInnerkits);
@ -443,7 +443,7 @@ public:
protected:
class SessionLifeCycleTask : public virtual RefBase {
public:
SessionLifeCycleTask(const Task &task, const std::string &name, const LifeCycleTaskType &type)
SessionLifeCycleTask(const Task& task, const std::string& name, const LifeCycleTaskType& type)
: task(task), name(name), type(type) {}
Task task;
const std::string name;

View File

@ -56,8 +56,8 @@ inline void CalcFloatWindowRectLimits(const WindowLimits& limits, uint32_t maxFl
maxHeight = std::min(maxHeight, static_cast<int32_t>(maxFloatingWindowSize * vpr));
}
inline std::string ConvertSessionName(const std::string &bundleName, const std::string &name,
const std::string &moduleName, const int32_t appIndex = 0)
inline std::string ConvertSessionName(const std::string& bundleName, const std::string& name,
const std::string& moduleName, const int32_t appIndex = 0)
{
std::string strName;
if (appIndex == 0) {

View File

@ -30,7 +30,7 @@ public:
SessionStub() = default;
virtual ~SessionStub() = default;
int OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override;
int OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option) override;
private:
int HandleConnect(MessageParcel& data, MessageParcel& reply);
@ -56,9 +56,9 @@ private:
int HandleSetWindowAnimationFlag(MessageParcel& data, MessageParcel& reply);
int HandleUpdateWindowSceneAfterCustomAnimation(MessageParcel& data, MessageParcel& reply);
int HandleRaiseAboveTarget(MessageParcel& data, MessageParcel& reply);
int HandleRaiseAppMainWindowToTop(MessageParcel &data, MessageParcel &reply);
int HandleChangeSessionVisibilityWithStatusBar(MessageParcel &data, MessageParcel &reply);
int HandlePendingSessionActivation(MessageParcel &data, MessageParcel &reply);
int HandleRaiseAppMainWindowToTop(MessageParcel& data, MessageParcel& reply);
int HandleChangeSessionVisibilityWithStatusBar(MessageParcel& data, MessageParcel& reply);
int HandlePendingSessionActivation(MessageParcel& data, MessageParcel& reply);
int HandleTerminateSession(MessageParcel& data, MessageParcel& reply);
int HandleSessionException(MessageParcel& data, MessageParcel& reply);
int HandleProcessPointDownSession(MessageParcel& data, MessageParcel& reply);

View File

@ -151,7 +151,7 @@ bool ScenePersistence::IsSavingSnapshot()
return isSavingSnapshot_.load();
}
void ScenePersistence::RenameSnapshotFromOldPersistentId(const int32_t &oldPersistentId)
void ScenePersistence::RenameSnapshotFromOldPersistentId(const int32_t& oldPersistentId)
{
auto task = [weakThis = wptr(this), oldPersistentId]() {
auto scenePersistence = weakThis.promote();

View File

@ -493,7 +493,7 @@ WSError SceneSession::SetGlobalMaximizeMode(MaximizeMode mode)
return PostSyncTask(task, "SetGlobalMaximizeMode");
}
WSError SceneSession::GetGlobalMaximizeMode(MaximizeMode &mode)
WSError SceneSession::GetGlobalMaximizeMode(MaximizeMode& mode)
{
auto task = [weakThis = wptr(this), &mode]() {
auto session = weakThis.promote();
@ -2184,7 +2184,7 @@ std::string SceneSession::GetSessionSnapshotFilePath() const
return "";
}
void SceneSession::SaveUpdatedIcon(const std::shared_ptr<Media::PixelMap> &icon)
void SceneSession::SaveUpdatedIcon(const std::shared_ptr<Media::PixelMap>& icon)
{
WLOGFI("run SaveUpdatedIcon");
if (scenePersistence_ != nullptr) {
@ -2564,7 +2564,7 @@ void SceneSession::SetClientIdentityToken(const std::string& clientIdentityToken
clientIdentityToken_ = clientIdentityToken;
}
void SceneSession::DumpSessionInfo(std::vector<std::string> &info) const
void SceneSession::DumpSessionInfo(std::vector<std::string>& info) const
{
std::string dumpInfo = " Session ID #" + std::to_string(persistentId_);
info.push_back(dumpInfo);

View File

@ -1250,7 +1250,7 @@ void Session::SetTerminateSessionListener(const NotifyTerminateSessionFunc& func
terminateSessionFunc_ = func;
}
void Session::RemoveLifeCycleTask(const LifeCycleTaskType &taskType)
void Session::RemoveLifeCycleTask(const LifeCycleTaskType& taskType)
{
std::lock_guard<std::mutex> lock(lifeCycleTaskQueueMutex_);
if (lifeCycleTaskQueue_.empty()) {
@ -1383,7 +1383,7 @@ void Session::SetTerminateSessionListenerTotal(const NotifyTerminateSessionFuncT
terminateSessionFuncTotal_ = func;
}
WSError Session::SetSessionLabel(const std::string &label)
WSError Session::SetSessionLabel(const std::string& label)
{
WLOGFI("run Session::SetSessionLabel");
if (updateSessionLabelFunc_) {
@ -1392,12 +1392,12 @@ WSError Session::SetSessionLabel(const std::string &label)
return WSError::WS_OK;
}
void Session::SetUpdateSessionLabelListener(const NofitySessionLabelUpdatedFunc &func)
void Session::SetUpdateSessionLabelListener(const NofitySessionLabelUpdatedFunc& func)
{
updateSessionLabelFunc_ = func;
}
WSError Session::SetSessionIcon(const std::shared_ptr<Media::PixelMap> &icon)
WSError Session::SetSessionIcon(const std::shared_ptr<Media::PixelMap>& icon)
{
WLOGFD("run Session::SetSessionIcon, id: %{public}d", GetPersistentId());
if (scenePersistence_ == nullptr) {
@ -1412,7 +1412,7 @@ WSError Session::SetSessionIcon(const std::shared_ptr<Media::PixelMap> &icon)
return WSError::WS_OK;
}
void Session::SetUpdateSessionIconListener(const NofitySessionIconUpdatedFunc &func)
void Session::SetUpdateSessionIconListener(const NofitySessionIconUpdatedFunc& func)
{
updateSessionIconFunc_ = func;
}

View File

@ -36,7 +36,7 @@ namespace {
constexpr HiviewDFX::HiLogLabel LABEL = { LOG_CORE, HILOG_DOMAIN_WINDOW, "SessionStub" };
} // namespace
int SessionStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option)
int SessionStub::OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option)
{
WLOGFD("Scene session on remote request!, code: %{public}u", code);
if (data.ReadInterfaceToken() != GetDescriptor()) {
@ -497,7 +497,7 @@ int SessionStub::HandleMarkProcessed(MessageParcel& data, MessageParcel& reply)
return ERR_NONE;
}
int SessionStub::HandleSetGlobalMaximizeMode(MessageParcel &data, MessageParcel &reply)
int SessionStub::HandleSetGlobalMaximizeMode(MessageParcel& data, MessageParcel& reply)
{
WLOGFD("HandleSetGlobalMaximizeMode!");
auto mode = data.ReadUint32();
@ -506,7 +506,7 @@ int SessionStub::HandleSetGlobalMaximizeMode(MessageParcel &data, MessageParcel
return ERR_NONE;
}
int SessionStub::HandleGetGlobalMaximizeMode(MessageParcel &data, MessageParcel &reply)
int SessionStub::HandleGetGlobalMaximizeMode(MessageParcel& data, MessageParcel& reply)
{
WLOGFD("HandleGetGlobalMaximizeMode!");
MaximizeMode mode = MaximizeMode::MODE_FULL_FILL;
@ -704,7 +704,7 @@ int SessionStub::HandleUpdateRectChangeListenerRegistered(MessageParcel& data, M
return ERR_NONE;
}
int SessionStub::HandleSetKeyboardSessionGravity(MessageParcel &data, MessageParcel &reply)
int SessionStub::HandleSetKeyboardSessionGravity(MessageParcel& data, MessageParcel& reply)
{
TLOGD(WmsLogTag::WMS_KEYBOARD, "run HandleSetKeyboardSessionGravity!");
SessionGravity gravity = static_cast<SessionGravity>(data.ReadUint32());

View File

@ -33,7 +33,7 @@ public:
std::vector<AAFwk::MissionInfo>& missionInfos);
int32_t GetRemoteMissionSnapshotInfo(const std::string& deviceId, int32_t missionId,
AAFwk::MissionSnapshot& missionSnapshot);
int32_t SetMissionContinueState(int32_t missionId, const AAFwk::ContinueState &state);
int32_t SetMissionContinueState(int32_t missionId, const AAFwk::ContinueState& state);
void ClearDmsProxy();
enum {
START_REMOTE_ABILITY = 1,

View File

@ -30,16 +30,16 @@
namespace OHOS::Rosen {
class SceneEventPublish : public EventFwk::CommonEventSubscriber {
public:
explicit SceneEventPublish(const EventFwk::CommonEventSubscribeInfo &subscribeInfo)
explicit SceneEventPublish(const EventFwk::CommonEventSubscribeInfo& subscribeInfo)
: CommonEventSubscriber(subscribeInfo)
{}
~SceneEventPublish() = default;
void OnReceiveEvent(const EventFwk::CommonEventData &data);
void OnReceiveEvent(const EventFwk::CommonEventData& data);
WSError Publish(std::string cmd);
std::string GetDebugDumpInfo(std::chrono::milliseconds const &time);
std::string GetDebugDumpInfo(std::chrono::milliseconds const& time);
static void Subscribe(std::shared_ptr<SceneEventPublish>& scbSubscriber);

View File

@ -100,8 +100,8 @@ using RootSceneProcessBackEventFunc = std::function<void()>;
class AppAnrListener : public IRemoteStub<AppExecFwk::IAppDebugListener> {
public:
void OnAppDebugStarted(const std::vector<AppExecFwk::AppDebugInfo> &debugInfos) override;
void OnAppDebugStoped(const std::vector<AppExecFwk::AppDebugInfo> &debugInfos) override;
void OnAppDebugStarted(const std::vector<AppExecFwk::AppDebugInfo>& debugInfos) override;
void OnAppDebugStoped(const std::vector<AppExecFwk::AppDebugInfo>& debugInfos) override;
};
class DisplayChangeListener : public IDisplayChangeListener {
@ -133,7 +133,7 @@ public:
const bool isToDesktop = false, const bool isSaveSnapshot = true);
WSError RequestSceneSessionDestruction(const sptr<SceneSession>& sceneSession, bool needRemoveSession = true,
bool isSaveSnapshot = true, const bool isForceClean = false);
WSError RequestSceneSessionDestructionInner(sptr<SceneSession> &scnSession, sptr<AAFwk::SessionInfo> scnSessionInfo,
WSError RequestSceneSessionDestructionInner(sptr<SceneSession>& scnSession, sptr<AAFwk::SessionInfo> scnSessionInfo,
const bool needRemoveSession, const bool isForceClean = false);
void NotifyForegroundInteractiveStatus(const sptr<SceneSession>& sceneSession, bool interactive);
WSError RequestSceneSessionByCall(const sptr<SceneSession>& sceneSession);
@ -205,22 +205,22 @@ public:
void SetScreenLocked(const bool isScreenLocked);
bool IsScreenLocked() const;
WSError InitUserInfo(int32_t userId, std::string &fileDir);
WSError InitUserInfo(int32_t userId, std::string& fileDir);
void NotifySwitchingUser(const bool isUserActive);
int32_t GetCurrentUserId() const;
void StartWindowInfoReportLoop();
void GetFocusWindowInfo(FocusChangeInfo& focusInfo) override;
void NotifyCompleteFirstFrameDrawing(int32_t persistentId);
void NotifySessionMovedToFront(int32_t persistentId);
WSError SetSessionLabel(const sptr<IRemoteObject> &token, const std::string &label) override;
WSError SetSessionIcon(const sptr<IRemoteObject> &token, const std::shared_ptr<Media::PixelMap> &icon) override;
WSError IsValidSessionIds(const std::vector<int32_t> &sessionIds, std::vector<bool> &results) override;
WSError SetSessionLabel(const sptr<IRemoteObject>& token, const std::string& label) override;
WSError SetSessionIcon(const sptr<IRemoteObject>& token, const std::shared_ptr<Media::PixelMap>& icon) override;
WSError IsValidSessionIds(const std::vector<int32_t>& sessionIds, std::vector<bool>& results) override;
void HandleTurnScreenOn(const sptr<SceneSession>& sceneSession);
void HandleKeepScreenOn(const sptr<SceneSession>& sceneSession, bool requireLock);
void InitWithRenderServiceAdded();
WSError PendingSessionToForeground(const sptr<IRemoteObject> &token) override;
WSError PendingSessionToBackgroundForDelegator(const sptr<IRemoteObject> &token) override;
WSError GetFocusSessionToken(sptr<IRemoteObject> &token) override;
WSError PendingSessionToForeground(const sptr<IRemoteObject>& token) override;
WSError PendingSessionToBackgroundForDelegator(const sptr<IRemoteObject>& token) override;
WSError GetFocusSessionToken(sptr<IRemoteObject>& token) override;
WSError GetFocusSessionElement(AppExecFwk::ElementName& element) override;
WSError RegisterSessionListener(const sptr<ISessionListener>& listener) override;
WSError UnRegisterSessionListener(const sptr<ISessionListener>& listener) override;
@ -229,10 +229,10 @@ public:
WSError GetSessionInfo(const std::string& deviceId, int32_t persistentId, SessionInfoBean& sessionInfo) override;
WSError GetSessionInfoByContinueSessionId(const std::string& continueSessionId,
SessionInfoBean& sessionInfo) override;
WSError DumpSessionAll(std::vector<std::string> &infos) override;
WSError DumpSessionWithId(int32_t persistentId, std::vector<std::string> &infos) override;
WSError GetAllAbilityInfos(const AAFwk::Want &want, int32_t userId,
std::vector<SCBAbilityInfo> &scbAbilityInfos);
WSError DumpSessionAll(std::vector<std::string>& infos) override;
WSError DumpSessionWithId(int32_t persistentId, std::vector<std::string>& infos) override;
WSError GetAllAbilityInfos(const AAFwk::Want& want, int32_t userId,
std::vector<SCBAbilityInfo>& scbAbilityInfos);
WSError PrepareTerminate(int32_t persistentId, bool& isPrepareTerminate);
WSError GetIsLayoutFullScreen(bool& isLayoutFullScreen);
@ -245,7 +245,7 @@ public:
WMError GetSessionSnapshotById(int32_t persistentId, SessionSnapshot& snapshot) override;
WSError SetVmaCacheStatus(bool flag);
WSError GetUIContentRemoteObj(int32_t persistentId, sptr<IRemoteObject>& uiContentRemoteObj) override;
WSError SetSessionContinueState(const sptr<IRemoteObject> &token, const ContinueState& continueState) override;
WSError SetSessionContinueState(const sptr<IRemoteObject>& token, const ContinueState& continueState) override;
WSError ClearSession(int32_t persistentId) override;
WSError ClearAllSessions() override;
WSError LockSession(int32_t sessionId) override;
@ -278,7 +278,7 @@ public:
void RegisterWindowChanged(const WindowChangedFunc& func);
WSError RegisterIAbilityManagerCollaborator(int32_t type,
const sptr<AAFwk::IAbilityManagerCollaborator> &impl) override;
const sptr<AAFwk::IAbilityManagerCollaborator>& impl) override;
WSError UnregisterIAbilityManagerCollaborator(int32_t type) override;
bool IsInputEventEnabled();
@ -287,7 +287,7 @@ public:
void SetAlivePersistentIds(const std::vector<int32_t>& alivePersistentIds);
void NotifyRecoveringFinished();
WMError CheckWindowId(int32_t windowId, int32_t &pid) override;
WMError CheckWindowId(int32_t windowId, int32_t& pid) override;
void GetSceneSessionPrivacyModeBundles(DisplayId displayId, std::unordered_set<std::string>& privacyBundles);
BrokerStates CheckIfReuseSession(SessionInfo& sessionInfo);
bool CheckCollaboratorType(int32_t type);
@ -451,8 +451,8 @@ private:
WSError ShiftFocus(sptr<SceneSession>& nextSession, FocusChangeReason reason = FocusChangeReason::DEFAULT);
void UpdateFocusStatus(sptr<SceneSession>& sceneSession, bool isFocused);
void NotifyFocusStatus(sptr<SceneSession>& sceneSession, bool isFocused);
int32_t NotifyRssThawApp(const int32_t uid, const std::string &bundleName,
const std::string &reason);
int32_t NotifyRssThawApp(const int32_t uid, const std::string& bundleName,
const std::string& reason);
void NotifyFocusStatusByMission(sptr<SceneSession>& prevSession, sptr<SceneSession>& currSession);
void NotifyUnFocusedByMission(sptr<SceneSession>& sceneSession);
bool MissionChanged(sptr<SceneSession>& prevSession, sptr<SceneSession>& currSession);
@ -467,7 +467,7 @@ private:
WSError UpdateParentSessionForDialog(const sptr<SceneSession>& sceneSession, sptr<WindowSessionProperty> property);
void UpdateCameraFloatWindowStatus(uint32_t accessTokenId, bool isShowing);
void UpdateFocusableProperty(int32_t persistentId);
WMError UpdateTopmostProperty(const sptr<WindowSessionProperty> &property, const sptr<SceneSession> &sceneSession);
WMError UpdateTopmostProperty(const sptr<WindowSessionProperty>& property, const sptr<SceneSession>& sceneSession);
std::vector<sptr<SceneSession>> GetSceneSessionVectorByType(WindowType type, uint64_t displayId);
bool UpdateSessionAvoidAreaIfNeed(const int32_t& persistentId,
const sptr<SceneSession>& sceneSession, const AvoidArea& avoidArea, AvoidAreaType avoidAreaType);
@ -487,7 +487,7 @@ private:
bool GetLocalDeviceId(std::string& localDeviceId);
std::string AnonymizeDeviceId(const std::string& deviceId);
int GetRemoteSessionInfos(const std::string& deviceId, int32_t numMax,
std::vector<SessionInfoBean> &sessionInfos);
std::vector<SessionInfoBean>& sessionInfos);
int GetRemoteSessionInfo(const std::string& deviceId, int32_t persistentId, SessionInfoBean& sessionInfo);
WSError GetTotalUITreeInfo(const std::string& strId, std::string& dumpInfo);
@ -530,8 +530,8 @@ private:
bool GetExtensionWindowIds(const sptr<IRemoteObject>& token, int32_t& persistentId, int32_t& parentId);
void DestroyExtensionSession(const sptr<IRemoteObject>& remoteExtSession);
void EraseSceneSessionMapById(int32_t persistentId);
WSError GetAbilityInfosFromBundleInfo(std::vector<AppExecFwk::BundleInfo> &bundleInfos,
std::vector<SCBAbilityInfo> &scbAbilityInfos);
WSError GetAbilityInfosFromBundleInfo(std::vector<AppExecFwk::BundleInfo>& bundleInfos,
std::vector<SCBAbilityInfo>& scbAbilityInfos);
void GetOrientationFromResourceManager(AppExecFwk::AbilityInfo& abilityInfo);
void UpdatePrivateStateAndNotifyForAllScreens();
@ -655,7 +655,7 @@ private:
void ProcessSubSessionBackground(sptr<SceneSession>& sceneSession);
WSError ProcessDialogRequestFocusImmdediately(sptr<SceneSession>& sceneSession);
WSError ProcessModalTopmostRequestFocusImmdediately(sptr<SceneSession>& sceneSession);
sptr<SceneSession> FindSessionByToken(const sptr<IRemoteObject> &token);
sptr<SceneSession> FindSessionByToken(const sptr<IRemoteObject>& token);
void CheckAndNotifyWaterMarkChangedResult();
WSError NotifyWaterMarkFlagChangedResult(bool hasWaterMark);

View File

@ -58,7 +58,7 @@ public:
const sptr<IWindowManagerAgent>& windowManagerAgent) override;
WMError UnregisterWindowManagerAgent(WindowManagerAgentType type,
const sptr<IWindowManagerAgent>& windowManagerAgent) override;
WMError CheckWindowId(int32_t windowId, int32_t &pid) override;
WMError CheckWindowId(int32_t windowId, int32_t& pid) override;
WMError GetVisibilityWindowInfo(std::vector<sptr<WindowVisibilityInfo>>& infos) override;
WSError UpdateWindowMode(int32_t persistentId, int32_t windowMode);
WMError GetWindowModeType(WindowModeType& windowModeType) override;

View File

@ -63,7 +63,7 @@ private:
WMError InitMockSMSProxy();
void InitSceneSessionManagerProxy();
void OnWMSConnectionChangedCallback(int32_t userId, int32_t screenId, bool isConnected, bool isCallbackRegistered);
void OnUserSwitch(const sptr<ISessionManagerService> &sessionManagerService);
void OnUserSwitch(const sptr<ISessionManagerService>& sessionManagerService);
void RegisterSMSRecoverListener();
UserSwitchCallbackFunc userSwitchCallbackFunc_ = nullptr;

View File

@ -68,7 +68,7 @@ private:
void InitSessionManagerServiceProxy();
void InitSceneSessionManagerLiteProxy();
void InitScreenSessionManagerLiteProxy();
void OnUserSwitch(const sptr<ISessionManagerService> &sessionManagerService);
void OnUserSwitch(const sptr<ISessionManagerService>& sessionManagerService);
void DeleteAllSessionListeners();
void ReregisterSessionListener() const;
void RegisterSMSRecoverListener();

View File

@ -113,12 +113,12 @@ public:
TRANS_ID_GET_PROCESS_SURFACENODEID_BY_PERSISTENTID,
};
virtual WSError SetSessionLabel(const sptr<IRemoteObject> &token, const std::string &label) = 0;
virtual WSError SetSessionIcon(const sptr<IRemoteObject> &token, const std::shared_ptr<Media::PixelMap> &icon) = 0;
virtual WSError IsValidSessionIds(const std::vector<int32_t> &sessionIds, std::vector<bool> &results) = 0;
virtual WSError PendingSessionToForeground(const sptr<IRemoteObject> &token) = 0;
virtual WSError PendingSessionToBackgroundForDelegator(const sptr<IRemoteObject> &token) = 0;
virtual WSError GetFocusSessionToken(sptr<IRemoteObject> &token) = 0;
virtual WSError SetSessionLabel(const sptr<IRemoteObject>& token, const std::string& label) = 0;
virtual WSError SetSessionIcon(const sptr<IRemoteObject>& token, const std::shared_ptr<Media::PixelMap>& icon) = 0;
virtual WSError IsValidSessionIds(const std::vector<int32_t>& sessionIds, std::vector<bool>& results) = 0;
virtual WSError PendingSessionToForeground(const sptr<IRemoteObject>& token) = 0;
virtual WSError PendingSessionToBackgroundForDelegator(const sptr<IRemoteObject>& token) = 0;
virtual WSError GetFocusSessionToken(sptr<IRemoteObject>& token) = 0;
virtual WSError GetFocusSessionElement(AppExecFwk::ElementName& element) = 0;
virtual WSError RegisterSessionListener(const sptr<ISessionListener>& listener) = 0;
@ -128,12 +128,12 @@ public:
virtual WSError GetSessionInfo(const std::string& deviceId, int32_t persistentId, SessionInfoBean& sessionInfo) = 0;
virtual WSError GetSessionInfoByContinueSessionId(const std::string& continueSessionId,
SessionInfoBean& sessionInfo) = 0;
virtual WSError DumpSessionAll(std::vector<std::string> &infos) override { return WSError::WS_OK; }
virtual WSError DumpSessionWithId(int32_t persistentId, std::vector<std::string> &infos) override
virtual WSError DumpSessionAll(std::vector<std::string>& infos) override { return WSError::WS_OK; }
virtual WSError DumpSessionWithId(int32_t persistentId, std::vector<std::string>& infos) override
{
return WSError::WS_OK;
}
virtual WSError SetSessionContinueState(const sptr<IRemoteObject> &token, const ContinueState& continueState) = 0;
virtual WSError SetSessionContinueState(const sptr<IRemoteObject>& token, const ContinueState& continueState) = 0;
virtual WSError TerminateSessionNew(
const sptr<AAFwk::SessionInfo> info, bool needStartCaller, bool isFromBroker = false) = 0;
@ -157,7 +157,7 @@ public:
}
virtual WSError RegisterIAbilityManagerCollaborator(int32_t type,
const sptr<AAFwk::IAbilityManagerCollaborator> &impl) = 0;
const sptr<AAFwk::IAbilityManagerCollaborator>& impl) = 0;
virtual WSError UnregisterIAbilityManagerCollaborator(int32_t type) = 0;
// interfaces of IWindowManager
WMError CreateWindow(sptr<IWindow>& window, sptr<WindowProperty>& property,

View File

@ -58,7 +58,7 @@ public:
const sptr<IWindowManagerAgent>& windowManagerAgent) override;
WMError UnregisterWindowManagerAgent(WindowManagerAgentType type,
const sptr<IWindowManagerAgent>& windowManagerAgent) override;
WMError CheckWindowId(int32_t windowId, int32_t &pid) override;
WMError CheckWindowId(int32_t windowId, int32_t& pid) override;
WMError GetVisibilityWindowInfo(std::vector<sptr<WindowVisibilityInfo>>& infos) override;
WMError GetWindowModeType(WindowModeType& windowModeType) override;
WMError GetMainWindowInfos(int32_t topNum, std::vector<MainWindowInfo>& topNInfo) override;

View File

@ -55,9 +55,9 @@ private:
int HandleMoveSessionsToBackground(MessageParcel& data, MessageParcel& reply);
//for window manager service
int HandleGetFocusSessionInfo(MessageParcel& data, MessageParcel& reply);
int HandleRegisterWindowManagerAgent(MessageParcel &data, MessageParcel &reply);
int HandleUnregisterWindowManagerAgent(MessageParcel &data, MessageParcel &reply);
int HandleCheckWindowId(MessageParcel &data, MessageParcel &reply);
int HandleRegisterWindowManagerAgent(MessageParcel& data, MessageParcel& reply);
int HandleUnregisterWindowManagerAgent(MessageParcel& data, MessageParcel& reply);
int HandleCheckWindowId(MessageParcel& data, MessageParcel& reply);
int HandleGetVisibilityWindowInfo(MessageParcel& data, MessageParcel& reply);
int HandleGetWindowModeType(MessageParcel& data, MessageParcel& reply);
int HandleGetMainWinodowInfo(MessageParcel& data, MessageParcel& reply);

View File

@ -52,18 +52,18 @@ public:
const sptr<IWindowManagerAgent>& windowManagerAgent) override;
WMError SetGestureNavigaionEnabled(bool enable) override;
void GetFocusWindowInfo(FocusChangeInfo& focusInfo) override;
WSError SetSessionLabel(const sptr<IRemoteObject> &token, const std::string &label) override;
WSError SetSessionIcon(const sptr<IRemoteObject> &token, const std::shared_ptr<Media::PixelMap> &icon) override;
WSError IsValidSessionIds(const std::vector<int32_t> &sessionIds, std::vector<bool> &results) override;
WSError SetSessionLabel(const sptr<IRemoteObject>& token, const std::string& label) override;
WSError SetSessionIcon(const sptr<IRemoteObject>& token, const std::shared_ptr<Media::PixelMap>& icon) override;
WSError IsValidSessionIds(const std::vector<int32_t>& sessionIds, std::vector<bool>& results) override;
WMError GetAccessibilityWindowInfo(std::vector<sptr<AccessibilityWindowInfo>>& infos) override;
WMError GetUnreliableWindowInfo(int32_t windowId, std::vector<sptr<UnreliableWindowInfo>>& infos) override;
WSError PendingSessionToForeground(const sptr<IRemoteObject> &token) override;
WSError PendingSessionToBackgroundForDelegator(const sptr<IRemoteObject> &token) override;
WSError PendingSessionToForeground(const sptr<IRemoteObject>& token) override;
WSError PendingSessionToBackgroundForDelegator(const sptr<IRemoteObject>& token) override;
WMError GetSessionSnapshotById(int32_t persistentId, SessionSnapshot& snapshot) override;
WMError GetSnapshotByWindowId(int32_t persistentId, std::shared_ptr<Media::PixelMap>& pixelMap) override;
WSError GetFocusSessionToken(sptr<IRemoteObject> &token) override;
WSError GetFocusSessionToken(sptr<IRemoteObject>& token) override;
WSError GetFocusSessionElement(AppExecFwk::ElementName& element) override;
WMError CheckWindowId(int32_t windowId, int32_t &pid) override;
WMError CheckWindowId(int32_t windowId, int32_t& pid) override;
WSError RegisterSessionListener(const sptr<ISessionListener>& listener) override;
WSError UnRegisterSessionListener(const sptr<ISessionListener>& listener) override;
@ -73,9 +73,9 @@ public:
WSError GetSessionInfoByContinueSessionId(const std::string& continueSessionId,
SessionInfoBean& sessionInfo) override;
WSError DumpSessionAll(std::vector<std::string> &infos) override;
WSError DumpSessionWithId(int32_t persistentId, std::vector<std::string> &infos) override;
WSError SetSessionContinueState(const sptr<IRemoteObject> &token, const ContinueState& continueState) override;
WSError DumpSessionAll(std::vector<std::string>& infos) override;
WSError DumpSessionWithId(int32_t persistentId, std::vector<std::string>& infos) override;
WSError SetSessionContinueState(const sptr<IRemoteObject>& token, const ContinueState& continueState) override;
WSError TerminateSessionNew(
const sptr<AAFwk::SessionInfo> info, bool needStartCaller, bool isFromBroker = false) override;
WSError GetSessionDumpInfo(const std::vector<std::string>& params, std::string& info) override;
@ -93,7 +93,7 @@ public:
WSError ClearSession(int32_t persistentId) override;
WSError ClearAllSessions() override;
WSError RegisterIAbilityManagerCollaborator(int32_t type,
const sptr<AAFwk::IAbilityManagerCollaborator> &impl) override;
const sptr<AAFwk::IAbilityManagerCollaborator>& impl) override;
WSError UnregisterIAbilityManagerCollaborator(int32_t type) override;
WSError NotifyWindowExtensionVisibilityChange(int32_t pid, int32_t uid, bool visible) override;
WMError GetTopWindowId(uint32_t mainWinId, uint32_t& topWinId) override;

View File

@ -29,29 +29,29 @@ public:
SceneSessionManagerStub() = default;
virtual ~SceneSessionManagerStub() = default;
int OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override;
int OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option) override;
private:
int HandleGetAccessibilityWindowInfo(MessageParcel &data, MessageParcel &reply);
int HandleGetAccessibilityWindowInfo(MessageParcel& data, MessageParcel& reply);
int HandleGetUnreliableWindowInfo(MessageParcel& data, MessageParcel& reply);
int HandleRequestFocusStatus(MessageParcel &data, MessageParcel &reply);
int HandleCreateAndConnectSpecificSession(MessageParcel &data, MessageParcel &reply);
int HandleRecoverAndConnectSpecificSession(MessageParcel &data, MessageParcel &reply);
int HandleRecoverAndReconnectSceneSession(MessageParcel &data, MessageParcel &reply);
int HandleDestroyAndDisconnectSpcificSession(MessageParcel &data, MessageParcel &reply);
int HandleRequestFocusStatus(MessageParcel& data, MessageParcel& reply);
int HandleCreateAndConnectSpecificSession(MessageParcel& data, MessageParcel& reply);
int HandleRecoverAndConnectSpecificSession(MessageParcel& data, MessageParcel& reply);
int HandleRecoverAndReconnectSceneSession(MessageParcel& data, MessageParcel& reply);
int HandleDestroyAndDisconnectSpcificSession(MessageParcel& data, MessageParcel& reply);
int HandleDestroyAndDisconnectSpcificSessionWithDetachCallback(MessageParcel& data, MessageParcel& reply);
int HandleRegisterWindowManagerAgent(MessageParcel &data, MessageParcel &reply);
int HandleUnregisterWindowManagerAgent(MessageParcel &data, MessageParcel &reply);
int HandleGetFocusSessionInfo(MessageParcel &data, MessageParcel &reply);
int HandleSetSessionLabel(MessageParcel &data, MessageParcel &reply);
int HandleSetSessionIcon(MessageParcel &data, MessageParcel &reply);
int HandleIsValidSessionIds(MessageParcel &data, MessageParcel &reply);
int HandlePendingSessionToForeground(MessageParcel &data, MessageParcel &reply);
int HandlePendingSessionToBackgroundForDelegator(MessageParcel &data, MessageParcel &reply);
int HandleGetFocusSessionToken(MessageParcel &data, MessageParcel &reply);
int HandleRegisterWindowManagerAgent(MessageParcel& data, MessageParcel& reply);
int HandleUnregisterWindowManagerAgent(MessageParcel& data, MessageParcel& reply);
int HandleGetFocusSessionInfo(MessageParcel& data, MessageParcel& reply);
int HandleSetSessionLabel(MessageParcel& data, MessageParcel& reply);
int HandleSetSessionIcon(MessageParcel& data, MessageParcel& reply);
int HandleIsValidSessionIds(MessageParcel& data, MessageParcel& reply);
int HandlePendingSessionToForeground(MessageParcel& data, MessageParcel& reply);
int HandlePendingSessionToBackgroundForDelegator(MessageParcel& data, MessageParcel& reply);
int HandleGetFocusSessionToken(MessageParcel& data, MessageParcel& reply);
int HandleGetFocusSessionElement(MessageParcel& data, MessageParcel& reply);
int HandleSetGestureNavigationEnabled(MessageParcel &data, MessageParcel &reply);
int HandleCheckWindowId(MessageParcel &data, MessageParcel &reply);
int HandleSetGestureNavigationEnabled(MessageParcel& data, MessageParcel& reply);
int HandleCheckWindowId(MessageParcel& data, MessageParcel& reply);
int HandleRegisterSessionListener(MessageParcel& data, MessageParcel& reply);
int HandleUnRegisterSessionListener(MessageParcel& data, MessageParcel& reply);
@ -61,23 +61,23 @@ private:
int HandleDumpSessionAll(MessageParcel& data, MessageParcel& reply);
int HandleDumpSessionWithId(MessageParcel& data, MessageParcel& reply);
int HandleSetSessionContinueState(MessageParcel &data, MessageParcel &reply);
int HandleSetSessionContinueState(MessageParcel& data, MessageParcel& reply);
int HandleTerminateSessionNew(MessageParcel& data, MessageParcel& reply);
int HandleGetSessionDump(MessageParcel &data, MessageParcel &reply);
int HandleGetSessionDump(MessageParcel& data, MessageParcel& reply);
int HandleUpdateSessionAvoidAreaListener(MessageParcel& data, MessageParcel& reply);
int HandleGetSessionSnapshot(MessageParcel &data, MessageParcel &reply);
int HandleGetSessionSnapshot(MessageParcel& data, MessageParcel& reply);
int HandleGetSessionSnapshotById(MessageParcel& data, MessageParcel& reply);
int HandleGetUIContentRemoteObj(MessageParcel& data, MessageParcel& reply);
int HandleBindDialogTarget(MessageParcel &data, MessageParcel &reply);
int HandleNotifyDumpInfoResult(MessageParcel &data, MessageParcel &reply);
int HandleClearSession(MessageParcel &data, MessageParcel &reply);
int HandleClearAllSessions(MessageParcel &data, MessageParcel &reply);
int HandleLockSession(MessageParcel &data, MessageParcel &reply);
int HandleUnlockSession(MessageParcel &data, MessageParcel &reply);
int HandleMoveSessionsToForeground(MessageParcel &data, MessageParcel &reply);
int HandleMoveSessionsToBackground(MessageParcel &data, MessageParcel &reply);
int HandleRegisterCollaborator(MessageParcel &data, MessageParcel &reply);
int HandleUnregisterCollaborator(MessageParcel &data, MessageParcel &reply);
int HandleBindDialogTarget(MessageParcel& data, MessageParcel& reply);
int HandleNotifyDumpInfoResult(MessageParcel& data, MessageParcel& reply);
int HandleClearSession(MessageParcel& data, MessageParcel& reply);
int HandleClearAllSessions(MessageParcel& data, MessageParcel& reply);
int HandleLockSession(MessageParcel& data, MessageParcel& reply);
int HandleUnlockSession(MessageParcel& data, MessageParcel& reply);
int HandleMoveSessionsToForeground(MessageParcel& data, MessageParcel& reply);
int HandleMoveSessionsToBackground(MessageParcel& data, MessageParcel& reply);
int HandleRegisterCollaborator(MessageParcel& data, MessageParcel& reply);
int HandleUnregisterCollaborator(MessageParcel& data, MessageParcel& reply);
int HandleUpdateSessionTouchOutsideListener(MessageParcel& data, MessageParcel& reply);
int HandleRaiseWindowToTop(MessageParcel& data, MessageParcel& reply);
int HandleNotifyWindowExtensionVisibilityChange(MessageParcel& data, MessageParcel& reply);

View File

@ -161,7 +161,7 @@ bool DistributedClient::ReadMissionInfosFromParcel(Parcel& parcel,
return true;
}
int32_t DistributedClient::SetMissionContinueState(int32_t missionId, const AAFwk::ContinueState &state)
int32_t DistributedClient::SetMissionContinueState(int32_t missionId, const AAFwk::ContinueState& state)
{
TLOGI(WmsLogTag::DEFAULT, "Mission id: %{public}d, state: %{public}d", missionId, state);
sptr<IRemoteObject> remote = GetDmsProxy();

View File

@ -26,7 +26,7 @@ namespace OHOS::Rosen {
static const std::string TIME_OUT("timeout");
constexpr HiviewDFX::HiLogLabel LABEL = { LOG_CORE, HILOG_DOMAIN_WINDOW, "SceneSessionManager" };
void SceneEventPublish::OnReceiveEvent(const EventFwk::CommonEventData &data)
void SceneEventPublish::OnReceiveEvent(const EventFwk::CommonEventData& data)
{
std::lock_guard<std::mutex> lock(mutex_);
std::ostringstream oss;
@ -36,7 +36,7 @@ void SceneEventPublish::OnReceiveEvent(const EventFwk::CommonEventData &data)
cv_.notify_all();
}
std::string SceneEventPublish::GetDebugDumpInfo(std::chrono::milliseconds const &time)
std::string SceneEventPublish::GetDebugDumpInfo(std::chrono::milliseconds const& time)
{
std::unique_lock<std::mutex> lock(mutex_);
if (cv_.wait_for(lock, time, [&] { return valueReady_; })) {

View File

@ -150,7 +150,7 @@ bool IsEqualUiExtentionWindowInfo(const std::vector<MMI::WindowInfo>& a, const s
return true;
}
std::string DumpTransformInDisplayInfo(const std::vector<float> &transform)
std::string DumpTransformInDisplayInfo(const std::vector<float>& transform)
{
std::stringstream stream("[");
for (float transformItem : transform) {

View File

@ -131,7 +131,7 @@ std::string GetCurrentTime()
static_cast<uint64_t>(tn.tv_nsec);
return std::to_string(uTime);
}
int Comp(const std::pair<uint64_t, WindowVisibilityState> &a, const std::pair<uint64_t, WindowVisibilityState> &b)
int Comp(const std::pair<uint64_t, WindowVisibilityState>& a, const std::pair<uint64_t, WindowVisibilityState>& b)
{
return a.first < b.first;
}
@ -541,7 +541,7 @@ WSError SceneSessionManager::GetFreeMultiWindowEnableState(bool& enable)
return WSError::WS_OK;
}
WSError SceneSessionManager::SetSessionContinueState(const sptr<IRemoteObject> &token,
WSError SceneSessionManager::SetSessionContinueState(const sptr<IRemoteObject>& token,
const ContinueState& continueState)
{
TLOGI(WmsLogTag::DEFAULT, "Enter");
@ -1298,7 +1298,7 @@ sptr<KeyboardSession::KeyboardSessionCallback> SceneSessionManager::CreateKeyboa
return keyboardCb;
}
WMError SceneSessionManager::CheckWindowId(int32_t windowId, int32_t &pid)
WMError SceneSessionManager::CheckWindowId(int32_t windowId, int32_t& pid)
{
if (!SessionPermission::IsSystemCalling()) {
TLOGE(WmsLogTag::WMS_EVENT, "CheckWindowId permission denied!");
@ -2122,7 +2122,7 @@ void SceneSessionManager::HandleCastScreenDisConnection(const sptr<SceneSession>
}
}
WSError SceneSessionManager::RequestSceneSessionDestructionInner(sptr<SceneSession> &scnSession,
WSError SceneSessionManager::RequestSceneSessionDestructionInner(sptr<SceneSession>& scnSession,
sptr<AAFwk::SessionInfo> scnSessionInfo, const bool needRemoveSession, const bool isForceClean)
{
auto persistentId = scnSession->GetPersistentId();
@ -3014,7 +3014,7 @@ WSError SceneSessionManager::ProcessBackEvent()
return WSError::WS_OK;
}
WSError SceneSessionManager::InitUserInfo(int32_t userId, std::string &fileDir)
WSError SceneSessionManager::InitUserInfo(int32_t userId, std::string& fileDir)
{
if (userId == DEFAULT_USERID || fileDir.empty()) {
TLOGE(WmsLogTag::WMS_MAIN, "params invalid");
@ -4873,8 +4873,8 @@ void SceneSessionManager::NotifyFocusStatus(sptr<SceneSession>& sceneSession, bo
}
}
int32_t SceneSessionManager::NotifyRssThawApp(const int32_t uid, const std::string &bundleName,
const std::string &reason)
int32_t SceneSessionManager::NotifyRssThawApp(const int32_t uid, const std::string& bundleName,
const std::string& reason)
{
uint32_t resType = ResourceSchedule::ResType::SYNC_RES_TYPE_THAW_ONE_APP;
nlohmann::json payload;
@ -5698,7 +5698,7 @@ WSError SceneSessionManager::NotifyWaterMarkFlagChangedResult(bool hasWaterMark)
return WSError::WS_OK;
}
void SceneSessionManager::ProcessPreload(const AppExecFwk::AbilityInfo &abilityInfo) const
void SceneSessionManager::ProcessPreload(const AppExecFwk::AbilityInfo& abilityInfo) const
{
if (!bundleMgr_) {
WLOGFE("bundle manager is nullptr.");
@ -5779,7 +5779,7 @@ void SceneSessionManager::NotifySessionMovedToFront(int32_t persistentId)
}
}
WSError SceneSessionManager::SetSessionLabel(const sptr<IRemoteObject> &token, const std::string &label)
WSError SceneSessionManager::SetSessionLabel(const sptr<IRemoteObject>& token, const std::string& label)
{
WLOGFI("Enter label: %{public}s", label.c_str());
auto task = [this, &token, &label]() {
@ -5800,8 +5800,8 @@ WSError SceneSessionManager::SetSessionLabel(const sptr<IRemoteObject> &token, c
return taskScheduler_->PostSyncTask(task, "SetSessionLabel");
}
WSError SceneSessionManager::SetSessionIcon(const sptr<IRemoteObject> &token,
const std::shared_ptr<Media::PixelMap> &icon)
WSError SceneSessionManager::SetSessionIcon(const sptr<IRemoteObject>& token,
const std::shared_ptr<Media::PixelMap>& icon)
{
WLOGFI("Enter");
if (!SessionPermission::JudgeCallerIsAllowedToUseSystemAPI()) {
@ -5831,7 +5831,7 @@ WSError SceneSessionManager::SetSessionIcon(const sptr<IRemoteObject> &token,
}
WSError SceneSessionManager::IsValidSessionIds(
const std::vector<int32_t> &sessionIds, std::vector<bool> &results)
const std::vector<int32_t>& sessionIds, std::vector<bool>& results)
{
WLOGFI("Enter");
std::shared_lock<std::shared_mutex> lock(sceneSessionMapMutex_);
@ -6114,7 +6114,7 @@ std::string SceneSessionManager::AnonymizeDeviceId(const std::string& deviceId)
return anonDeviceId;
}
WSError SceneSessionManager::DumpSessionAll(std::vector<std::string> &infos)
WSError SceneSessionManager::DumpSessionAll(std::vector<std::string>& infos)
{
WLOGFI("Dump all session.");
if (!SessionPermission::IsSystemCalling()) {
@ -6138,7 +6138,7 @@ WSError SceneSessionManager::DumpSessionAll(std::vector<std::string> &infos)
return taskScheduler_->PostSyncTask(task, "DumpSessionAll");
}
WSError SceneSessionManager::DumpSessionWithId(int32_t persistentId, std::vector<std::string> &infos)
WSError SceneSessionManager::DumpSessionWithId(int32_t persistentId, std::vector<std::string>& infos)
{
WLOGFI("Dump session with id %{public}d", persistentId);
if (!SessionPermission::IsSystemCalling()) {
@ -6199,8 +6199,8 @@ __attribute__((no_sanitize("cfi"))) WSError SceneSessionManager::GetAllAbilityIn
return GetAbilityInfosFromBundleInfo(bundleInfos, scbAbilityInfos);
}
WSError SceneSessionManager::GetAbilityInfosFromBundleInfo(std::vector<AppExecFwk::BundleInfo> &bundleInfos,
std::vector<SCBAbilityInfo> &scbAbilityInfos)
WSError SceneSessionManager::GetAbilityInfosFromBundleInfo(std::vector<AppExecFwk::BundleInfo>& bundleInfos,
std::vector<SCBAbilityInfo>& scbAbilityInfos)
{
if (bundleInfos.empty()) {
WLOGFE("bundleInfos is empty");
@ -7333,7 +7333,7 @@ void SceneSessionManager::WindowDestroyNotifyVisibility(const sptr<SceneSession>
}
}
sptr<SceneSession> SceneSessionManager::FindSessionByToken(const sptr<IRemoteObject> &token)
sptr<SceneSession> SceneSessionManager::FindSessionByToken(const sptr<IRemoteObject>& token)
{
if (token == nullptr) {
TLOGW(WmsLogTag::DEFAULT, "token is nullptr");
@ -7385,7 +7385,7 @@ void SceneSessionManager::PreloadInLakeApp(const std::string& bundleName)
}
}
WSError SceneSessionManager::PendingSessionToForeground(const sptr<IRemoteObject> &token)
WSError SceneSessionManager::PendingSessionToForeground(const sptr<IRemoteObject>& token)
{
TLOGI(WmsLogTag::DEFAULT, "Enter");
auto pid = IPCSkeleton::GetCallingRealPid();
@ -7405,7 +7405,7 @@ WSError SceneSessionManager::PendingSessionToForeground(const sptr<IRemoteObject
return taskScheduler_->PostSyncTask(task, "PendingSessionToForeground");
}
WSError SceneSessionManager::PendingSessionToBackgroundForDelegator(const sptr<IRemoteObject> &token)
WSError SceneSessionManager::PendingSessionToBackgroundForDelegator(const sptr<IRemoteObject>& token)
{
auto task = [this, &token]() {
auto session = FindSessionByToken(token);
@ -8086,7 +8086,7 @@ bool SceneSessionManager::IsSessionClearable(sptr<SceneSession> scnSession)
}
WSError SceneSessionManager::RegisterIAbilityManagerCollaborator(int32_t type,
const sptr<AAFwk::IAbilityManagerCollaborator> &impl)
const sptr<AAFwk::IAbilityManagerCollaborator>& impl)
{
WLOGFI("type: %{public}d", type);
auto isSaCall = SessionPermission::IsSACalling();
@ -8485,7 +8485,7 @@ WSError SceneSessionManager::UpdateTitleInTargetPos(int32_t persistentId, bool i
return sceneSession->UpdateTitleInTargetPos(isShow, height);
}
void AppAnrListener::OnAppDebugStarted(const std::vector<AppExecFwk::AppDebugInfo> &debugInfos)
void AppAnrListener::OnAppDebugStarted(const std::vector<AppExecFwk::AppDebugInfo>& debugInfos)
{
WLOGFI("AppAnrListener OnAppDebugStarted");
if (debugInfos.empty()) {
@ -8495,7 +8495,7 @@ void AppAnrListener::OnAppDebugStarted(const std::vector<AppExecFwk::AppDebugInf
DelayedSingleton<ANRManager>::GetInstance()->SwitchAnr(false);
}
void AppAnrListener::OnAppDebugStoped(const std::vector<AppExecFwk::AppDebugInfo> &debugInfos)
void AppAnrListener::OnAppDebugStoped(const std::vector<AppExecFwk::AppDebugInfo>& debugInfos)
{
WLOGFI("AppAnrListener OnAppDebugStoped");
if (debugInfos.empty()) {
@ -9410,7 +9410,7 @@ void SceneSessionManager::CacVisibleWindowNum()
}
if (isFullScreen) {
std::for_each(visibleWindowNumInfo.begin(), visibleWindowNumInfo.end(),
[](auto &info) { info.visibleWindowNum = 1; });
[](auto& info) { info.visibleWindowNum = 1; });
}
std::unique_lock<std::shared_mutex> lock(lastInfoMutex_);
if (visibleWindowNumInfo.size() > 0 && !IsVectorSame(lastInfo_, visibleWindowNumInfo)) {

View File

@ -75,7 +75,7 @@ public:
}
void OnWMSConnectionChanged(
int32_t userId, int32_t screenId, bool isConnected, const sptr<IRemoteObject> &sessionManagerService) override
int32_t userId, int32_t screenId, bool isConnected, const sptr<IRemoteObject>& sessionManagerService) override
{
auto sms = iface_cast<ISessionManagerService>(sessionManagerService);
SessionManager::GetInstance().OnWMSConnectionChanged(userId, screenId, isConnected, sms);
@ -276,7 +276,7 @@ void SessionManager::RecoverSessionManagerService(const sptr<ISessionManagerServ
}
}
void SessionManager::OnUserSwitch(const sptr<ISessionManagerService> &sessionManagerService)
void SessionManager::OnUserSwitch(const sptr<ISessionManagerService>& sessionManagerService)
{
TLOGI(WmsLogTag::WMS_MULTI_USER, "User switched");
Clear();

View File

@ -33,7 +33,7 @@ public:
explicit SessionManagerServiceLiteRecoverListener() = default;
virtual int32_t OnRemoteRequest(
uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override
uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option) override
{
if (data.ReadInterfaceToken() != GetDescriptor()) {
TLOGE(WmsLogTag::WMS_RECOVER, "InterfaceToken check failed");
@ -246,7 +246,7 @@ void SessionManagerLite::OnWMSConnectionChanged(
OnWMSConnectionChangedCallback(userId, screenId, isConnected, isCallbackRegistered);
}
void SessionManagerLite::OnUserSwitch(const sptr<ISessionManagerService> &sessionManagerService)
void SessionManagerLite::OnUserSwitch(const sptr<ISessionManagerService>& sessionManagerService)
{
TLOGI(WmsLogTag::WMS_MULTI_USER, "User switched Lite");
{

View File

@ -25,7 +25,7 @@ constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "SceneSe
constexpr int32_t MAX_TOPN_INFO_SIZE = 200;
}
WSError SceneSessionManagerLiteProxy::SetSessionLabel(const sptr<IRemoteObject> &token, const std::string &label)
WSError SceneSessionManagerLiteProxy::SetSessionLabel(const sptr<IRemoteObject>& token, const std::string& label)
{
WLOGFD("run SceneSessionManagerLiteProxy::SetSessionLabel");
MessageParcel data;
@ -57,8 +57,8 @@ WSError SceneSessionManagerLiteProxy::SetSessionLabel(const sptr<IRemoteObject>
return static_cast<WSError>(reply.ReadInt32());
}
WSError SceneSessionManagerLiteProxy::SetSessionIcon(const sptr<IRemoteObject> &token,
const std::shared_ptr<Media::PixelMap> &icon)
WSError SceneSessionManagerLiteProxy::SetSessionIcon(const sptr<IRemoteObject>& token,
const std::shared_ptr<Media::PixelMap>& icon)
{
WLOGFD("run SceneSessionManagerLiteProxy::SetSessionIcon");
MessageParcel data;
@ -91,7 +91,7 @@ WSError SceneSessionManagerLiteProxy::SetSessionIcon(const sptr<IRemoteObject> &
}
WSError SceneSessionManagerLiteProxy::IsValidSessionIds(
const std::vector<int32_t> &sessionIds, std::vector<bool> &results)
const std::vector<int32_t>& sessionIds, std::vector<bool>& results)
{
WLOGFD("run SceneSessionManagerLiteProxy::IsValidSessionIds");
MessageParcel data;
@ -121,7 +121,7 @@ WSError SceneSessionManagerLiteProxy::IsValidSessionIds(
return static_cast<WSError>(reply.ReadInt32());
}
WSError SceneSessionManagerLiteProxy::PendingSessionToForeground(const sptr<IRemoteObject> &token)
WSError SceneSessionManagerLiteProxy::PendingSessionToForeground(const sptr<IRemoteObject>& token)
{
WLOGFD("run SceneSessionManagerLiteProxy::PendingSessionToForeground");
MessageParcel data;
@ -151,7 +151,7 @@ WSError SceneSessionManagerLiteProxy::PendingSessionToForeground(const sptr<IRem
return static_cast<WSError>(reply.ReadInt32());
}
WSError SceneSessionManagerLiteProxy::PendingSessionToBackgroundForDelegator(const sptr<IRemoteObject> &token)
WSError SceneSessionManagerLiteProxy::PendingSessionToBackgroundForDelegator(const sptr<IRemoteObject>& token)
{
WLOGFD("run SceneSessionManagerLiteProxy::PendingSessionToBackgroundForDelegator");
MessageParcel data;
@ -413,7 +413,7 @@ WSError SceneSessionManagerLiteProxy::TerminateSessionNew(const sptr<AAFwk::Sess
return static_cast<WSError>(reply.ReadInt32());
}
WSError SceneSessionManagerLiteProxy::GetFocusSessionToken(sptr<IRemoteObject> &token)
WSError SceneSessionManagerLiteProxy::GetFocusSessionToken(sptr<IRemoteObject>& token)
{
WLOGFD("run SceneSessionManagerLiteProxy::GetFocusSessionToken");
MessageParcel data;
@ -513,7 +513,7 @@ WSError SceneSessionManagerLiteProxy::GetSessionSnapshot(const std::string& devi
return static_cast<WSError>(reply.ReadInt32());
}
WSError SceneSessionManagerLiteProxy::SetSessionContinueState(const sptr<IRemoteObject> &token,
WSError SceneSessionManagerLiteProxy::SetSessionContinueState(const sptr<IRemoteObject>& token,
const ContinueState& continueState)
{
MessageParcel data;
@ -820,7 +820,7 @@ WMError SceneSessionManagerLiteProxy::UnregisterWindowManagerAgent(WindowManager
return static_cast<WMError>(reply.ReadInt32());
}
WMError SceneSessionManagerLiteProxy::CheckWindowId(int32_t windowId, int32_t &pid)
WMError SceneSessionManagerLiteProxy::CheckWindowId(int32_t windowId, int32_t& pid)
{
MessageParcel data;
MessageParcel reply;

View File

@ -26,7 +26,7 @@ constexpr uint32_t MAX_TOPN_INFO_SIZE = 200;
}
int SceneSessionManagerLiteStub::OnRemoteRequest(uint32_t code,
MessageParcel &data, MessageParcel &reply, MessageOption &option)
MessageParcel& data, MessageParcel& reply, MessageOption& option)
{
WLOGFD("Scene session on remote request!, code: %{public}u", code);
if (data.ReadInterfaceToken() != GetDescriptor()) {
@ -118,7 +118,7 @@ int SceneSessionManagerLiteStub::ProcessRemoteRequest(uint32_t code, MessageParc
}
}
int SceneSessionManagerLiteStub::HandleSetSessionLabel(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerLiteStub::HandleSetSessionLabel(MessageParcel& data, MessageParcel& reply)
{
WLOGFD("run HandleSetSessionLabel!");
sptr<IRemoteObject> token = data.ReadRemoteObject();
@ -128,7 +128,7 @@ int SceneSessionManagerLiteStub::HandleSetSessionLabel(MessageParcel &data, Mess
return ERR_NONE;
}
int SceneSessionManagerLiteStub::HandleSetSessionIcon(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerLiteStub::HandleSetSessionIcon(MessageParcel& data, MessageParcel& reply)
{
WLOGFD("run HandleSetSessionIcon!");
sptr<IRemoteObject> token = data.ReadRemoteObject();
@ -142,7 +142,7 @@ int SceneSessionManagerLiteStub::HandleSetSessionIcon(MessageParcel &data, Messa
return ERR_NONE;
}
int SceneSessionManagerLiteStub::HandleIsValidSessionIds(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerLiteStub::HandleIsValidSessionIds(MessageParcel& data, MessageParcel& reply)
{
WLOGFD("run HandleIsValidSessionIds!");
std::vector<int32_t> sessionIds;
@ -154,7 +154,7 @@ int SceneSessionManagerLiteStub::HandleIsValidSessionIds(MessageParcel &data, Me
return ERR_NONE;
}
int SceneSessionManagerLiteStub::HandlePendingSessionToForeground(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerLiteStub::HandlePendingSessionToForeground(MessageParcel& data, MessageParcel& reply)
{
WLOGFD("run HandlePendingSessionToForeground!");
sptr<IRemoteObject> token = data.ReadRemoteObject();
@ -163,7 +163,7 @@ int SceneSessionManagerLiteStub::HandlePendingSessionToForeground(MessageParcel
return ERR_NONE;
}
int SceneSessionManagerLiteStub::HandlePendingSessionToBackgroundForDelegator(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerLiteStub::HandlePendingSessionToBackgroundForDelegator(MessageParcel& data, MessageParcel& reply)
{
WLOGFD("run HandlePendingSessionToBackground!");
sptr<IRemoteObject> token = data.ReadRemoteObject();
@ -271,7 +271,7 @@ int SceneSessionManagerLiteStub::HandleTerminateSessionNew(MessageParcel& data,
return ERR_NONE;
}
int SceneSessionManagerLiteStub::HandleGetFocusSessionToken(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerLiteStub::HandleGetFocusSessionToken(MessageParcel& data, MessageParcel& reply)
{
WLOGFD("run HandleGetFocusSessionToken!");
sptr<IRemoteObject> token = nullptr;
@ -291,7 +291,7 @@ int SceneSessionManagerLiteStub::HandleGetFocusSessionElement(MessageParcel& dat
return ERR_NONE;
}
int SceneSessionManagerLiteStub::HandleSetSessionContinueState(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerLiteStub::HandleSetSessionContinueState(MessageParcel& data, MessageParcel& reply)
{
WLOGFD("HandleSetSessionContinueState");
sptr <IRemoteObject> token = data.ReadRemoteObject();
@ -301,7 +301,7 @@ int SceneSessionManagerLiteStub::HandleSetSessionContinueState(MessageParcel &da
return ERR_NONE;
}
int SceneSessionManagerLiteStub::HandleGetSessionSnapshot(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerLiteStub::HandleGetSessionSnapshot(MessageParcel& data, MessageParcel& reply)
{
WLOGFD("run HandleGetSessionSnapshot!");
std::string deviceId = Str16ToStr8(data.ReadString16());
@ -314,7 +314,7 @@ int SceneSessionManagerLiteStub::HandleGetSessionSnapshot(MessageParcel &data, M
return ERR_NONE;
}
int SceneSessionManagerLiteStub::HandleClearSession(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerLiteStub::HandleClearSession(MessageParcel& data, MessageParcel& reply)
{
WLOGFD("run HandleClearSession!");
int32_t persistentId = data.ReadInt32();
@ -323,7 +323,7 @@ int SceneSessionManagerLiteStub::HandleClearSession(MessageParcel &data, Message
return ERR_NONE;
}
int SceneSessionManagerLiteStub::HandleClearAllSessions(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerLiteStub::HandleClearAllSessions(MessageParcel& data, MessageParcel& reply)
{
WLOGFD("run HandleClearAllSessions!");
WSError ret = ClearAllSessions();
@ -331,7 +331,7 @@ int SceneSessionManagerLiteStub::HandleClearAllSessions(MessageParcel &data, Mes
return ERR_NONE;
}
int SceneSessionManagerLiteStub::HandleLockSession(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerLiteStub::HandleLockSession(MessageParcel& data, MessageParcel& reply)
{
WLOGFD("run HandleLockSession!");
int32_t sessionId = data.ReadInt32();
@ -340,7 +340,7 @@ int SceneSessionManagerLiteStub::HandleLockSession(MessageParcel &data, MessageP
return ERR_NONE;
}
int SceneSessionManagerLiteStub::HandleUnlockSession(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerLiteStub::HandleUnlockSession(MessageParcel& data, MessageParcel& reply)
{
WLOGFD("run HandleUnlockSession!");
int32_t sessionId = data.ReadInt32();
@ -349,7 +349,7 @@ int SceneSessionManagerLiteStub::HandleUnlockSession(MessageParcel &data, Messag
return ERR_NONE;
}
int SceneSessionManagerLiteStub::HandleMoveSessionsToForeground(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerLiteStub::HandleMoveSessionsToForeground(MessageParcel& data, MessageParcel& reply)
{
WLOGFD("run HandleMoveSessionsToForeground!");
std::vector<int32_t> sessionIds;
@ -360,7 +360,7 @@ int SceneSessionManagerLiteStub::HandleMoveSessionsToForeground(MessageParcel &d
return ERR_NONE;
}
int SceneSessionManagerLiteStub::HandleMoveSessionsToBackground(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerLiteStub::HandleMoveSessionsToBackground(MessageParcel& data, MessageParcel& reply)
{
WLOGFD("run HandleMoveSessionsToBackground!");
std::vector<int32_t> sessionIds;
@ -382,7 +382,7 @@ int SceneSessionManagerLiteStub::HandleGetFocusSessionInfo(MessageParcel& data,
return ERR_NONE;
}
int SceneSessionManagerLiteStub::HandleCheckWindowId(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerLiteStub::HandleCheckWindowId(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("run HandleCheckWindowId!");
int32_t windowId = INVALID_WINDOW_ID;
@ -404,7 +404,7 @@ int SceneSessionManagerLiteStub::HandleCheckWindowId(MessageParcel &data, Messag
}
int SceneSessionManagerLiteStub::HandleRegisterWindowManagerAgent(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerLiteStub::HandleRegisterWindowManagerAgent(MessageParcel& data, MessageParcel& reply)
{
auto type = static_cast<WindowManagerAgentType>(data.ReadUint32());
WLOGFI("run HandleRegisterWindowManagerAgent!, type=%{public}u", static_cast<uint32_t>(type));
@ -416,7 +416,7 @@ int SceneSessionManagerLiteStub::HandleRegisterWindowManagerAgent(MessageParcel
return ERR_NONE;
}
int SceneSessionManagerLiteStub::HandleUnregisterWindowManagerAgent(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerLiteStub::HandleUnregisterWindowManagerAgent(MessageParcel& data, MessageParcel& reply)
{
auto type = static_cast<WindowManagerAgentType>(data.ReadUint32());
WLOGFI("run HandleUnregisterWindowManagerAgent!, type=%{public}u", static_cast<uint32_t>(type));
@ -453,7 +453,7 @@ int SceneSessionManagerLiteStub::HandleGetWindowModeType(MessageParcel& data, Me
return ERR_NONE;
}
int SceneSessionManagerLiteStub::HandleGetMainWinodowInfo(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerLiteStub::HandleGetMainWinodowInfo(MessageParcel& data, MessageParcel& reply)
{
TLOGI(WmsLogTag::WMS_MAIN, "run HandleGetMainWinodowInfo lite");
int32_t topN = 0;

View File

@ -641,7 +641,7 @@ void SceneSessionManagerProxy::GetFocusWindowInfo(FocusChangeInfo& focusInfo)
}
}
WSError SceneSessionManagerProxy::SetSessionLabel(const sptr<IRemoteObject> &token, const std::string &label)
WSError SceneSessionManagerProxy::SetSessionLabel(const sptr<IRemoteObject>& token, const std::string& label)
{
WLOGFI("run SceneSessionManagerProxy::SetSessionLabel");
MessageParcel data;
@ -673,8 +673,8 @@ WSError SceneSessionManagerProxy::SetSessionLabel(const sptr<IRemoteObject> &tok
return static_cast<WSError>(reply.ReadInt32());
}
WSError SceneSessionManagerProxy::SetSessionIcon(const sptr<IRemoteObject> &token,
const std::shared_ptr<Media::PixelMap> &icon)
WSError SceneSessionManagerProxy::SetSessionIcon(const sptr<IRemoteObject>& token,
const std::shared_ptr<Media::PixelMap>& icon)
{
WLOGFI("run SceneSessionManagerProxy::SetSessionIcon");
MessageParcel data;
@ -707,7 +707,7 @@ WSError SceneSessionManagerProxy::SetSessionIcon(const sptr<IRemoteObject> &toke
}
WSError SceneSessionManagerProxy::IsValidSessionIds(
const std::vector<int32_t> &sessionIds, std::vector<bool> &results)
const std::vector<int32_t>& sessionIds, std::vector<bool>& results)
{
WLOGFI("run SceneSessionManagerProxy::IsValidSessionIds");
MessageParcel data;
@ -802,7 +802,7 @@ WMError SceneSessionManagerProxy::GetUnreliableWindowInfo(int32_t windowId,
return static_cast<WMError>(reply.ReadInt32());
}
WSError SceneSessionManagerProxy::PendingSessionToForeground(const sptr<IRemoteObject> &token)
WSError SceneSessionManagerProxy::PendingSessionToForeground(const sptr<IRemoteObject>& token)
{
WLOGFI("run SceneSessionManagerProxy::PendingSessionToForeground");
MessageParcel data;
@ -831,7 +831,7 @@ WSError SceneSessionManagerProxy::PendingSessionToForeground(const sptr<IRemoteO
return static_cast<WSError>(reply.ReadInt32());
}
WSError SceneSessionManagerProxy::PendingSessionToBackgroundForDelegator(const sptr<IRemoteObject> &token)
WSError SceneSessionManagerProxy::PendingSessionToBackgroundForDelegator(const sptr<IRemoteObject>& token)
{
WLOGFI("run SceneSessionManagerProxy::PendingSessionToBackgroundForDelegator");
MessageParcel data;
@ -1034,7 +1034,7 @@ WSError SceneSessionManagerProxy::GetSessionInfoByContinueSessionId(
return static_cast<WSError>(reply.ReadInt32());
}
WSError SceneSessionManagerProxy::DumpSessionAll(std::vector<std::string> &infos)
WSError SceneSessionManagerProxy::DumpSessionAll(std::vector<std::string>& infos)
{
WLOGFI("run SceneSessionManagerProxy::DumpSessionAll");
MessageParcel data;
@ -1061,7 +1061,7 @@ WSError SceneSessionManagerProxy::DumpSessionAll(std::vector<std::string> &infos
return static_cast<WSError>(reply.ReadInt32());
}
WSError SceneSessionManagerProxy::DumpSessionWithId(int32_t persistentId, std::vector<std::string> &infos)
WSError SceneSessionManagerProxy::DumpSessionWithId(int32_t persistentId, std::vector<std::string>& infos)
{
WLOGFI("run SceneSessionManagerProxy::DumpSessionWithId");
MessageParcel data;
@ -1150,7 +1150,7 @@ WSError SceneSessionManagerProxy::TerminateSessionNew(const sptr<AAFwk::SessionI
return static_cast<WSError>(reply.ReadInt32());
}
WSError SceneSessionManagerProxy::GetFocusSessionToken(sptr<IRemoteObject> &token)
WSError SceneSessionManagerProxy::GetFocusSessionToken(sptr<IRemoteObject>& token)
{
WLOGFD("run SceneSessionManagerProxy::GetFocusSessionToken");
MessageParcel data;
@ -1207,7 +1207,7 @@ WSError SceneSessionManagerProxy::GetFocusSessionElement(AppExecFwk::ElementName
return static_cast<WSError>(reply.ReadInt32());
}
WMError SceneSessionManagerProxy::CheckWindowId(int32_t windowId, int32_t &pid)
WMError SceneSessionManagerProxy::CheckWindowId(int32_t windowId, int32_t& pid)
{
MessageParcel data;
MessageParcel reply;
@ -1348,7 +1348,7 @@ WSError SceneSessionManagerProxy::GetUIContentRemoteObj(int32_t persistentId, sp
return static_cast<WSError>(reply.ReadUint32());
}
WSError SceneSessionManagerProxy::SetSessionContinueState(const sptr<IRemoteObject> &token,
WSError SceneSessionManagerProxy::SetSessionContinueState(const sptr<IRemoteObject>& token,
const ContinueState& continueState)
{
MessageParcel data;
@ -1595,7 +1595,7 @@ WSError SceneSessionManagerProxy::ClearAllSessions()
}
WSError SceneSessionManagerProxy::RegisterIAbilityManagerCollaborator(int32_t type,
const sptr<AAFwk::IAbilityManagerCollaborator> &impl)
const sptr<AAFwk::IAbilityManagerCollaborator>& impl)
{
WLOGFI("run SceneSessionManagerProxy::RegisterIAbilityManagerCollaborator");
if (!impl) {

View File

@ -25,7 +25,7 @@ constexpr uint32_t MAX_VECTOR_SIZE = 100;
}
int SceneSessionManagerStub::OnRemoteRequest(uint32_t code,
MessageParcel &data, MessageParcel &reply, MessageOption &option)
MessageParcel& data, MessageParcel& reply, MessageOption& option)
{
WLOGFD("Scene session on remote request!, code: %{public}u", code);
if (data.ReadInterfaceToken() != GetDescriptor()) {
@ -174,7 +174,7 @@ int SceneSessionManagerStub::ProcessRemoteRequest(uint32_t code, MessageParcel&
}
}
int SceneSessionManagerStub::HandleCreateAndConnectSpecificSession(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleCreateAndConnectSpecificSession(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("run HandleCreateAndConnectSpecificSession!");
sptr<IRemoteObject> sessionStageObject = data.ReadRemoteObject();
@ -216,7 +216,7 @@ int SceneSessionManagerStub::HandleCreateAndConnectSpecificSession(MessageParcel
return ERR_NONE;
}
int SceneSessionManagerStub::HandleRecoverAndConnectSpecificSession(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleRecoverAndConnectSpecificSession(MessageParcel& data, MessageParcel& reply)
{
TLOGI(WmsLogTag::WMS_RECOVER, "run!");
sptr<IRemoteObject> sessionStageObject = data.ReadRemoteObject();
@ -310,7 +310,7 @@ int SceneSessionManagerStub::HandleDestroyAndDisconnectSpcificSessionWithDetachC
return ERR_NONE;
}
int SceneSessionManagerStub::HandleRequestFocusStatus(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleRequestFocusStatus(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("run");
int32_t persistentId = data.ReadInt32();
@ -320,7 +320,7 @@ int SceneSessionManagerStub::HandleRequestFocusStatus(MessageParcel &data, Messa
return ERR_NONE;
}
int SceneSessionManagerStub::HandleRegisterWindowManagerAgent(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleRegisterWindowManagerAgent(MessageParcel& data, MessageParcel& reply)
{
auto type = static_cast<WindowManagerAgentType>(data.ReadUint32());
WLOGFI("run HandleRegisterWindowManagerAgent!, type=%{public}u", static_cast<uint32_t>(type));
@ -332,7 +332,7 @@ int SceneSessionManagerStub::HandleRegisterWindowManagerAgent(MessageParcel &dat
return ERR_NONE;
}
int SceneSessionManagerStub::HandleUnregisterWindowManagerAgent(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleUnregisterWindowManagerAgent(MessageParcel& data, MessageParcel& reply)
{
auto type = static_cast<WindowManagerAgentType>(data.ReadUint32());
WLOGFI("run HandleUnregisterWindowManagerAgent!, type=%{public}u", static_cast<uint32_t>(type));
@ -344,7 +344,7 @@ int SceneSessionManagerStub::HandleUnregisterWindowManagerAgent(MessageParcel &d
return ERR_NONE;
}
int SceneSessionManagerStub::HandleGetFocusSessionInfo(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleGetFocusSessionInfo(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("run HandleGetFocusSessionInfo!");
FocusChangeInfo focusInfo;
@ -353,7 +353,7 @@ int SceneSessionManagerStub::HandleGetFocusSessionInfo(MessageParcel &data, Mess
return ERR_NONE;
}
int SceneSessionManagerStub::HandleSetSessionLabel(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleSetSessionLabel(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("run HandleSetSessionLabel!");
sptr<IRemoteObject> token = data.ReadRemoteObject();
@ -363,7 +363,7 @@ int SceneSessionManagerStub::HandleSetSessionLabel(MessageParcel &data, MessageP
return ERR_NONE;
}
int SceneSessionManagerStub::HandleSetSessionIcon(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleSetSessionIcon(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("run HandleSetSessionIcon!");
sptr<IRemoteObject> token = data.ReadRemoteObject();
@ -377,7 +377,7 @@ int SceneSessionManagerStub::HandleSetSessionIcon(MessageParcel &data, MessagePa
return ERR_NONE;
}
int SceneSessionManagerStub::HandleIsValidSessionIds(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleIsValidSessionIds(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("run HandleIsValidSessionIds!");
std::vector<int32_t> sessionIds;
@ -387,7 +387,7 @@ int SceneSessionManagerStub::HandleIsValidSessionIds(MessageParcel &data, Messag
return ERR_NONE;
}
int SceneSessionManagerStub::HandlePendingSessionToForeground(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandlePendingSessionToForeground(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("run HandlePendingSessionToForeground!");
sptr<IRemoteObject> token = data.ReadRemoteObject();
@ -396,7 +396,7 @@ int SceneSessionManagerStub::HandlePendingSessionToForeground(MessageParcel &dat
return ERR_NONE;
}
int SceneSessionManagerStub::HandlePendingSessionToBackgroundForDelegator(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandlePendingSessionToBackgroundForDelegator(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("run HandlePendingSessionToBackground!");
sptr<IRemoteObject> token = data.ReadRemoteObject();
@ -539,7 +539,7 @@ int SceneSessionManagerStub::HandleTerminateSessionNew(MessageParcel& data, Mess
return ERR_NONE;
}
int SceneSessionManagerStub::HandleGetFocusSessionToken(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleGetFocusSessionToken(MessageParcel& data, MessageParcel& reply)
{
WLOGFD("run HandleGetFocusSessionToken!");
sptr<IRemoteObject> token = nullptr;
@ -559,7 +559,7 @@ int SceneSessionManagerStub::HandleGetFocusSessionElement(MessageParcel& data, M
return ERR_NONE;
}
int SceneSessionManagerStub::HandleCheckWindowId(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleCheckWindowId(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("run HandleCheckWindowId!");
int32_t windowId = INVALID_WINDOW_ID;
@ -580,7 +580,7 @@ int SceneSessionManagerStub::HandleCheckWindowId(MessageParcel &data, MessagePar
return ERR_NONE;
}
int SceneSessionManagerStub::HandleSetGestureNavigationEnabled(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleSetGestureNavigationEnabled(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("run HandleSetGestureNavigationEnabled!");
bool enable = data.ReadBool();
@ -589,7 +589,7 @@ int SceneSessionManagerStub::HandleSetGestureNavigationEnabled(MessageParcel &da
return ERR_NONE;
}
int SceneSessionManagerStub::HandleGetAccessibilityWindowInfo(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleGetAccessibilityWindowInfo(MessageParcel& data, MessageParcel& reply)
{
std::vector<sptr<AccessibilityWindowInfo>> infos;
WMError errCode = GetAccessibilityWindowInfo(infos);
@ -619,7 +619,7 @@ int SceneSessionManagerStub::HandleGetUnreliableWindowInfo(MessageParcel& data,
return ERR_NONE;
}
int SceneSessionManagerStub::HandleSetSessionContinueState(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleSetSessionContinueState(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("HandleSetSessionContinueState");
sptr <IRemoteObject> token = data.ReadRemoteObject();
@ -629,7 +629,7 @@ int SceneSessionManagerStub::HandleSetSessionContinueState(MessageParcel &data,
return ERR_NONE;
}
int SceneSessionManagerStub::HandleGetSessionDump(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleGetSessionDump(MessageParcel& data, MessageParcel& reply)
{
std::vector<std::string> params;
if (!data.ReadStringVector(&params)) {
@ -661,7 +661,7 @@ int SceneSessionManagerStub::HandleUpdateSessionAvoidAreaListener(MessageParcel&
return ERR_NONE;
}
int SceneSessionManagerStub::HandleGetSessionSnapshot(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleGetSessionSnapshot(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("run HandleGetSessionSnapshot!");
std::string deviceId = Str16ToStr8(data.ReadString16());
@ -696,7 +696,7 @@ int SceneSessionManagerStub::HandleGetUIContentRemoteObj(MessageParcel& data, Me
return ERR_NONE;
}
int SceneSessionManagerStub::HandleBindDialogTarget(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleBindDialogTarget(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("run HandleBindDialogTarget!");
uint64_t persistentId = data.ReadUint64();
@ -706,7 +706,7 @@ int SceneSessionManagerStub::HandleBindDialogTarget(MessageParcel &data, Message
return ERR_NONE;
}
int SceneSessionManagerStub::HandleNotifyDumpInfoResult(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleNotifyDumpInfoResult(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("HandleNotifyDumpInfoResult");
std::vector<std::string> info;
@ -730,7 +730,7 @@ int SceneSessionManagerStub::HandleNotifyDumpInfoResult(MessageParcel &data, Mes
return ERR_NONE;
}
int SceneSessionManagerStub::HandleClearSession(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleClearSession(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("run HandleClearSession!");
int32_t persistentId = data.ReadInt32();
@ -739,7 +739,7 @@ int SceneSessionManagerStub::HandleClearSession(MessageParcel &data, MessageParc
return ERR_NONE;
}
int SceneSessionManagerStub::HandleClearAllSessions(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleClearAllSessions(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("run HandleClearAllSessions!");
WSError ret = ClearAllSessions();
@ -747,7 +747,7 @@ int SceneSessionManagerStub::HandleClearAllSessions(MessageParcel &data, Message
return ERR_NONE;
}
int SceneSessionManagerStub::HandleLockSession(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleLockSession(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("run HandleLockSession!");
int32_t sessionId = data.ReadInt32();
@ -755,7 +755,7 @@ int SceneSessionManagerStub::HandleLockSession(MessageParcel &data, MessageParce
reply.WriteUint32(static_cast<uint32_t>(ret));
return ERR_NONE;
}
int SceneSessionManagerStub::HandleUnlockSession(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleUnlockSession(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("run HandleUnlockSession!");
int32_t sessionId = data.ReadInt32();
@ -763,7 +763,7 @@ int SceneSessionManagerStub::HandleUnlockSession(MessageParcel &data, MessagePar
reply.WriteUint32(static_cast<uint32_t>(ret));
return ERR_NONE;
}
int SceneSessionManagerStub::HandleMoveSessionsToForeground(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleMoveSessionsToForeground(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("run HandleMoveSessionsToForeground!");
std::vector<int32_t> sessionIds;
@ -773,7 +773,7 @@ int SceneSessionManagerStub::HandleMoveSessionsToForeground(MessageParcel &data,
reply.WriteUint32(static_cast<uint32_t>(ret));
return ERR_NONE;
}
int SceneSessionManagerStub::HandleMoveSessionsToBackground(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleMoveSessionsToBackground(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("run HandleMoveSessionsToBackground!");
std::vector<int32_t> sessionIds;
@ -786,7 +786,7 @@ int SceneSessionManagerStub::HandleMoveSessionsToBackground(MessageParcel &data,
return ERR_NONE;
}
int SceneSessionManagerStub::HandleRegisterCollaborator(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleRegisterCollaborator(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("run HandleRegisterCollaborator!");
int32_t type = data.ReadInt32();
@ -797,7 +797,7 @@ int SceneSessionManagerStub::HandleRegisterCollaborator(MessageParcel &data, Mes
return ERR_NONE;
}
int SceneSessionManagerStub::HandleUnregisterCollaborator(MessageParcel &data, MessageParcel &reply)
int SceneSessionManagerStub::HandleUnregisterCollaborator(MessageParcel& data, MessageParcel& reply)
{
WLOGFI("run HandleUnregisterCollaborator!");
int32_t type = data.ReadInt32();

View File

@ -26,7 +26,7 @@ public:
SessionManagerServiceStub() = default;
virtual ~SessionManagerServiceStub() = default;
int OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override;
int OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option) override;
};
} // namespace OHOS::Rosen

View File

@ -22,8 +22,8 @@ namespace {
constexpr HiviewDFX::HiLogLabel LABEL = { LOG_CORE, HILOG_DOMAIN_WINDOW, "SessionManagerServiceStub" };
}
int SessionManagerServiceStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply,
MessageOption &option)
int SessionManagerServiceStub::OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply,
MessageOption& option)
{
WLOGFD("OnRemoteRequest code is %{public}u", code);
if (data.ReadInterfaceToken() != GetDescriptor()) {

View File

@ -181,7 +181,7 @@ bool Parcel::WriteString16(const std::u16string& value)
}
#ifdef ENABLE_MOCK_READ_INT32
bool Parcel::ReadInt32(int32_t &value)
bool Parcel::ReadInt32(int32_t& value)
{
if (g_setReadInt32ErrorFlag) {
return false;
@ -191,7 +191,7 @@ bool Parcel::ReadInt32(int32_t &value)
#endif
#ifdef ENABLE_MOCK_READ_INT64
bool Parcel::ReadInt64(int64_t &value)
bool Parcel::ReadInt64(int64_t& value)
{
if (g_setReadInt64ErrorFlag) {
return false;

View File

@ -483,9 +483,9 @@ HWTEST_F(ExtensionSessionTest, TransferKeyEventForConsumed01, Function | SmallTe
extensionSession_->channelListener_ = new (std::nothrow) WindowEventChannelListener();
ASSERT_NE(extensionSession_->channelListener_, nullptr);
EXPECT_CALL(*mockEventChannel_, TransferKeyEventForConsumedAsync)
.WillOnce([](const std::shared_ptr<MMI::KeyEvent> &keyEvent,
.WillOnce([](const std::shared_ptr<MMI::KeyEvent>& keyEvent,
bool isPreImeEvent,
const sptr<IRemoteObject> &listener) {
const sptr<IRemoteObject>& listener) {
auto channelListener = iface_cast<IWindowEventChannelListener>(listener);
channelListener->OnTransferKeyEventForConsumed(keyEvent->GetId(), isPreImeEvent, true, WSError::WS_OK);
return WSError::WS_OK;

View File

@ -88,7 +88,7 @@ HWTEST_F(SceneSessionLifecycleTest, Foreground01, Function | SmallTest | Level2)
auto result = sceneSession->Foreground(property);
ASSERT_EQ(result, WSError::WS_OK);
specificCallback->onCreate_ = [&resultValue, specificCallback](const SessionInfo &info,
specificCallback->onCreate_ = [&resultValue, specificCallback](const SessionInfo& info,
sptr<WindowSessionProperty> property) -> sptr<SceneSession>
{
sptr<SceneSession> scensessionreturn = new (std::nothrow) SceneSession(info, specificCallback);
@ -270,7 +270,7 @@ HWTEST_F(SceneSessionLifecycleTest, Background01, Function | SmallTest | Level2)
sceneSession->isActive_ = true;
auto result = sceneSession->Background();
ASSERT_EQ(result, WSError::WS_OK);
specificCallback->onCreate_ = [&resultValue, specificCallback](const SessionInfo &info,
specificCallback->onCreate_ = [&resultValue, specificCallback](const SessionInfo& info,
sptr<WindowSessionProperty> property) -> sptr<SceneSession>
{
sptr<SceneSession> scensessionreturn = new (std::nothrow) SceneSession(info, specificCallback);

View File

@ -126,7 +126,7 @@ class MockSceneSessionManagerLiteStub : public SceneSessionManagerLiteStub {
void GetFocusWindowInfo(FocusChangeInfo& focusInfo) override
{
}
WMError CheckWindowId(int32_t windowId, int32_t &pid) override
WMError CheckWindowId(int32_t windowId, int32_t& pid) override
{
return WMError::WM_OK;
}

View File

@ -64,7 +64,7 @@ public:
const sptr<IWindowManagerAgent>& windowManagerAgent);
virtual WMError UnregisterWindowManagerAgent(WindowManagerAgentType type,
const sptr<IWindowManagerAgent>& windowManagerAgent);
virtual WMError CheckWindowId(int32_t windowId, int32_t &pid);
virtual WMError CheckWindowId(int32_t windowId, int32_t& pid);
virtual WMError SetWindowAnimationController(const sptr<RSIWindowAnimationController>& controller);
virtual WMError NotifyWindowTransition(sptr<WindowTransitionInfo> from, sptr<WindowTransitionInfo> to);
@ -84,8 +84,8 @@ public:
virtual WMError SetGestureNavigaionEnabled(bool enable);
virtual void DispatchKeyEvent(uint32_t windowId, std::shared_ptr<MMI::KeyEvent> event);
virtual void NotifyDumpInfoResult(const std::vector<std::string>& info);
virtual WMError DumpSessionAll(std::vector<std::string> &infos);
virtual WMError DumpSessionWithId(int32_t persistentId, std::vector<std::string> &infos);
virtual WMError DumpSessionAll(std::vector<std::string>& infos);
virtual WMError DumpSessionWithId(int32_t persistentId, std::vector<std::string>& infos);
virtual WMError GetUIContentRemoteObj(int32_t persistentId, sptr<IRemoteObject>& uiContentRemoteObj);
virtual WMError GetWindowAnimationTargets(std::vector<uint32_t> missionIds,
std::vector<sptr<RSWindowAnimationTarget>>& targets);

View File

@ -41,7 +41,7 @@ public:
const sptr<IWindowManagerAgent>& windowManagerAgent);
virtual WMError UnregisterWindowManagerAgent(WindowManagerAgentType type,
const sptr<IWindowManagerAgent>& windowManagerAgent);
virtual WMError CheckWindowId(int32_t windowId, int32_t &pid);
virtual WMError CheckWindowId(int32_t windowId, int32_t& pid);
virtual WMError GetVisibilityWindowInfo(std::vector<sptr<WindowVisibilityInfo>>& infos);
virtual void ClearWindowAdapter();
virtual WMError GetWindowModeType(WindowModeType& windowModeType);

View File

@ -390,7 +390,7 @@ private:
void NotifyRotationAnimationEnd();
void SubmitNoInteractionMonitorTask(int32_t eventId, const IWindowNoInteractionListenerSptr& listener);
bool IsUserOrientation(Orientation orientation) const;
void GetTitleButtonVisible(bool isPC, bool &hideMaximizeButton, bool &hideMinimizeButton, bool &hideSplitButton);
void GetTitleButtonVisible(bool isPC, bool& hideMaximizeButton, bool& hideMinimizeButton, bool& hideSplitButton);
WMError GetAppForceLandscapeConfig(AppForceLandscapeConfig& config);
void SetForceSplitEnable(bool isForceSplit, const std::string& homePage = "");
bool IsNotifyInteractiveDuplicative(bool interactive);

View File

@ -26,8 +26,8 @@ public:
WindowStub() = default;
~WindowStub() = default;
virtual int OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply,
MessageOption &option) override;
virtual int OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply,
MessageOption& option) override;
private:
static inline const class StaticDestroyMonitor {

Some files were not shown because too many files have changed in this diff Show More