未验证 提交 3e27d768 编写于 作者: O openharmony_ci 提交者: Gitee

!127 修复告警

Merge pull request !127 from leihonglin/master
...@@ -38,7 +38,7 @@ public: ...@@ -38,7 +38,7 @@ public:
bool InstallApp(AppInfo* app); bool InstallApp(AppInfo* app);
bool UnInstallApp(AppInfo* app); bool UnInstallApp(AppInfo* app);
bool StartApp(AppInfo* app); bool StartApp(AppInfo* app);
static void SetViewGroup(funcClick click, funcLongPress press, ViewGroupPage* arrPage[MAX_VIEWGROUP], int size); static void SetViewGroup(funcClick click, funcLongPress press, ViewGroupPage* viewPage[MAX_VIEWGROUP], int size);
private: private:
static void MyBundleStateCallback(const uint8_t installType, const uint8_t resultCode, const void* resultMessage, static void MyBundleStateCallback(const uint8_t installType, const uint8_t resultCode, const void* resultMessage,
......
...@@ -29,10 +29,7 @@ public: ...@@ -29,10 +29,7 @@ public:
~EventListener() override = default; ~EventListener() override = default;
EventListener(OnEventFunc onClick, OnEventFunc onLongPress) EventListener(OnEventFunc onClick, OnEventFunc onLongPress)
{ : onClick_(std::move(onClick)), onLongPress_(std::move(onLongPress)) {}
onClick_ = std::move(onClick);
onLongPress_ = std::move(onLongPress);
}
bool OnClick(UIView& view, const ClickEvent& event) override bool OnClick(UIView& view, const ClickEvent& event) override
{ {
......
...@@ -92,8 +92,6 @@ bool LongPressView::OnClick(UIView& view, const ClickEvent& event) ...@@ -92,8 +92,6 @@ bool LongPressView::OnClick(UIView& view, const ClickEvent& event)
if (currentView == nullptr) { if (currentView == nullptr) {
return false; return false;
} }
UILabelButton* lbutt = nullptr;
lbutt = static_cast<UILabelButton*>(currentView);
RemoveLview(); RemoveLview();
if (currentView == buttUninstall_) { if (currentView == buttUninstall_) {
uninstall_(app_); uninstall_(app_);
......
...@@ -81,10 +81,10 @@ public: ...@@ -81,10 +81,10 @@ public:
void InstallApp(AppInfo* app); void InstallApp(AppInfo* app);
void Callback() override void Callback() override
{ {
char tmp[TMP_BUF_SIZE] = { 0 };
time_t t = time(nullptr); time_t t = time(nullptr);
struct tm* st = localtime(&t); struct tm* st = localtime(&t);
if (st != nullptr) { if (st != nullptr) {
char tmp[TMP_BUF_SIZE] = {0};
int ret = sprintf_s(tmp, sizeof(tmp), "%02d : %02d", st->tm_hour, st->tm_min); int ret = sprintf_s(tmp, sizeof(tmp), "%02d : %02d", st->tm_hour, st->tm_min);
if (ret != LAUNCHER_PARAMERROR) { if (ret != LAUNCHER_PARAMERROR) {
lableTitle_->SetText(tmp); lableTitle_->SetText(tmp);
......
...@@ -43,7 +43,7 @@ public: ...@@ -43,7 +43,7 @@ public:
explicit TimeWeatherView(UIViewGroup* viewGroup); explicit TimeWeatherView(UIViewGroup* viewGroup);
virtual ~TimeWeatherView(); virtual ~TimeWeatherView();
void SetStyle(Style sty); void SetStyle(Style sty);
void SetPosion(int16_t width, int16_t height, int16_t x, int16_t y); void SetPosion(int16_t x, int16_t y, int16_t height, int16_t width);
void SetUpView(); void SetUpView();
void SetUpTimeView(); void SetUpTimeView();
......
...@@ -33,8 +33,8 @@ public: ...@@ -33,8 +33,8 @@ public:
virtual ~ViewGroupPage(); virtual ~ViewGroupPage();
void SetMatrix(int16_t rows, int16_t cols); void SetMatrix(int16_t rows, int16_t cols);
bool AddApp(AppInfo* pAppInfo); bool AddApp(AppInfo* pAppInfo);
bool RemoveApp(const char* appName); bool RemoveApp(const char* pAppName);
bool FindApp(AppInfo* pAppInfo); bool FindApp(AppInfo* pApp);
void SetScale(double scale); void SetScale(double scale);
protected: protected:
......
...@@ -117,9 +117,6 @@ void AppAbilitySlice::SetAnAppInfo(const int count, BundleInfo& pBundleInfo) ...@@ -117,9 +117,6 @@ void AppAbilitySlice::SetAnAppInfo(const int count, BundleInfo& pBundleInfo)
printf("[ERROR]strcpy_s pBundleInfo.bundleName failed, err = %d\n", err); printf("[ERROR]strcpy_s pBundleInfo.bundleName failed, err = %d\n", err);
return; return;
} }
for (size_t i = 0; i < strlen(pBundleInfo.bundleName); i++) {
buff[i] = pBundleInfo.bundleName[i];
}
SetAppButtonListener(pBundleInfo.bundleName); SetAppButtonListener(pBundleInfo.bundleName);
itemView->SetOnClickListener(buttonAppInfoListener_); itemView->SetOnClickListener(buttonAppInfoListener_);
scrollView_->Add(itemView); scrollView_->Add(itemView);
......
...@@ -123,7 +123,7 @@ private: ...@@ -123,7 +123,7 @@ private:
void PermissionInfoList(); void PermissionInfoList();
void SetAppPermissionInfo(int index, PermissionSaved& permissions); void SetAppPermissionInfo(int index, PermissionSaved& permissions);
char bundleName_[128]; char bundleName_[128] = {0};
}; };
} // namespace OHOS } // namespace OHOS
......
...@@ -30,10 +30,7 @@ public: ...@@ -30,10 +30,7 @@ public:
~EventListener() override = default; ~EventListener() override = default;
EventListener(OnEventFunc onClick, OnEventFunc onLongPress) EventListener(OnEventFunc onClick, OnEventFunc onLongPress)
{ : onClick_(std::move(onClick)), onLongPress_(std::move(onLongPress)) {}
onClick_ = std::move(onClick);
onLongPress_ = std::move(onLongPress);
}
bool OnClick(UIView& view, const ClickEvent &event) override bool OnClick(UIView& view, const ClickEvent &event) override
{ {
......
...@@ -451,10 +451,9 @@ int InitControlInterface() ...@@ -451,10 +451,9 @@ int InitControlInterface()
void* WpaScanThread(void *args) void* WpaScanThread(void *args)
{ {
int mySleep = 2; int mySleep = 2;
int ret = 0;
sleep(mySleep); sleep(mySleep);
if (g_monitorConn == NULL) { if (g_monitorConn == NULL) {
ret = InitControlInterface(); int ret = InitControlInterface();
printf("%s:%d [INFO] InitControlInterface return %d.\n", __FUNCTION__, __LINE__, ret); printf("%s:%d [INFO] InitControlInterface return %d.\n", __FUNCTION__, __LINE__, ret);
if (ret == -1) { if (ret == -1) {
return NULL; return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册