void DialingMethodPresenter::OnStop(void)
{
Presenter<DialingMethodView>::OnStop();
- set_address_number(NULL);
+ //set_address_number(NULL);
}
bool DialingMethodPresenter::OnClick(UIView &view, const ClickEvent &event)
{
NativeAbility::GetInstance().Back();
TelephonyInitInterface::X_DRAG_FLAG = false;
- set_address_number(NULL);
+ //set_address_number(NULL);
}
}
if (keyID == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_POWER) && keyState == 1 && uapi_get_screen_state() == 0)
{
NativeAbility::GetInstance().Back();
- set_address_number(NULL);
+ //set_address_number(NULL);
}
return true;
}
Presenter<MainPhoneView>::OnStop();
}
+ static uint8_t MainPhonePresenter_atoi(const char* buf)
+ {
+ if(strstr(buf,"D_"))
+ {
+ return atoi(buf+2);
+ }
+ else
+ {
+ return 0;
+ }
+ }
bool MainPhonePresenter::OnClick(UIView &view, const ClickEvent &event)
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainPhonePresenter::OnClick");
std::string curViewId = view.GetViewId();
- int8_t id= atoi(view.GetViewId());//MainPhoneView::GetInstance()->get_delete_id(&view);
- if(id!=0 && id<=20 && curViewId.length()<=2)
+
+ int8_t id= MainPhonePresenter_atoi(view.GetViewId());//MainPhoneView::GetInstance()->get_delete_id(&view);
+
+ if(id!=0 && id<=20 && curViewId.length()<=5)
{
MainPhoneView::GetInstance()->deletecallloginfo(id);
return true;
if (curViewId == DIALINGMETHODBUTTON_VIEWID)
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%s OnClick", curViewId.c_str());
+ set_address_number(NULL);
NativeAbility::GetInstance().EnterSlice(VIEW_DIALING_METHOD);
}
else if (curViewId == FREQUENTLYCONTACTEDBUTTON_VIEWID)
}
- static char *str_id[]={"0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20"};
+ static char *str_id[]={"D_0","D_1","D_2","D_3","D_4","D_5","D_6","D_7","D_8","D_9","D_10","D_11","D_12","D_13","D_14","D_15","D_16","D_17","D_18","D_19","D_20"};
void MainPhoneView:: NewcalllogButtonExtupdata(CallLogInfo *data, uint8_t index,uint8_t i)
{
//NativeAbility::GetInstance().ChangeSlice(VIEW_PHONERING);\r
//calldial_event_sendmsg_toUI((char *)phoneNumber.c_str());\r
//PhoneCallView::GetInstance()->container_child_SetVisible(true);\r
+\r
+ if(phoneNumber.length()<=2)\r
+ {\r
+ return false;\r
+ }\r
+\r
if(TelephonyInitInterface::DIALINGMETHOD == DIALINGMETHOD_USINGWATCHSIM)\r
{\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DIALINGMETHOD_USINGWATCHSIM");\r