From: Caisking <3449750381@qq.com> Date: Tue, 20 Aug 2024 09:08:04 +0000 (+0800) Subject: 优化省电模式中充电退出逻辑 X-Git-Tag: release_V1.2.70_20241020_135402~617^2~8 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=2f07cc7d071bfc7910e9b0a6eb1adb708947a1e5;p=mirrors%2FFD230.git 优化省电模式中充电退出逻辑 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/saveele/src/SaveEleModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/saveele/src/SaveEleModel.cpp index 1f22e38bc..990c50097 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/saveele/src/SaveEleModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/saveele/src/SaveEleModel.cpp @@ -1,15 +1,4 @@ -/*** - * @Date: 2024-04-15 10:55:58 - * @LastEditors: Caisking 3449750381@qq.com - * @LastEditTime: 2024-08-19 17:07:54 - * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/saveele/src/SaveEleModel.cpp - */ -/*** - * @Date: 2024-04-15 10:55:58 - * @LastEditors: Caisking 3449750381@qq.com - * @LastEditTime: 2024-08-17 16:15:17 - * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/saveele/src/SaveEleModel.cpp - */ + #include "saveele/include/SaveEleModel.h" namespace OHOS @@ -20,11 +9,11 @@ namespace OHOS static SaveEleModel instance; return &instance; } - int SaveEleModel::GetChargeStatus() + bool SaveEleModel::GetChargeStatus() { return chargeStatus_; } - void SaveEleModel::SetChargeStatus(int chargeStatus) + void SaveEleModel::SetChargeStatus(bool chargeStatus) { chargeStatus_ = chargeStatus; } diff --git a/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp b/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp index 9a4c9aa86..7d9ae45c3 100644 --- a/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp @@ -364,7 +364,7 @@ void MsgCenterNotifyChargePlugProc(const Topic topic, Request* req) #if DIALDATASET DialModelCharge::GetInstance()->UpdatechargeStatus(1); #endif - + SaveEleModel::GetInstance()->SetChargeStatus(true); /* ---------------------------------- 充电弹窗 ---------------------------------- */ testCHANINGView *t=testCHANINGView::GetInstance(); if(t!=NULL) @@ -388,7 +388,7 @@ void MsgCenterNotifyChargeUnPlugProc(const Topic topic, Request* req) #if DIALDATASET DialModelCharge::GetInstance()->UpdatechargeStatus(0); #endif - + SaveEleModel::GetInstance()->SetChargeStatus(false); /* ---------------------------------- 充电弹窗 ---------------------------------- */ testCHANINGView *t=testCHANINGView::GetInstance(); if(t!=NULL)