From efc412ed2715e8596a7d6e874b0c820e40e28d8c Mon Sep 17 00:00:00 2001 From: xue <2144439972@qq.com> Date: Sun, 2 Nov 2025 09:49:13 +0800 Subject: [PATCH] =?utf8?q?=E5=85=85=E7=94=B5=E7=8A=B6=E6=80=81OTA=E4=B8=8D?= =?utf8?q?=E5=88=A4=E6=96=AD=E7=94=B5=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../wearable/ln/nativeapp/nativeui/ota/src/OtaModel.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.17.1