From: 胡传军 <1224667075@qq.com> Date: Mon, 21 Oct 2024 07:04:28 +0000 (+0000) Subject: Merge #1229 into sdk602patch0911 from refs/changes/1229/head X-Git-Tag: fd230_release_V1.3.102~215^2~1 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=d227f4533709eee624785f809260839216ecc243;p=mirrors%2FFD230.git Merge #1229 into sdk602patch0911 from refs/changes/1229/head Code review from 胡传军 * refs/changes/1229/head: (11 commits squashed) - 先关闭4G电话对麦克风管理,可能导致音频系统锁死 - 修复电话界面动画问题 - Merge branch 'sdk602patch0911' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into 0911 - 增加最大数量表盘限制,待测试 ,修改BLE打印日志 - 修改获取全部表盘id接口防止越界 - 电话修改 - Merge branch 'sdk602patch0911' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into 0911 - 优化电话中再呼叫SOS - 合并 - 增加蓝牙更改广播参数接口 - 产测蓝牙广播频率修改 Signed-off-by: aliyun8003852482 <1224667075@qq.com> Reviewed-by: snickersun@163.com Merged-by: snickersun@163.com CR-link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/1229 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/callerlog/src/CallerLogModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/callerlog/src/CallerLogModel.cpp index 04b870c17..29286fb76 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/callerlog/src/CallerLogModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/callerlog/src/CallerLogModel.cpp @@ -194,7 +194,7 @@ static void CallTimerCallbackProc(int data) } { - if(get_call_hungup_flag()>=2) + if(get_call_hungup_flag()>=1) { cat1_handle_call_disconnected((char *)CallerLogModel::GetInstance()->GetPhoneNumber().c_str()); } @@ -778,7 +778,6 @@ static void ScoConnectHandle(void) TransCallToMobilePhone(); return; } - CallerLogModel::GetInstance()->SetDialingStatus("正在拨号"); CallerLogModel::GetInstance()->SetMakePhoneStatus(true); diff --git a/code/sdk/application/wearable/nativeabilityfwk/include/Ability.h b/code/sdk/application/wearable/nativeabilityfwk/include/Ability.h index 5db5bcd6c..69136fd70 100755 --- a/code/sdk/application/wearable/nativeabilityfwk/include/Ability.h +++ b/code/sdk/application/wearable/nativeabilityfwk/include/Ability.h @@ -61,6 +61,8 @@ public: return allSlices_[allSlices_.size() - 2]; } + + void SetCurSlicePriority(const uint16_t priority) { curSlicePriority_ = priority; } @@ -85,6 +87,14 @@ public: ChangeSlice(sliceId,transitionId,priority); // 切换到新的Slice } + uint16_t GettopSliceId(void) { + if (!backStack_.empty() ) { + return backStack_.top(); + } + return 0; + } + + // 处理后退操作 /// @brief 处理后退操作。 diff --git a/code/sdk/application/wearable/nativeabilityfwk/src/Ability.cpp b/code/sdk/application/wearable/nativeabilityfwk/src/Ability.cpp index 8ae0503de..77c699880 100755 --- a/code/sdk/application/wearable/nativeabilityfwk/src/Ability.cpp +++ b/code/sdk/application/wearable/nativeabilityfwk/src/Ability.cpp @@ -141,7 +141,12 @@ namespace OHOS if (targetSliceId == VIEW_INCOMING_CALL) { uint16_t id=GetCurSliceId(); - if(id!=VIEW_INCOMING_CALL) + if(id==VIEW_REBOOTANDSHUTDOWN && VIEW_INCOMING_CALL==GettopSliceId()) + { + ClearSliceIdStack(); + } + + if(id!=VIEW_INCOMING_CALL) make_phone_push(id); } // showsStackSliceId(); diff --git a/code/sdk/application/wearable/service/ble_service/bleservice/bleService.c b/code/sdk/application/wearable/service/ble_service/bleservice/bleService.c index 999a37fa5..848c3c523 100644 --- a/code/sdk/application/wearable/service/ble_service/bleservice/bleService.c +++ b/code/sdk/application/wearable/service/ble_service/bleservice/bleService.c @@ -378,6 +378,37 @@ static void svr_ble_adv_data_set(int adv_id) } +void svr_ble_adv_factory_test_start_param(void) +{ + errcode_t ret = 0; + int adv_id = BLE_ADV_ID; + if (ble_adv_falg == 1) { //已经开始广播了,不需要重复开启广播 + ret=gap_ble_stop_adv(adv_id); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ble adv need restart , gap_ble_stop_adv ret %x\n",ret); + osDelay(50); + } + + gap_ble_adv_params_t adv_para; + memset_s(&adv_para, sizeof(gap_ble_adv_params_t), 0, sizeof(gap_ble_adv_params_t)); + + adv_para.min_interval = 0x64;//0x640; + adv_para.max_interval = 0x64; + adv_para.adv_type = GAP_BLE_ADV_CONN_SCAN_UNDIR; + //adv_para.tx_power=20; + adv_para.channel_map = 0x07; + adv_para.duration = 0; + + gap_ble_set_adv_param(adv_id, &adv_para);//设置广播参数 + gap_ble_set_local_appearance(GAP_BLE_APPEARANCE_TYPE_GENERIC_WATCH);//仅是手表 + svr_ble_adv_data_set(adv_id);//开始广播和扫描数据 + ble_adv_falg = 1; + ret = gap_ble_start_adv(adv_id); + if (ret) { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "svr_ble_adv_start bt gap_ble_start_adv1 ret = 0x%x", ret); + } + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "svr_ble_adv_start bt gap_ble_start_adv2 ret = 0x%x", ret); +} + void svr_ble_adv_start_param(void) @@ -1944,6 +1975,9 @@ void Check_ble_adv_status(void) { if(AdverFlag) { + if(uapi_dev_runtime_get_factory_test_status_flag()) + svr_ble_adv_factory_test_start_param(); + else svr_ble_adv_start_param(); } diff --git a/code/sdk/application/wearable/service/ble_service/bleservice/bleService.h b/code/sdk/application/wearable/service/ble_service/bleservice/bleService.h index 1a0f42923..ba3154460 100644 --- a/code/sdk/application/wearable/service/ble_service/bleservice/bleService.h +++ b/code/sdk/application/wearable/service/ble_service/bleservice/bleService.h @@ -44,6 +44,8 @@ void get_phone_addr(bd_addr_t *addr,uint16_t conn_id); void svr_ble_adv_start_param(void);//开始蓝牙广播 +void svr_ble_adv_factory_test_start_param(void);//特殊版蓝牙广播 + void srv_ble_server_register_gap_ble_callbacks(void); bool ble_gatts_cmp_uuid(const bt_uuid_t *tgt_uuid, const bt_uuid_t *src_uuid); void srv_ble_server_register_gatt_callbacks(void); diff --git a/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp b/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp index cd1ab011d..67d5b9c54 100755 --- a/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp @@ -66,6 +66,12 @@ void sos_falg_add(void) { if(sos_dail_falg) { + if(OHOS::get_sos_number_count()<=0) + { + sos_dail_falg=0; + return; + } + printf("sos dial %d\r\n",sos_dail_falg); #if SOS_TEST_FLAG if(1) @@ -100,6 +106,10 @@ void sos_falg_clean(void) void start_SOS_phone_dail(void) { + if(OHOS::get_sos_number_count()<=0) + { + return; + } #if SOS_TEST_FLAG if(1) #else