From: luozheng <1732036298@qq.com> Date: Wed, 29 May 2024 04:45:12 +0000 (+0800) Subject: makephone 文件夹更新 X-Git-Tag: release_V1.2.70_20241020_135402~1080 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=a497f5b052cbea4e35e24711af8019c220c3fc68;p=mirrors%2FFD230.git makephone 文件夹更新 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/makephone/include/MainCallingPresenter.h b/code/sdk/application/wearable/fd230app/nativeui/makephone/include/MainCallingPresenter.h index 28739ffe5..9973279ce 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/makephone/include/MainCallingPresenter.h +++ b/code/sdk/application/wearable/fd230app/nativeui/makephone/include/MainCallingPresenter.h @@ -19,7 +19,7 @@ class MainCallingView; class MainCallingPresenter : public Presenter, public UIView::OnClickListener { public: MainCallingPresenter(); - virtual ~MainCallingPresenter(); + ~MainCallingPresenter() override; void OnStart() override; void OnPause() override; @@ -31,12 +31,13 @@ public: bool CallingViewDisplay(); bool InitPointerValue(); bool OnClick(UIView& view, const ClickEvent& event) override; + VolumeSettingView *GetvolumeSetting(); private: int changeImage{0}; bool HintsHandupClick(); KeyInputListener *keyActListenr{nullptr}; VolumeSettingView *volumeSetting{nullptr}; - UIViewGroup *volumeSettingView{nullptr}; + }; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallerDisplayView.cpp b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallerDisplayView.cpp index 86620c0a1..7c14e3128 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallerDisplayView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallerDisplayView.cpp @@ -139,17 +139,17 @@ UIViewGroup *CallerDisplayView::CreateUIViewGroup() group->SetPosition(MATH_ZERO, MATH_ZERO); group->Resize(VERTICAL_RESOLUTION, HORIZONTAL_RESOLUTION); // 454 : value - if (InitImageViewDisplay() == false) { + if (!InitImageViewDisplay()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallerDisplayView::InitImageViewDisplay error"); return nullptr; } - if (InitAddOnclickevent() == false) { + if (!InitAddOnclickevent()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallerDisplayView::InitAddOnclickevent error"); return nullptr; } - if (InitUILabelDisplay() == false) { + if (!InitUILabelDisplay()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallerDisplayView::InitUILabelDisplay error"); return nullptr; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallingView.cpp b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallingView.cpp index e487b164d..3034ea70d 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallingView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallingView.cpp @@ -164,7 +164,7 @@ bool CallingView::InitUILabelDisplay() VIEW_DISTANCE_TO_LEFT_SIDE, TITLE_LABEL_DEFAULT_HEIGHT); callDuration->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT); callDuration->SetAlign(TEXT_ALIGNMENT_CENTER); - callDuration->SetText(CallerLogModel::GetInstance()->DisplayCallDuration()); + callDuration->SetText(CallerLogModel::GetInstance()->DisplayCallDuration().c_str()); callDuration->SetFont(DEFAULT_VECTOR_FONT_FILENAME, LABEL_TIME_FONT_SIZE); callDuration->SetTextColor(Color::White()); group->Add(callDuration); @@ -195,17 +195,17 @@ UIViewGroup *CallingView::CreateUIViewGroup() group->SetPosition(MATH_ZERO, MATH_ZERO); group->Resize(VERTICAL_RESOLUTION, HORIZONTAL_RESOLUTION); // 454 : value - if (InitImageViewDisplay() == false) { + if (!InitImageViewDisplay()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallingView::InitImageViewDisplay error"); return nullptr; } - if (InitAddOnclickevent() == false) { + if (!InitAddOnclickevent()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallingView::InitAddOnclickevent error"); return nullptr; } - if (InitUILabelDisplay() == false) { + if (!InitUILabelDisplay()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallingView::InitUILabelDisplay error"); return nullptr; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/DialingScreenView.cpp b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/DialingScreenView.cpp index 2ad9945f4..f9b20d5db 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/DialingScreenView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/DialingScreenView.cpp @@ -124,7 +124,7 @@ UIViewGroup *DialingScreenView::CreateUIViewGroup() group->SetPosition(MATH_ZERO, MATH_ZERO); group->Resize(VERTICAL_RESOLUTION, HORIZONTAL_RESOLUTION); // 454 : value - if (InitUILabelDisplay() == false) { + if (!InitUILabelDisplay()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DialingScreenView::InitImageViewDisplay error"); return nullptr; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingPresenter.cpp index 1f8a2e751..85ecc6940 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingPresenter.cpp @@ -30,9 +30,8 @@ MainCallingPresenter::~MainCallingPresenter() { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainCallingPresenter::~MainCallingPresenter"); RootView::GetInstance()->RemoveAll(); - if (volumeSettingView != nullptr) { - delete volumeSettingView; - volumeSettingView = nullptr; + if (volumeSetting != nullptr) { + delete volumeSetting; volumeSetting = nullptr; } g_pMainView = nullptr; @@ -70,13 +69,13 @@ void MainCallingPresenter::OnStop(void) void MainCallingPresenter::HonrsViewChange() { - if (volumeSettingView == nullptr) { + if (volumeSetting == nullptr) { volumeSetting = new VolumeSettingView(); if (volumeSetting == nullptr) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainCallingPresenter::volumeSetting nullptr err"); return; } - if (volumeSetting->SetUpVolume() == false) { + if (!volumeSetting->SetUpVolume()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainCallingPresenter::volumeSetting SetUpVolume fail"); return; } @@ -85,10 +84,9 @@ void MainCallingPresenter::HonrsViewChange() ImageInfo *image = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_MUTE_BUTTON, PLAYER_IAMGES); volumeSetting->GetDecreaseButton()->SetImageSrc(image, image); } - volumeSettingView = volumeSetting; - RootView::GetInstance()->Add(volumeSettingView); + RootView::GetInstance()->Add(volumeSetting); } - VolumeSliderEventListener *volumeSliderEventListener = VolumeSliderEventListener::GetInstance(); + VolumeSliderEventListener *volumeSliderEventListener = volumeSetting->GetVolumeEventListener(); if (volumeSliderEventListener == nullptr) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainCallingPresenter::volumeSliderEventListener nullptr err"); return; @@ -96,7 +94,7 @@ void MainCallingPresenter::HonrsViewChange() volumeSliderEventListener->SetPlayerCoefficients(VOLUMEPHONE); // 进度条系数 - if (InitPointerValue() == false) { + if (!InitPointerValue()) { return; } @@ -105,14 +103,14 @@ void MainCallingPresenter::HonrsViewChange() view_->GetCallingGroup()->SetVisible(false); view_->GetWaitingGroup()->SetVisible(false); - volumeSettingView->SetVisible(true); + volumeSetting->SetVisible(true); // 刷新UI RootView::GetInstance()->Invalidate(); } bool MainCallingPresenter::CallingViewDisplay() { - if (InitPointerValue() == false) { + if (!InitPointerValue()) { return false; } view_->GetScreenGroup()->SetVisible(false); @@ -174,7 +172,7 @@ bool MainCallingPresenter::HintsHandupClick() } CallerLogModel::GetInstance()->SetWaitingStatus(false); CallerLogModel::GetInstance()->SetCallStatus(true); - NativeAbility::GetInstance().ChangeSlice(VIEW_INCOMING_CALL, TransitionType::TRANSITION_ZOOM ,PRIORITY_ONE); + NativeAbility::GetInstance().ChangeSlice(VIEW_INCOMING_CALL, TransitionType::TRANSITION_INVALID, PRIORITY_ONE); return true; } @@ -182,7 +180,7 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event) { UNUSED(event); - if (InitPointerValue() == false) { + if (!InitPointerValue()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainCallingPresenter::InitPointerValue error"); return false; } @@ -216,7 +214,7 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event) WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainCallingPresenter::honrs show"); HonrsViewChange(); } else if (strcmp(view.GetViewId(), "hintsHandup") == 0) { - if (HintsHandupClick() == false) { + if (!HintsHandupClick()) { return false; } } else if (strcmp(view.GetViewId(), "answer") == 0) { @@ -232,4 +230,9 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event) } return true; } + +VolumeSettingView *MainCallingPresenter::GetvolumeSetting() +{ + return volumeSetting; +} } \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingView.cpp b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingView.cpp index c2cc2479a..36031b779 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingView.cpp @@ -132,15 +132,15 @@ void MainCallingView::OnStart() waitingGroup->SetVisible(false); callingGroup->SetVisible(false); - if (CallerLogModel::GetInstance()->GetCallStatus() == true) { + if (CallerLogModel::GetInstance()->GetCallStatus()) { displayGroup->SetVisible(false); callingGroup->SetVisible(true); screenGroup->SetVisible(false); - } else if (CallerLogModel::GetInstance()->GetWaitingStatus() == true) { + } else if (CallerLogModel::GetInstance()->GetWaitingStatus()) { screenGroup->SetVisible(false); displayGroup->SetVisible(false); waitingGroup->SetVisible(true); - } else if (CallerLogModel::GetInstance()->GetPhoneStatus() == true) { + } else if (CallerLogModel::GetInstance()->GetPhoneStatus()) { displayGroup->SetVisible(false); } else { screenGroup->SetVisible(false); @@ -153,7 +153,7 @@ void MainCallingView::OnSetUpView() { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainCallingView::~OnSetUpView"); View::OnSetUpView(); - if (CallerLogModel::GetInstance()->GetMulitplePhoneStatus() == true) { + if (CallerLogModel::GetInstance()->GetMulitplePhoneStatus()) { MulitplePhoneTextReplaces(); CallerLogModel::GetInstance()->SetMulitplePhoneStatus(false); } diff --git a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/WaitingHintsView.cpp b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/WaitingHintsView.cpp index 7d810f49f..6a41adbb8 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/WaitingHintsView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/WaitingHintsView.cpp @@ -50,10 +50,10 @@ UIViewGroup *WaitingHintsView::CreateUIViewGroup() group->SetPosition(MATH_ZERO, MATH_ZERO); group->Resize(VERTICAL_RESOLUTION, HORIZONTAL_RESOLUTION); // 454 : value - if (InitImageViewDisplay() == false) { + if (!InitImageViewDisplay()) { return nullptr; } - if (InitUILabelDisplay() == false) { + if (!InitUILabelDisplay()) { return nullptr; } return group;