rebootdevice 文件夹更新
authorluozheng <1732036298@qq.com>
Thu, 30 May 2024 06:55:55 +0000 (14:55 +0800)
committerluozheng <1732036298@qq.com>
Thu, 30 May 2024 06:55:55 +0000 (14:55 +0800)
code/sdk/application/wearable/fd230app/nativeui/rebootdevice/include/RebootModel.h
code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootDeviceView.cpp
code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootView.cpp
code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/ShutdownDeviceView.cpp

index cad3c66..9777580 100644 (file)
@@ -95,7 +95,7 @@ UIViewGroup *RebootDeviceView::InitShowUpView(void)
         group->SetHeight(VERTICAL_RESOLUTION);
     }
     ret = ShowUpRebootDeviceView();
-    if (ret == false) {
+    if (!ret) {
         return nullptr;
     }
     group->Add(rebootDeviceLabel);
index 8e5c9c9..f323289 100644 (file)
@@ -251,13 +251,13 @@ namespace OHOS
         UNUSED(hideView);
         if (container[thisView] == nullptr)
         {
-            UIViewGroup *group = InitShowUpView();
-            if (group == nullptr)
+            UIViewGroup *viewGroup = InitShowUpView();
+            if (viewGroup == nullptr)
             {
-                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "group nullptr fail");
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "viewGroup nullptr fail");
                 return false;
             }
-            container[thisView] = group;
+            container[thisView] = viewGroup;
             RootView::GetInstance()->Add(container[thisView]);
         }
         return true;
@@ -279,13 +279,12 @@ namespace OHOS
                 return false;
             }
             // init view
-            UIViewGroup *group = rebootDeviceView->InitShowUpView();
-            if (group == nullptr)
-            {
-                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "group nullptr fail");
+            UIViewGroup *viewGroup = rebootDeviceView->InitShowUpView();
+           if (viewGroup == nullptr) {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "viewGroup nullptr fail");
                 return false;
             }
-            container[thisView] = group;
+            container[thisView] = viewGroup;
             RootView::GetInstance()->Add(container[thisView]);
         }
         return true;
@@ -307,13 +306,13 @@ namespace OHOS
                 return false;
             }
             // init view
-            UIViewGroup *group = shutdownDeviceView->InitShowUpView();
-            if (group == nullptr)
+            UIViewGroup *viewGroup = shutdownDeviceView->InitShowUpView();
+            if (viewGroup == nullptr)
             {
-                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "group nullptr fail");
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "viewGroup nullptr fail");
                 return false;
             }
-            container[thisView] = group;
+            container[thisView] = viewGroup;
             RootView::GetInstance()->Add(container[thisView]);
         }
         return true;
@@ -373,7 +372,7 @@ namespace OHOS
     {
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::ChangeView %d, %d", hideView, showView);
 
-        if (CheckViewParam(hideView, showView) == false)
+        if (!CheckViewParam(hideView, showView))
         {
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RebootView::CheckViewParam failed.");
             return;
@@ -381,7 +380,7 @@ namespace OHOS
 
         PreprosssChangeView tmpPreProcessView = preProcessView[showView];
 
-        if ((this->*tmpPreProcessView)(hideView, showView) == false)
+        if (!(this->*tmpPreProcessView)(hideView, showView))
         {
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RebootView::ChangeView %d %dfailed", showView, hideView);
             return;
index a56f9fd..775d5ec 100644 (file)
@@ -97,7 +97,7 @@ UIViewGroup *ShutdownDeviceView::InitShowUpView(void)
     }
 
     ret = ShowUpShutdownDeviceView();
-    if (ret == false) {
+    if (!ret) {
         return nullptr;
     }
     group->Add(shutdownDeviceLabel);