${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemModel.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemAboutTheWatchView.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemSuperviseView.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemLanguageView.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemLanguageView.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/Systemupgrade.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemFactoryResetView.cpp
#声音与震动
g_callTimes=0;
}
+int get_g_callTimes()
+{
+ return g_callTimes;
+}
void g_callTimesadd()
{
g_callTimes++;
PhoneServiceScoStatusCb scoStatusCb;
} PhoneServiceCb;
+
+void AddToCallLog(CallLogInfo *info);
/**
* @brief 注册电话服务回调函数
*
}
// 添加通话进通话记录文件
-static void AddToCallLog(CallLogInfo *info)
+void AddToCallLog(CallLogInfo *info)
{
FILE *fp = NULL;
size_t ret;
#include "system/include/SystemSuperviseView.h"\r
#include "system/include/SystemLanguageView.h"\r
#include "system/include/SystemFactoryResetView.h"\r
+#include "system/include/Systemupgrade.h"\r
namespace OHOS\r
{\r
static const char *ABOUT_THE_WATCH = "AboutTheWatchButton"; // 关于手表\r
bool ChangeSystemSuperviseView(int16_t thisView);\r
bool ChangeSystemLanguageView(int16_t thisView);\r
bool ChangeSystemFactoryResetView(int16_t thisView);\r
+ bool ChangeSystemupgradeView(int16_t thisView);\r
bool ClickFunc(int16_t interface);\r
void ChangeView(int16_t hideView, int16_t showView);\r
UIScrollView *GetSystemScrollView(int ViewId);\r
SystemSuperviseView *p_SystemSuperviseView{nullptr};\r
SystemLanguageView *p_SystemLanguageView{nullptr};\r
SystemFactoryResetView *p_SystemFactoryResetView{nullptr};\r
- UIScrollView *SystemScrollView[5]{nullptr};\r
+ SystemupgradeView *p_SystemupgradeView{nullptr};\r
+\r
+ UIScrollView *SystemScrollView[10]{nullptr};\r
UILabel *SystemLabel{nullptr}; // 标题\r
UIButton *AboutTheWatchButton{nullptr};\r
UIButton *SuperviseButton = {nullptr};\r
--- /dev/null
+#ifndef SYSTEM_UPGRADE_VIEW_H
+#define SYSTEM_UPGRADE_VIEW_H
+
+#include "BaseView.h"
+#include "View.h"
+
+#include "components/ui_image_view.h"
+#include "components/ui_button.h"
+#include "components/ui_scroll_view.h"
+#include "components/ui_label.h"
+#include "components/ui_label_button_ext.h"
+
+namespace OHOS
+{
+ class SystemupgradeView
+ {
+
+ public:
+ SystemupgradeView();
+ virtual ~SystemupgradeView();
+ static SystemupgradeView *GetInstance(void);
+
+ UIScrollView *SystemupgradeViewInit(void);
+ void ClearAll(void);
+
+ struct LabelConfig
+ {
+ int16_t left;
+ int16_t top;
+ int16_t width;
+ int16_t height;
+ int16_t fontSize; // 字体大小
+ int16_t lineHeigh; // 行高
+ char *text; // 文本
+ uint8_t lineBreakMode; // 断行模式。
+ };
+ UILabel *InitLabel(LabelConfig &labelConfig);
+
+ private:
+ UIScrollView *scrollView{nullptr};
+ UIImageView *FactoryResetImage{nullptr}; // 恢复出厂设置背景图片
+ UIButton *FactoryResetButtonCheckOn{nullptr}; // 重置确认
+ UIButton *FactoryResetButtonCheckOff{nullptr}; // 重置否定
+
+ UILabel *systemupgrade{nullptr}; // "固件版本"
+
+ UILabel *FirmwareVersionTitle{nullptr}; // "固件版本"
+ UILabel *FirmwareVersion{nullptr};
+
+ UILabel *newVersionTitle{nullptr}; // "最新软件版本"
+ UILabel *newVersion{nullptr};
+
+
+ bool initViewStatus{false};
+ };
+} // namespace OHOS
+#endif
\ No newline at end of file
//int len=5;\r
// 根据控件id查找是哪个控件触发了点击回调\r
\r
- for(int i=0;i<5;i++)\r
+ for(int i=0;i<len;i++)\r
{\r
if(strcmp(view.GetViewId(),ViewMapper_t[i].viewid_str) == 0)\r
{\r
SystemView::GetInstance()->ChangeView(SYSTEMVIEW, ViewMapper_t[i].viewId);\r
return true;\r
}\r
-\r
}\r
\r
\r
- if (strcmp(view.GetViewId(), FACTORYRESET_CHECKON) == 0)\r
+ if (strcmp(view.GetViewId(), FACTORYRESET_CHECKON) == 0)\r
{\r
+ p_SystemView->ChangeView(FACTORYRESETVIEW, SYSTEMVIEW);\r
return true;\r
}\r
else if (strcmp(view.GetViewId(), FACTORYRESET_CHECKOFF) == 0)\r
{SUPERVISEVIEW,"SuperviseButton","监管模式",&SystemView::ChangeSystemSuperviseView},\r
{SYSTEMLANGUAGEVIEW,"SystemLanguageButton","切换语言", &SystemView::ChangeSystemLanguageView},\r
{FACTORYRESETVIEW,"FactoryResetButton","恢复出厂", &SystemView::ChangeSystemFactoryResetView},\r
- {SYSTEMLUPGRADE,"systemupgread","系统升级",&SystemView::ChangeSystemFactoryResetView},\r
+ {SYSTEMLUPGRADE,"systemupgread","系统升级",&SystemView::ChangeSystemupgradeView},\r
\r
// {ABOUTTHEWATCHVIEW, &SystemView::ChangeSystemAboutView},\r
// {SUPERVISEVIEW, &SystemView::ChangeSystemSuperviseView},\r
delete draglistener;\r
draglistener = nullptr;\r
}\r
- for(int i=0;i<MAX_SYSTEMVIEWID-1;i++)\r
- {\r
- delete button[i];\r
- button[i] = nullptr;\r
-\r
- }\r
delete p_SystemAboutTheWatchView;\r
p_SystemAboutTheWatchView = nullptr;\r
delete p_SystemSuperviseView;\r
SystemLanguageButton = nullptr;\r
delete FactoryResetButton;\r
FactoryResetButton = nullptr;\r
+\r
delete SystemScrollView[SYSTEMVIEW];\r
SystemScrollView[SYSTEMVIEW] = nullptr;\r
}\r
return true;\r
}\r
\r
+ bool SystemView::ChangeSystemupgradeView(int16_t thisView)\r
+ {\r
+ if (SystemScrollView[thisView] == nullptr)\r
+ {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::ChangeSystemFactoryResetView");\r
+ p_SystemupgradeView = new SystemupgradeView();\r
+ if (p_SystemupgradeView == nullptr)\r
+ {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView:: new scrollView[%d] fail", thisView);\r
+ return false;\r
+ }\r
+ SystemScrollView[thisView] = p_SystemupgradeView->SystemupgradeViewInit();\r
+ RootView::GetInstance()->Add(SystemScrollView[thisView]);\r
+ }\r
+ return true;\r
+ }\r
+\r
+\r
UIScrollView *SystemView::GetSystemScrollView(int ViewId)\r
{\r
if (SystemScrollView[ViewId] == nullptr)\r
--- /dev/null
+#include "system/include/Systemupgrade.h"
+#include "system/include/SystemPresenter.h"
+#include "wearable_log.h"
+#include "UiConfig.h"
+#include "custom_utils.h"
+namespace OHOS
+{
+
+ static SystemupgradeView *g_pSystemFactoryResetView{nullptr};
+
+ SystemupgradeView::SystemupgradeView()
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemFactoryResetView::SystemFactoryResetView");
+ g_pSystemFactoryResetView = this;
+ }
+
+ SystemupgradeView::~SystemupgradeView()
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemFactoryResetView::~SystemFactoryResetView");
+ ClearAll();
+ g_pSystemFactoryResetView = nullptr;
+ }
+
+ SystemupgradeView *SystemupgradeView::GetInstance()
+ {
+ return g_pSystemFactoryResetView;
+ }
+
+ void SystemupgradeView::ClearAll()
+ {
+ if (initViewStatus == true)
+ {
+ scrollView->RemoveAll();
+ delete FactoryResetImage;
+ FactoryResetImage = nullptr;
+ delete FactoryResetButtonCheckOn;
+ FactoryResetButtonCheckOn = nullptr;
+ delete FactoryResetButtonCheckOff;
+ FactoryResetButtonCheckOff = nullptr;
+ delete scrollView;
+ scrollView = nullptr;
+ }
+ }
+
+ UILabel *SystemupgradeView::InitLabel(LabelConfig &labelConfig)
+ {
+ UILabel *label = new UILabel();
+ if (label == nullptr)
+ {
+ return nullptr;
+ }
+ label->SetPosition(labelConfig.left, labelConfig.top, labelConfig.width, labelConfig.height); // 位置大小
+ label->SetStyle(STYLE_TEXT_FONT, labelConfig.fontSize); // 字体大小
+ label->SetStyle(STYLE_LINE_HEIGHT, labelConfig.lineHeigh); // 字体行高
+ label->SetText(labelConfig.text); // 内容
+ label->SetLineBreakMode(labelConfig.lineBreakMode); // 断行模式。
+ label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_TOP);
+ label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, labelConfig.fontSize);
+ return label;
+ }
+
+ UIScrollView *SystemupgradeView::SystemupgradeViewInit(void)
+ {
+
+ scrollView = new UIScrollView();
+ if (scrollView == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemFactoryResetView::new scrollView fail!");
+ return nullptr;
+ }
+ scrollView->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
+ scrollView->SetStyle(STYLE_BACKGROUND_OPA, 0xff);
+ scrollView->SetStyle(STYLE_BORDER_RADIUS, 1294);
+ scrollView->SetScrollBlankSize(35);
+ scrollView->SetReboundSize(50);
+ scrollView->SetDirection(1);
+
+ UIView::OnDragListener *draglistener = static_cast<UIView::OnDragListener *>(SystemPresenter::GetInstance());
+ if (draglistener == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::draglistener can not be nullptr!");
+ return NULL;
+ }
+ scrollView->SetOnDragListener(draglistener);
+ scrollView->SetTouchable(true);
+ scrollView->SetDraggable(true);
+
+ LabelConfig Config = {
+ .left = 190,
+ .top = 52,
+ .width = 60,
+ .height = 35,
+ .fontSize = 30,
+ .lineHeigh = 35,
+ .text = "系统升级",
+ .lineBreakMode = UILabel::LINE_BREAK_ADAPT,
+ };
+ systemupgrade = InitLabel(Config);
+ if (systemupgrade == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::SystemAboutTheWatchTitle new fail!");
+ return nullptr;
+ }
+ scrollView->Add(systemupgrade);
+
+ /* -------------------------------------------------------------------------- */
+ Config = {
+ .left = 168,
+ .top = 105,
+ .width = 120,
+ .height = 35,
+ .fontSize = 30,
+ .lineHeigh = 35,
+ .text = "当前固件版本",
+ .lineBreakMode = UILabel::LINE_BREAK_ADAPT,
+ };
+ FirmwareVersionTitle = InitLabel(Config);
+ if (FirmwareVersionTitle == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::FirmwareVersionTitle new fail!");
+ return nullptr;
+ }
+ scrollView->Add(FirmwareVersionTitle);
+
+ char version_buf[128]={0};
+ uint32_t version_len=128;
+ uapi_get_buildversion((uint8_t*)version_buf,version_len);
+ Config = {
+ .left = 37,
+ .top = 110,
+ .width = 400,
+ .height = 30,
+ .fontSize = 26,
+ .lineHeigh = 30,
+ .text = (char*)version_buf,
+ .lineBreakMode = UILabel::LINE_BREAK_WRAP,
+ };
+ FirmwareVersion = InitLabel(Config);
+ if (FirmwareVersion == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::FirmwareVersion new fail!");
+ return nullptr;
+ }
+ FirmwareVersion->SetTextColor(Color::GetColorFromRGBA(0xff, 0xff, 0xff, 0x87));
+ scrollView->Add(FirmwareVersion);
+
+ Config = {
+ .left = 168,
+ .top = 200,
+ .width = 120,
+ .height = 35,
+ .fontSize = 30,
+ .lineHeigh = 35,
+ .text = "最新固件版本",
+ .lineBreakMode = UILabel::LINE_BREAK_ADAPT,
+ };
+ newVersionTitle = InitLabel(Config);
+ if (newVersionTitle == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::FirmwareVersionTitle new fail!");
+ return nullptr;
+ }
+ scrollView->Add(newVersionTitle);
+
+ char version_buf_1[128]={0};
+ version_len=128;
+ uapi_get_buildversion((uint8_t*)version_buf_1,version_len);
+ Config = {
+ .left = 37,
+ .top = 210,
+ .width = 400,
+ .height = 30,
+ .fontSize = 26,
+ .lineHeigh = 30,
+ .text = (char*)version_buf_1,
+ .lineBreakMode = UILabel::LINE_BREAK_WRAP,
+ };
+ newVersion = InitLabel(Config);
+ if (FirmwareVersion == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::FirmwareVersion new fail!");
+ return nullptr;
+ }
+ newVersion->SetTextColor(Color::GetColorFromRGBA(0xff, 0xff, 0xff, 0x87));
+ scrollView->Add(newVersion);
+
+ UILabelButtonExt * SystemUpgradeButton = new UILabelButtonExt();
+ if (SystemUpgradeButton == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::SystemUpgradeButtonExt new fail!");
+ }
+ SystemUpgradeButton->SetPosition(43, 400, 100, 100);
+ SystemUpgradeButton->SetViewId(SYSTEM_UPGRADE);
+ SystemUpgradeButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);
+ //SystemUpgradeButton->SetImagePosition(326, 37);
+ //SystemUpgradeButton->SetImageSrc("/user/res/SETTING_NEXT.bin", "/user/res/SETTING_NEXT.bin");
+ SystemUpgradeButton->SetText("开始下载");
+ SystemUpgradeButton->SetAlign(TEXT_ALIGNMENT_LEFT);
+ SystemUpgradeButton->SetLabelPosition(45, 0);
+ SystemUpgradeButton->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+ SystemUpgradeButton->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED);
+ scrollView->Add(SystemUpgradeButton);
+
+ UILabelButtonExt * SystemUpgradeButton_2 = new UILabelButtonExt();
+ if (SystemUpgradeButton == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::SystemUpgradeButtonExt new fail!");
+ }
+ SystemUpgradeButton_2->SetPosition(163, 400, 100, 100);
+ SystemUpgradeButton_2->SetViewId(SYSTEM_UPGRADE);
+ SystemUpgradeButton_2->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);
+ //SystemUpgradeButton->SetImagePosition(326, 37);
+ //SystemUpgradeButton->SetImageSrc("/user/res/SETTING_NEXT.bin", "/user/res/SETTING_NEXT.bin");
+ SystemUpgradeButton_2->SetText("开始升级");
+ SystemUpgradeButton_2->SetAlign(TEXT_ALIGNMENT_LEFT);
+ SystemUpgradeButton_2->SetLabelPosition(45, 0);
+ SystemUpgradeButton_2->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 20);
+ SystemUpgradeButton_2->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED);
+
+
+ UIView::OnClickListener *Click = static_cast<UIView::OnClickListener *>(SystemPresenter::GetInstance());
+ SystemUpgradeButton_2->SetOnClickListener(Click);
+ scrollView->Add(SystemUpgradeButton_2);
+ //SystemUpgradeButton->SetOnClickListener(clickListener);
+
+
+
+
+ return scrollView;
+ }
+
+}
\ No newline at end of file
};\r
void g_callTimesclean();\r
void g_callTimesadd();\r
+int get_g_callTimes();\r
bool MulitplePhoneTextReplaces();\r
bool FindCallListInfoAndSetPriorityNumber();\r
void PhoneScoStatausCallback(hfp_sco_connect_state_t state);\r
PhoneServiceScoStatusCb scoStatusCb;
} PhoneServiceCb;
+void AddToCallLog(CallLogInfo *info);
/**
* @brief 注册电话服务回调函数
*
}
// 添加通话进通话记录文件
-static void AddToCallLog(CallLogInfo *info)
+void AddToCallLog(CallLogInfo *info)
{
FILE *fp = NULL;
size_t ret;
#include "cat1_server_hal.h"
#include "NativeAbility.h"
+#include "custom_utils.h"
+
namespace OHOS {
int changeImage = 0;
osTimerId_t g_callDuration = NULL; // timer of call duration
UILabel *diallabl2 = nullptr;
UIButton *button1dial = nullptr;
+uint8 call_stat=0;
+PhoneCallInfo *phoneCall = NULL;
+
+// typedef struct {
+// char name[NAME_SIZE];
+// unsigned char nameLen;
+// unsigned char tel[MAX_PHONE_NUM];
+// unsigned char telLen;
+ CallFinishStatus status;
+// uint64 creationTime; // 通话创建时间(不是接通时间)
+// uint64 callDurTime; // 通话持续时间
+// } CallLogInfo;
+
+CallLogInfo info;
+void calllog_info_init()
+{
+ strcpy(info.name,"xxx");
+ info.nameLen=3;
+ int len=strlen(CallerLogModel::GetInstance()->GetPhoneNumber().c_str());
+ memcpy_s(info.tel,20,CallerLogModel::GetInstance()->GetPhoneNumber().c_str(),len+1);
+ uapi_get_timestampe_ms(&info.creationTime);
+ info.callDurTime=0;
+
+ info.telLen=len;
+
+
+}
+void addcalllog()
+{
+ if(call_stat==0)
+ info.status=CALL_OUTGOING;
+ if(call_stat==1)
+ info.status=CALL_INCOMING;
+ if(call_stat==2)
+ info.status=CALL_MISSED;
+
+ AddToCallLog(&info);
+}
+
+// PhoneCallInfo tmp;
+
+// WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeFinishPro] start g_scoFlag = %d, g_currCallNum = %d",
+// g_scoFlag, g_currCallNum);
+// if (call == NULL || g_currCallNum == 0) {
+// return;
+// }
+
+ //phoneCall = FindCallInfoInCallList((const unsigned char*)call->number, call->number_len);
+// if (phoneCall == NULL) {
+// WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeFinishPro] FindCallInfoInCallList Finish no this call");
+// return;
+// }
+// if (g_finishOperate == OPERATE_WATCH_FINISH) {
+// phoneCall->operate = OPERATE_WATCH_FINISH;
+// } else if (g_finishOperate == OPERATE_WATCH_REJECT) {
+// phoneCall->operate = OPERATE_WATCH_REJECT;
+// } else {
+// phoneCall->operate = OPERATE_NON_WATCH_FINISH;
+// }
+// g_finishOperate = OPERATE_NON_WATCH_FINISH;
+// g_currCallNum--;
+
+// (void)memcpy_s(&tmp, sizeof(PhoneCallInfo), phoneCall, sizeof(PhoneCallInfo));
+// (void)memcpy_s(&tmp.unitCalls, sizeof(hfp_hf_calls_info_t), call, sizeof(hfp_hf_calls_info_t));
+// (void)memset_s(phoneCall, sizeof(PhoneCallInfo), 0, sizeof(PhoneCallInfo));
+// (void)memset_s(phoneCall->name, NAME_SIZE, '\0', NAME_SIZE);
+// (void)memset_s(phoneCall->tel, MAX_PHONE_NUM, '\0', MAX_PHONE_NUM);
+// phoneCall->lastStatus = HFP_HF_CALL_STATE_FINISHED;
+
+// // 添加通话记录
+ //
dail_falg++;
if(dail_falg>=70)
NotificationManager::GetInstance()->StopNotify();
+ addcalllog();
}
switch (type) {
case NOTIFY_PHONE_CALLING_DISPLAY:
if (g_callDuration != NULL) {
+ info.callDurTime=get_g_callTimes();
g_callTimesclean();
+ addcalllog();
ret = osTimerDelete(g_callDuration);
if (ret != osOK) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DisableCallTimer failed, type= %d ret = %lx!", type, ret);
phoneView->Add(comingTimes);
phoneView->SetDraggable(true);
phoneView->SetTouchable(true);
+ call_stat=2;
+ calllog_info_init();
return phoneView;
}
{
diallabl2 = new UILabel();
}
- diallabl2->SetPosition(109, 104); // widget's left position and top position
- diallabl2->Resize(249, 40); // widget's width and height
- diallabl2->SetViewId("label1"); // Set style
- diallabl2->SetStyle(STYLE_TEXT_FONT, 40);
- // Set additional property
- diallabl2->SetText(CallerLogModel::GetInstance()->GetPhoneNumber().c_str());
- diallabl2->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT);
- diallabl2->SetAlign(TEXT_ALIGNMENT_CENTER);
- diallabl2->SetRollSpeed(0);
- diallabl2->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 40);
+ diallabl2->SetPosition(LABEL_PERCENT_POSITION_X, LABEL_PERCENT_POSITION_Y,
+ Screen::GetInstance().GetWidth(), TITLE_LABEL_DEFAULT_HEIGHT);
+ diallabl2->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);
+ diallabl2->SetText(CallerLogModel::GetInstance()->GetPhoneNumber().c_str());
+ diallabl2->SetAlign(TEXT_ALIGNMENT_CENTER);
+ diallabl2->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CALLER_SIZE);
+ diallabl2->SetTextColor(Color::White());
+
// Add to rootView
calldialView->Add(diallabl2);
StartCallTimer(NOTIFY_PHONE_DIAL_DISPLAY, (int32_t)NOTIFY_ONE_SECOND);
+ call_stat=0;
+ calllog_info_init();
return calldialView;
}
StartCallTimer(NOTIFY_PHONE_CALLING_DISPLAY, (int32_t)NOTIFY_ONE_SECOND);
StartCallTimer(NOTIFY_PHONE_CURTIME_DISPLAY, (int32_t)NOTIFY_THIRTY_SECONDS);
NotificationManager::GetInstance()->SetVolumeScreenStatus(false);
+
+ if(call_stat==2)
+ {
+ call_stat=1;
+ }
+
return callingView;
}
//#ifdef SUPPORT_CAT1_SERVICE
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AcceptIncomingCall] start");
-
+
incomedcall_event_sendmsg_toUI("ok");
cat1_call_answer();
//#ifdef SUPPORT_CAT1_SERVICE
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MakephoneNotify 11111111 ");
cat1_call_hungup();
+ addcalllog();
// uint16_t preSlice = NativeAbility::GetInstance().GetPreSliceId();
// NativeAbility::GetInstance().ChangeSlice(preSlice);
NotificationManager::GetInstance()->StopNotify();
//#ifdef SUPPORT_CAT1_SERVICE
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MakephoneNotify 11111111 ");
cat1_call_hungup();
+
// uint16_t preSlice = NativeAbility::GetInstance().GetPreSliceId();
// NativeAbility::GetInstance().ChangeSlice(preSlice);
NotificationManager::GetInstance()->StopNotify();
int calldial_event_sendmsg_toUI(char* callno)
{
/**通过UI事件发送Notify*/
- GraphicService::GetInstance()->PostGraphicEvent(std::bind(incomingcall_event_notify, callno));
+ GraphicService::GetInstance()->PostGraphicEvent(std::bind(calldial_event_notify, callno));
return ERRCODE_SUCC;
}