优化cat1宏控制
authorpenglei <1624952103@qq.com>
Wed, 5 Nov 2025 02:24:49 +0000 (10:24 +0800)
committerpenglei <1624952103@qq.com>
Wed, 5 Nov 2025 02:24:49 +0000 (10:24 +0800)
code/sdk/application/wearable/ln/nativeapp/nativeui/ota/src/OtaModel.cpp
code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp
code/sdk/zhihui/utils/custom_runtime.h

index 13f724d..505d062 100644 (file)
@@ -135,7 +135,7 @@ namespace OHOS
     bool OtaModel::HasNetwork() const
     {
         int networkStatus = 0;
-#ifdef SUPPORT_CAT1_SERVICE
+#if defined(SUPPORT_CAT1_SERVICE) || defined(SUPPORT_PPP_SERVICE)
         // 检查网络连接状态
         networkStatus = uapi_dev_runtime_get_cat1_networkstat();
 #endif
@@ -411,7 +411,7 @@ namespace OHOS
     int OtaModel::GetSignalStrength()
     {
         int sig = 0;
-#ifdef SUPPORT_CAT1_SERVICE
+#if defined(SUPPORT_CAT1_SERVICE) || defined(SUPPORT_PPP_SERVICE)
         sig = uapi_dev_runtime_get_cat1_signal();
 #endif
         return sig; 
index 8fc0d46..5476a2a 100644 (file)
         bool previousHasNetwork = m_hasNetwork;
         
         // 从底层API获取最新的网络状态信息
-        #ifdef SUPPORT_CAT1_SERVICE
+        #if defined(SUPPORT_CAT1_SERVICE) || defined(SUPPORT_PPP_SERVICE)
         m_simStatus = uapi_dev_runtime_get_cat1_simstat();           // SIM卡状态
         m_cat1PowerStatus = uapi_dev_runtime_get_cat1_powerstat();   // CAT1电源状态
         m_signalStrength = uapi_dev_runtime_get_cat1_signal();       // 信号强度
index f6d5893..7217d99 100644 (file)
@@ -181,7 +181,7 @@ void uapi_dev_runtime_set_shutting_down_status(uint8_t status);
 uint8_t uapi_dev_runtime_get_shutting_down_status(void);
 
 
-#ifdef SUPPORT_CAT1_SERVICE
+#if defined(SUPPORT_CAT1_SERVICE) || defined(SUPPORT_PPP_SERVICE)
 /***************************************cat1 runtime 变量设置获取函数**************************************************/