解决表盘浏览特效界面按键退出不了问题 3433/2
authorluozheng <1732036298@qq.com>
Wed, 3 Jun 2026 10:26:35 +0000 (18:26 +0800)
committerluozheng <1732036298@qq.com>
Wed, 3 Jun 2026 10:26:35 +0000 (18:26 +0800)
code/sdk/application/wearable/n9/nativeapp/nativelauncher/src/NativeLauncher.cpp
code/sdk/application/wearable/n9/nativeapp/nativeui/set_dial/src/SetDialPresenter.cpp
code/sdk/application/wearable/n9/nativeapp/nativeui/set_dial/src/SetDialView.cpp
code/sdk/application/wearable/n9/nativeapp/nativeui/set_dial_style/include/SetDialStylePresenter.h
code/sdk/application/wearable/n9/nativeapp/nativeui/set_dial_style/src/SetDialStylePresenter.cpp
code/sdk/zhihui/drivers/vibrator/service/vibrator_service.cpp

index 6744e7e..3a513aa 100644 (file)
@@ -170,10 +170,6 @@ void NativeLauncher::InitNativeLauncher(LaunchMode mode)
 
         // 初始化屏幕时长
         cm_initializeScreenDuration();
-
-        // 开机增加震动 页面启动震动一次
-        // custom_VibratorFunc_int(0);
-
     }
     // 注册开机时间  
     SystemLogData systemlog;  
index 637580d..0e55dbf 100644 (file)
@@ -43,7 +43,6 @@ namespace OHOS
 
     void SetDialPresenter::OnStart()
     {
-        Presenter<SetDialView>::OnStart();
     }
 
     void SetDialPresenter::OnResume(void)
@@ -53,7 +52,7 @@ namespace OHOS
 
     void SetDialPresenter::OnStop(void)
     {
-         model->ClearDialInfo();
+        model->ClearDialInfo();
     }
 
     void SetDialPresenter::OnClickAction(void)
index 170210b..3c30739 100644 (file)
@@ -37,7 +37,7 @@ namespace OHOS
             WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"滚筒流");
             SetUpRollerView();
         }
-
+        
     }
 
     void SetDialView::SetUpCoverflowView(void)
index 2a0955e..9c136c9 100644 (file)
@@ -18,6 +18,7 @@ namespace OHOS
     public:
         SetDialStylePresenter();
         ~SetDialStylePresenter();
+        void OnResume() override;
         SetDialStylePresenter(const SetDialStylePresenter &) = delete;
         SetDialStylePresenter &operator=(const SetDialStylePresenter &) = delete;
         bool OnClick(UIView &view, const ClickEvent &event) override;
index 48e9320..f59447a 100644 (file)
@@ -19,6 +19,11 @@ namespace OHOS
     {
     }
 
+    void SetDialStylePresenter::OnResume(void)
+    {
+        RootView::GetInstance()->SetOnKeyActListener(this);
+    }
+
     bool SetDialStylePresenter::OnClick(UIView &view, const ClickEvent &event)
     {
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDialStylePresenter::OnClick");
index 7b06bf4..7dbb252 100644 (file)
@@ -106,12 +106,6 @@ void custom_VibratorFunc(OHOS::VibratorType vibratorType)
     } 
 }
 
-// // UI 界面震动一次接口
-// void ui_api_vibrate_once_func(void)
-// {
-//     custom_VibratorFunc_int(0);
-// }
-
 static unsigned long g_app_queue= 0xFFFFFFFF;
 
 static bool vibrator_service_running_stat = false;
@@ -192,22 +186,11 @@ errcode_t uapi_vibrator_service_init(void)
     OHOS::VibratorManager::GetInstance()->RegisterVibratorFunc(custom_VibratorFunc);
 
     /* ---------------------------------- 开机震动一次 ---------------------------------- */
-#ifdef BOARD_FD272
+    PRINT("开机震动一次\n");
     custom_VibratorFunc_int(5);
-#else
-    custom_VibratorFunc_int(0);
-#endif
     /* -------------------------------------------------------------------------- */
-    
     return ERRCODE_SUCC;
 }
-
-void uapi_vibrator_service_deinit(void)
-{
-
-}
-
-
 #ifdef __cplusplus
 #if __cplusplus
 }