public void makeArmCallBack(String number) { String pagerNumber = SmartPagerApplication.getInstance().getPreferences().getPagerNumber(); String routerNumber = SmartPagerApplication.getInstance().getPreferences().getCallRouterPhoneNumber(); if (TextUtils.isEmpty(pagerNumber) && TextUtils.isEmpty(routerNumber)) { // !PagerNo + !RouterNo ((BaseActivity) getActivity()).showErrorDialog(R.string.your_pager_number_is_invalid); } else if (!TextUtils.isEmpty(pagerNumber) && TextUtils.isEmpty(routerNumber)) { // PagerNo + !RouterNo pushOutgoingCallNumber(number); TelephoneUtils.dial(pagerNumber); } else if (TextUtils.isEmpty(pagerNumber) && !TextUtils.isEmpty(routerNumber)) { // !PagerNo + RouterNo pushOutgoingCallNumber(number); TelephoneUtils.dial(routerNumber); } else { // PagerNo + RouterNo pushOutgoingCallNumber(number); TelephoneUtils.dial(pagerNumber); } }
@Override public void onCallButtonClick(String phoneNumber) { if (SmartPagerApplication.getInstance().getSettingsPreferences().getVoipToggled()) { makeVoipCall(phoneNumber); return; } if (SmartPagerApplication.getInstance().getPreferences().getShowMobileNumbers() == false) { startArmCallback(phoneNumber); return; } TelephoneUtils.dial(phoneNumber); }