From: xue <2144439972@qq.com> Date: Sun, 2 Nov 2025 01:49:13 +0000 (+0800) Subject: 充电状态OTA不判断电量 X-Git-Tag: V1.0.9_20251128_194606_LN~135 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F2653%2Ftarget%2F1;p=mirrors%2FFD230.git 充电状态OTA不判断电量 --- diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/ota/src/OtaModel.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/ota/src/OtaModel.cpp index 8a6294285..3f3236dbb 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/ota/src/OtaModel.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/ota/src/OtaModel.cpp @@ -141,12 +141,16 @@ namespace OHOS bool OtaModel::IsBatterySufficient() const { + if(IsBatteryCharging() == true)//充电时,不检查电量 + { + return true; + } float voltage = 0.0F; int Batteryvalue = 0; #ifdef SUPPORT_BATTERY_SERVICE Batteryvalue = battery_get_voltage(&voltage); #endif - return (Batteryvalue >= 50); + return (Batteryvalue >= 30); } bool OtaModel::IsMemorySufficient() const