#include <custom_utils.h>
#include "iostream"
#include "UiConfig.h"
-
+#include "phone/include/phoneaddressmodel.h"
namespace OHOS
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%s OnClick", curViewId.c_str());
NativeAbility::GetInstance().EnterSlice(VIEW_PHONEDIR);
}
+ else
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%s OnClick", curViewId.c_str());
+ set_address_number((char *)view.GetViewId());
+ NativeAbility::GetInstance().EnterSlice(VIEW_DIALING_METHOD);
+ }
+
return true;
}
}
button->SetPosition(buttonconfig.x, buttonconfig.y, buttonconfig.w, buttonconfig.h);
button->SetViewId(buttonconfig.ViewId);
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "----------%s ---",buttonconfig.ViewId);
+ // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "----------%s ---",buttonconfig.ViewId);
button->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);
if(clickListener!=NULL)
button->SetOnClickListener(clickListener);
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%s",(info + i - 1)->tel);
char buf[20]={0};
+
sprintf_s(buf,20,"%s",(const char*)(info + i - 1)->tel);
- buttonconfig.str=buf;
- button_calllog[i]=SetTheButton_ext(buttonconfig,NULL);
+ char name[30]={0};
+ if(get_phone_addrss_name(name,buf))
+ {
+ buttonconfig.str=name;
+ }else
+ {
+ buttonconfig.str=buf;
+ }
+ buttonconfig.ViewId=(const char*)(info + i - 1)->tel;
+ button_calllog[i]=SetTheButton_ext(buttonconfig,ButtonOnclickListen);
if(button_calllog[i]==nullptr)
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainPhoneView::button_calllog new fail!");
// 添加通话进通话记录文件
void AddToCallLog(CallLogInfo *info);
+void AddToCallLog_CAT1(CallLogInfo *callInfo);
+
int uapi_hfp_disconnect(void);
int uapi_hfp_connect(void);
info = nullptr;
return ret;
}
+void AddToCallLog_CAT1(CallLogInfo *callInfo)
+{
+ if (callInfo == nullptr) {
+ return;
+ }
+ int fileSize = GetCallLogFileSize();
+ int num = fileSize / sizeof(CallLogInfo);
+ if (num >= CALL_LOG_MAX_NUM) {
+ int ret = RemoveFirstCallLog();
+ if (ret == OHOS_FAILURE) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AddToCallLogPro] RemoveFirstCallLog error");
+ return;
+ }
+ }
+ AddToCallLog(callInfo);
+}
// 添加通话记录
static void AddToCallLogPro(PhoneCallInfo *callInfo)
{
AddToCallLog(&info);
}
+
+
// 获取通话记录
int GetCallLog(CallLogInfo **info, int *num)
{
${CMAKE_CURRENT_SOURCE_DIR}/../../nativeapp/nativeui/alarm/include
${CMAKE_CURRENT_SOURCE_DIR}/../../nativeapp/nativeui/callerlog/include
${CMAKE_CURRENT_SOURCE_DIR}/../../fd230app/nativeui/phone/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../fd230app/nativeui/phoneservice/include
${CMAKE_CURRENT_SOURCE_DIR}/../../nativeapp/nativeui/phoneservice/include
${CMAKE_CURRENT_SOURCE_DIR}/../../fd230app/nativeui/producttest/include
${CMAKE_CURRENT_SOURCE_DIR}/../../fd230app/nativeui/system/include
${CMAKE_CURRENT_SOURCE_DIR}/../../fd230app/nativeui/phone/include
${CMAKE_CURRENT_SOURCE_DIR}/../../fd230app/nativeui/config/include
${CMAKE_CURRENT_SOURCE_DIR}/../../nativeapp/nativeui/callerlog/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../fd230app/nativeui/phoneservice/include
${CMAKE_CURRENT_SOURCE_DIR}/../../nativeapp/nativeui/phoneservice/include
${CMAKE_CURRENT_SOURCE_DIR}/../../nativeapp/nativeui/main/include
${CMAKE_CURRENT_SOURCE_DIR}/../../fd230app/nativeui/main/include/dial
info.status=CALL_MISSED;
if(call_stat<=2)
{
- AddToCallLog(&info);
+ AddToCallLog_CAT1(&info);
call_stat=3;
}