#include "osal_msgqueue.h"
#include "thread_init.h"
#include "alipay_transit.h"
+#ifdef SUPPORT_BLE_SERVICE
#include "bleService.h"
+#endif
#include "alipay_bluetooth.h"
#include "vendor_file.h"
#if defined(__FREERTOS__)
#include "sleep/include/SleepModel.h"\r
#include "sleepmode/include/SleepModeModel.h"\r
// #include "safemodemanager/include/SafeModeManagerModel.h"\r
+#ifdef SUPPORT_CAT1_SERVICE\r
#include "cat1_server_hal.h"\r
+#endif\r
#include "custom_runtime.h"\r
#include "uiservice/include/ui_service.h"\r
#include "power_display_service.h"\r
\r
#include "power_display_service.h"\r
#include "custom_utils.h"\r
+#ifdef SUPPORT_BLE_SERVICE\r
#include "bleService.h"\r
+#endif\r
#include "ConfigModel.h"\r
namespace OHOS {\r
AlipayModel::AlipayModel() : alipayApi(alipay_svr_get_api())\r
AlipayMainView::GetInstance()->ChangeView(currentView, ALIPAY_BIND_RES_VIEW);\r
}\r
else if (ALIPAY_INTER_STATUS_START_BINDING == status && reFlag == 1) {\r
+ #ifdef SUPPORT_BLE_SERVICE\r
if(get_Alipay_ble_connect()==false)\r
{\r
disconnectfalg++;\r
\r
//AlipayModel::GetInstance()->ble_disconnect_AlipayStartBind();\r
}\r
+ #endif\r
\r
}\r
}\r
uint32_t reFlag = AlipayModel::GetInstance()->AlipayGetRefreshFlag();\r
\r
if (ALIPAY_INTER_STATUS_START_BINDING == status && reFlag == 1 ) {\r
+ #ifdef SUPPORT_BLE_SERVICE\r
if(get_Alipay_ble_connect()==false)\r
{\r
-\r
AlipayModel::GetInstance()->AlipayStopBindTimer();\r
AlipayModel::GetInstance()->AlipaySetBindFlag(false);\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBindCallBackProc ALIPAY_INTER_STATUS_BINDING_FAIL");\r
AlipayModel::GetInstance()->AlipaySetRefreshFlag(0);\r
AlipayMainView::GetInstance()->ChangeView(currentView, ALIPAY_BIND_RES_VIEW);\r
}\r
+ #endif\r
\r
}\r
} \r
#include <sys/stat.h>\r
#include <unistd.h>\r
\r
-#include "battery_hal.h"\r
+// #include "battery_hal.h"\r
\r
#include "languagecode/LanguageInit.h"\r
#include "ui_service.h"\r
#ifndef TRANSMITTING_H
#define TRANSMITTING_H
#include "components/ui_image_animator.h"
+#ifdef SUPPORT_BLE_SERVICE
#include "bleInstruct.h"
+#endif
#include "components/ui_view_group.h"
namespace OHOS
#include "VolumeSettingPresenter.h"
#include "VolumeSettingView.h"
#include "pairing_notification.h"
+#ifdef SUPPORT_BLE_SERVICE
#include "bleInstruct.h"
+#endif
+
#include "transmitting.h"
namespace OHOS {
void MsgCenterNotifyDeviceBindProc(const Topic topic, Request* req)
{
+ #ifdef SUPPORT_BLE_SERVICE
//unused(req);
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyBindProc Bind!");
// const power_display_svr_api_t *display_api = power_display_svr_get_api();
}
}
-
+ #endif
}
void MsgCenterNotifybleTransmit(const Topic topic, Request* req)
{
+ #ifdef SUPPORT_BLE_SERVICE
unused(topic);
uint8_t* data=(uint8_t*)req->data;
NotificationManager::GetInstance()->ShowNotify(showtransmitNotify, (uint16_t)topic, true);
}
// unused(req);
-
+ #endif
}
/* 订阅事件通知逻辑可定制 */
static MsgCenterNotifyTable g_msgCenterNotifyTable[] = {
#include "components/ui_label.h"
#include "components/ui_label_ext.h"
#include "components/ui_label_button_ext.h"
-#include "battery_service.h"
+#ifdef SUPPORT_BLE_SERVICE
+// #include "battery_service.h"
+#include "bleEvent.h"
+#include "bleInstruct.h"
+#endif
#include "NativeAbility.h"
#include "custom_utils.h"
#include "components/ui_slider.h"
// #include "UiConfig.h"
-#include "bleEvent.h"
#include "power_display_service.h"
#include "uicomponents/UIComponents.h"
#include "upg.h"
#include "PhoneService.h"
#include "ConfigModelC.h"
#include "ConfigModel.h"
-#include "bleInstruct.h"
#include "transmitting.h"
// #include "languagecode/LanguageInit.h"
namespace OHOS
static void OTATimerCallBackProc(int data)
{
+ #ifdef SUPPORT_BLE_SERVICE
#if 0
if(updatasider)
updatasider->SetValue(test_flag++);
#endif
if(updatasider)
updatasider->Invalidate();
+ #endif
}
void OTATimerCallBack(int data)
uint32_t tick;
osStatus_t retTimer;
+ #ifdef SUPPORT_BLE_SERVICE
Set_OTA_recv_value();
+ #endif
if(transmitting_timer!=NULL)
{
osTimerStop(transmitting_timer);
void get_updatafail_data(void)
{
+ #ifdef SUPPORT_BLE_SERVICE
errcode_t ret;
ret = uapi_upg_get_result(&upg_result, &last_image_index);
if (ret != ERRCODE_SUCC) {
}
}
+ #endif
}
void Creat_OTA_Updata_FAIL()
UIViewGroup_transmitting->RemoveAll();
}
uapi_dev_runtime_set_transmitting_status(1);
+
+ #ifdef SUPPORT_BLE_SERVICE
switch (Transmitting_falg)
{
case TRANS_DIAL_TRANSMITTING:
// }
}
+ #endif
UIView::OnClickListener *button1Click = static_cast<UIView::OnClickListener *>(transmittingViewEventListener::GetInstance());
UIViewGroup_transmitting->SetOnClickListener(button1Click);
bool transmittingViewEventListener::OnClick(UIView& view, const ClickEvent& event)
{
+ #ifdef SUPPORT_BLE_SERVICE
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "OnClick");
if(Transmitting_falg!=TRANS_DIAL_TRANSMITTING
&& Transmitting_falg!=TRANS_OTA_TRANSMITTING
{
NotificationManager::GetInstance()->StopNotify();
}
+ #endif
return true;
UNUSED(event);
}
bool start_alipay_ble_service(void)
{
/* 支付宝运行时,需要保证在广播状态,方便支付宝链接*/
+ #ifdef SUPPORT_BLE_SERVICE
ble_avd_mode_change(1);
+ #endif
return true;
}
bool stop_alipay_ble_service(void)
{
/* 支付宝退出后,需要恢复原来的广播状态 */
+ #ifdef SUPPORT_BLE_SERVICE
ble_avd_mode_change(0);
+ #endif
return true;
}