From: 袁清梦 <3449750381@qq.com> Date: Sun, 16 Nov 2025 09:14:51 +0000 (+0000) Subject: Merge #2739 into sdk650pathc0423 from refs/changes/2739/head X-Git-Tag: V1.0.9_20251128_194606_LN~63 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=a8735b80463b95f765f88effc9bd2950bf1f0f99;p=mirrors%2FFD230.git Merge #2739 into sdk650pathc0423 from refs/changes/2739/head Code review from 袁清梦 * refs/changes/2739/head: (2 commits squashed) - 修复视频表盘的息屏卡住的问题 - Merge branch 'sdk650pathc0423' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk650pathc0423 Signed-off-by: Caisking <3449750381@qq.com> Merged-by: aliyun6865282430 <1624952103@qq.com> CR-link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/2739 --- diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/screennotify/src/ui_screennotify.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/screennotify/src/ui_screennotify.cpp index c75a42ce2..a58f0b111 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/screennotify/src/ui_screennotify.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/screennotify/src/ui_screennotify.cpp @@ -157,12 +157,19 @@ void notify_screen_on_event(void) { callback(SCREEN_STATUS_ON); } ChangeToHomeView(); + if (GraphicService::GetInstance()->IsNativeRunning() && !OHOS::NotificationManager::GetInstance()->HasNotifyShowing()) { + OHOS::NativeAbility::GetInstance().ResumeSlice(); // ensure that don't resume twice if switch to home + } } void notify_screen_off_event(void) { for (auto callback : g_callbacks) { callback(SCREEN_STATUS_OFF); } + if (GraphicService::GetInstance()->IsNativeRunning()) { + OHOS::NativeAbility::GetInstance().StopSliceTransition(); // make sure to end slice transition before turning screen off. + OHOS::NativeAbility::GetInstance().PauseSlice(); + } } void set_back_to_home_interval(uint32_t time_sec) { diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/screennotify/src/ui_screennotify.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/screennotify/src/ui_screennotify.cpp index c75a42ce2..a58f0b111 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/screennotify/src/ui_screennotify.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/screennotify/src/ui_screennotify.cpp @@ -157,12 +157,19 @@ void notify_screen_on_event(void) { callback(SCREEN_STATUS_ON); } ChangeToHomeView(); + if (GraphicService::GetInstance()->IsNativeRunning() && !OHOS::NotificationManager::GetInstance()->HasNotifyShowing()) { + OHOS::NativeAbility::GetInstance().ResumeSlice(); // ensure that don't resume twice if switch to home + } } void notify_screen_off_event(void) { for (auto callback : g_callbacks) { callback(SCREEN_STATUS_OFF); } + if (GraphicService::GetInstance()->IsNativeRunning()) { + OHOS::NativeAbility::GetInstance().StopSliceTransition(); // make sure to end slice transition before turning screen off. + OHOS::NativeAbility::GetInstance().PauseSlice(); + } } void set_back_to_home_interval(uint32_t time_sec) { diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/screennotify/src/ui_screennotify.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/screennotify/src/ui_screennotify.cpp index c75a42ce2..a58f0b111 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/screennotify/src/ui_screennotify.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/screennotify/src/ui_screennotify.cpp @@ -157,12 +157,19 @@ void notify_screen_on_event(void) { callback(SCREEN_STATUS_ON); } ChangeToHomeView(); + if (GraphicService::GetInstance()->IsNativeRunning() && !OHOS::NotificationManager::GetInstance()->HasNotifyShowing()) { + OHOS::NativeAbility::GetInstance().ResumeSlice(); // ensure that don't resume twice if switch to home + } } void notify_screen_off_event(void) { for (auto callback : g_callbacks) { callback(SCREEN_STATUS_OFF); } + if (GraphicService::GetInstance()->IsNativeRunning()) { + OHOS::NativeAbility::GetInstance().StopSliceTransition(); // make sure to end slice transition before turning screen off. + OHOS::NativeAbility::GetInstance().PauseSlice(); + } } void set_back_to_home_interval(uint32_t time_sec) {