From: hcj <1224667075@qq.com> Date: Mon, 21 Oct 2024 02:55:29 +0000 (+0800) Subject: 优化电话中再呼叫SOS X-Git-Tag: fd230_release_V1.3.102~193^2~1^2~18 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=8160a22e4ad72ae439dbfed8de6f31fdf25f6947;p=mirrors%2FFD230.git 优化电话中再呼叫SOS --- 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..b3511458e 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,7 @@ 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/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