From: SnickerSun Date: Wed, 12 Jun 2024 12:57:26 +0000 (+0800) Subject: alipay同步到0521patch X-Git-Tag: release_V1.2.70_20241020_135402~989^2~19 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=4a87e48247cf31e20d8686b438a6fa9d55b5b979;p=mirrors%2FFD230.git alipay同步到0521patch --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayBarCode.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayBarCode.h index 376e265a1..b58689ad3 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayBarCode.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayBarCode.h @@ -18,8 +18,8 @@ namespace OHOS { class AlipayBarCode : public UIViewGroup { public: - AlipayBarCode(AlipayPresenter *presenter); - virtual ~AlipayBarCode(); + explicit AlipayBarCode(AlipayPresenter *presenter); + ~AlipayBarCode() override; static AlipayBarCode *GetInstance(); bool InitView(); void AlipayRefreshBarcode(const char *refreshStr); diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayBind.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayBind.h index ef290e6f0..4c97b4c1b 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayBind.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayBind.h @@ -18,8 +18,8 @@ namespace OHOS { class AlipayBind : public UIViewGroup { public: - AlipayBind(AlipayPresenter *presenter); - virtual ~AlipayBind(); + explicit AlipayBind(AlipayPresenter *presenter); + ~AlipayBind() override; bool InitView(); private: diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayBindAni.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayBindAni.h index d765f138a..d2f4f45c7 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayBindAni.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayBindAni.h @@ -20,8 +20,8 @@ namespace OHOS { class AlipayBindAni : public UIViewGroup { public: - AlipayBindAni(AlipayPresenter *presenter); - virtual ~AlipayBindAni(); + explicit AlipayBindAni(AlipayPresenter *presenter); + ~AlipayBindAni() override; bool InitView(); private: diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayBindRes.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayBindRes.h index ce5797543..431d2cee1 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayBindRes.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayBindRes.h @@ -17,8 +17,8 @@ namespace OHOS { class AlipayBindRes : public UIViewGroup { public: - AlipayBindRes(AlipayPresenter *presenter); - virtual ~AlipayBindRes(); + explicit AlipayBindRes(AlipayPresenter *presenter); + ~AlipayBindRes() override; bool InitView(); void AlipayRefreshBindRes(void); diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayExitBind.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayExitBind.h index bacd6807a..08a862791 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayExitBind.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayExitBind.h @@ -17,8 +17,8 @@ namespace OHOS { class AlipayExitBind : public UIViewGroup { public: - AlipayExitBind(AlipayPresenter *presenter); - virtual ~AlipayExitBind(); + explicit AlipayExitBind(AlipayPresenter *presenter); + ~AlipayExitBind() override; bool InitView(); private: diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayHelp.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayHelp.h index 6b16d8720..d203fc864 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayHelp.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayHelp.h @@ -18,8 +18,8 @@ namespace OHOS { class AlipayHelp : public UIViewGroup { public: - AlipayHelp(AlipayPresenter *presenter); - virtual ~AlipayHelp(); + explicit AlipayHelp(AlipayPresenter *presenter); + ~AlipayHelp() override; bool InitView(); private: diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayList/AlipayListAdapter.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayList/AlipayListAdapter.h index 0d26748eb..fb37cd5cf 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayList/AlipayListAdapter.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayList/AlipayListAdapter.h @@ -24,7 +24,7 @@ namespace OHOS { class AlipayListAdapter : public AbstractAdapter { public: explicit AlipayListAdapter(); - virtual ~AlipayListAdapter(); + ~AlipayListAdapter() override; /* * * @brief Sets the UIView adapter data, which is a AlipayListItem linked list. @@ -42,11 +42,11 @@ public: * @since 1.0 * @version 1.0 */ - virtual uint16_t GetCount(void) override; + uint16_t GetCount(void) override; - virtual UIView *GetView(UIView *inView, int16_t index) override; + UIView *GetView(UIView *inView, int16_t index) override; - virtual void AddListItem(const AlipayListItem &item); + void AddListItem(const AlipayListItem &item); void SetItemClickListener(UIView::OnClickListener *itemclicklistener) { diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayList/AlipayListItemView.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayList/AlipayListItemView.h index c1a373021..02cd06f9b 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayList/AlipayListItemView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayList/AlipayListItemView.h @@ -21,13 +21,11 @@ namespace OHOS { class AlipayListItemView : public UIViewGroup { public: explicit AlipayListItemView(); - virtual ~AlipayListItemView(); - virtual void SetItemInfo(const AlipayListItem &itemInfo); - virtual void SetUpChild(); + ~AlipayListItemView() override; + void SetItemInfo(const AlipayListItem &itemInfo); + void SetUpChild(); private: - AlipayListItemView(const AlipayListItemView &); - UIImageView sIcon; UILabel sLabel; UIImageView sNextImage; diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayList/AlipayListView.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayList/AlipayListView.h index 3bb99b31a..b4a3081f4 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayList/AlipayListView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayList/AlipayListView.h @@ -19,7 +19,6 @@ #include "components/icon_adapter.h" #include "AlipayPresenter.h" #include "AppViewIDs.h" -#include "components/ui_label_ext.h" #include"language/font/ui_resource_string.h" #include "UiConfig.h" #include "AlipayListAdapter.h" @@ -29,8 +28,8 @@ namespace OHOS { class AlipayListAdapter; class AlipayList : public UIViewGroup { public: - AlipayList(AlipayPresenter *presenter); - virtual ~AlipayList(); + explicit AlipayList(AlipayPresenter *presenter); + ~AlipayList() override; bool InitListView(); private: diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayMainView.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayMainView.h index 6d68a39c9..f88514a8c 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayMainView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayMainView.h @@ -41,7 +41,7 @@ class AlipayMainView; class AlipayMainView : public View { public: AlipayMainView(); - virtual ~AlipayMainView(); + ~AlipayMainView() override; static AlipayMainView *GetInstance(void); void OnStart() override; void OnSetUpView() override; diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayModel.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayModel.h index 4b8103c0a..4cf1d026e 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayModel.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayModel.h @@ -91,9 +91,9 @@ public: void AlipayScreenControl(bool turnOnFlag); private: - osTimerId_t bindTimerId = NULL; - osTimerId_t switchTimerId = NULL; - osTimerId_t transTimerId = NULL; + osTimerId_t bindTimerId = nullptr; + osTimerId_t switchTimerId = nullptr; + osTimerId_t transTimerId = nullptr; int16 alipayInterLis; const alipay_svr_api_t *alipayApi; bool bindFlag_; @@ -101,8 +101,8 @@ private: uint32_t refreshFlag_ = 0; uint32_t cardNum_ = 0; uint32_t cardSum_ = 0; - mc_alipay_trans_card_info_t *cardInfo_ = NULL; - uint8_t* transCode_ = NULL; + mc_alipay_trans_card_info_t *cardInfo_ = nullptr; + uint8_t* transCode_ = nullptr; uint32_t transCodeLen_; char cardTitle_[ALIPAY_TRANS_CARD_MEMBER_LEN]; }; diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayPayCode.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayPayCode.h index 47ff86da6..e6de83c01 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayPayCode.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayPayCode.h @@ -18,8 +18,8 @@ namespace OHOS { class AlipayPayCode : public UIViewGroup { public: - AlipayPayCode(AlipayPresenter *presenter); - virtual ~AlipayPayCode(); + explicit AlipayPayCode(AlipayPresenter *presenter); + ~AlipayPayCode() override; static AlipayPayCode *GetInstance(); bool InitView(); void AlipayRefreshQrcode(const char *refreshStr); diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayPresenter.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayPresenter.h index 1dcce35e6..9690a02a0 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayPresenter.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayPresenter.h @@ -108,7 +108,7 @@ class AlipayPresenter : public Presenter,public RootView::OnKeyA public UIView::OnDragListener { public: AlipayPresenter(); - virtual ~AlipayPresenter(); + ~AlipayPresenter() override; void OnStart() override; void OnPause() override; void OnResume() override; diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayRefreshBindCode.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayRefreshBindCode.h index 1ed10cb80..04cd671e8 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayRefreshBindCode.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayRefreshBindCode.h @@ -19,7 +19,7 @@ namespace OHOS { class AlipayRefreshBind : public UIViewGroup { public: AlipayRefreshBind(); - virtual ~AlipayRefreshBind(); + ~AlipayRefreshBind() override; bool InitView(); private: diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipaySetting.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipaySetting.h index 3d52badca..a734661ff 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipaySetting.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipaySetting.h @@ -18,8 +18,8 @@ namespace OHOS { class AlipaySetting : public UIViewGroup { public: - AlipaySetting(AlipayPresenter *presenter); - virtual ~AlipaySetting(); + explicit AlipaySetting(AlipayPresenter *presenter); + ~AlipaySetting() override; bool InitView(); private: diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayGetTransList.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayGetTransList.h index ece8ce157..3353cbfe5 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayGetTransList.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayGetTransList.h @@ -17,8 +17,8 @@ namespace OHOS { class AlipayGetTransList : public UIViewGroup { public: - AlipayGetTransList(AlipayPresenter *presenter); - virtual ~AlipayGetTransList(); + explicit AlipayGetTransList(AlipayPresenter *presenter); + ~AlipayGetTransList() override; bool InitGetView(uint32_t index); private: AlipayPresenter *presenter_; diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransAni.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransAni.h index 5cf44ed23..a319b49c9 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransAni.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransAni.h @@ -20,8 +20,8 @@ namespace OHOS { class AlipayTransAni : public UIViewGroup { public: - AlipayTransAni(AlipayPresenter *presenter); - virtual ~AlipayTransAni(); + explicit AlipayTransAni(AlipayPresenter *presenter); + ~AlipayTransAni() override; bool InitView(); private: diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransCode.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransCode.h index 9a96b3f2f..87aee1223 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransCode.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransCode.h @@ -18,8 +18,8 @@ namespace OHOS { class AlipayTransCode : public UIViewGroup { public: - AlipayTransCode(AlipayPresenter *presenter); - virtual ~AlipayTransCode(); + explicit AlipayTransCode(AlipayPresenter *presenter); + ~AlipayTransCode() override; bool InitView(); private: diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransEnable.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransEnable.h index d3db9aa94..bfdb09ecf 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransEnable.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransEnable.h @@ -18,8 +18,8 @@ namespace OHOS { class AlipayTransEnable : public UIViewGroup { public: - AlipayTransEnable(AlipayPresenter *presenter); - virtual ~AlipayTransEnable(); + explicit AlipayTransEnable(AlipayPresenter *presenter); + ~AlipayTransEnable() override; bool InitView(); private: diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransListAdapter.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransListAdapter.h index ca81b1059..8c3611da2 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransListAdapter.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransListAdapter.h @@ -24,7 +24,7 @@ namespace OHOS { class AlipayTransListAdapter : public AbstractAdapter { public: explicit AlipayTransListAdapter(); - virtual ~AlipayTransListAdapter(); + ~AlipayTransListAdapter() override; /* * * @brief Sets the UIView adapter data, which is a AlipayTransListItem linked list. @@ -42,11 +42,11 @@ public: * @since 1.0 * @version 1.0 */ - virtual uint16_t GetCount(void) override; + uint16_t GetCount(void) override; - virtual UIView *GetView(UIView *inView, int16_t index) override; + UIView *GetView(UIView *inView, int16_t index) override; - virtual void AddListItem(const AlipayTransListItem &item); + void AddListItem(const AlipayTransListItem &item); void SetItemClickListener(UIView::OnClickListener *itemclicklistener) { diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransListItemView.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransListItemView.h index 1c96396fc..181f48b5b 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransListItemView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransListItemView.h @@ -21,14 +21,12 @@ namespace OHOS { class AlipayTransListItemView : public UIViewGroup { public: explicit AlipayTransListItemView(); - virtual ~AlipayTransListItemView(); - virtual void SetItemInfo(const AlipayTransListItem &itemInfo); - virtual void SetUpChild(); + ~AlipayTransListItemView() override; + void SetItemInfo(const AlipayTransListItem &itemInfo); + void SetUpChild(); uint8_t GetAlipayTransListIndex(); private: - AlipayTransListItemView(const AlipayTransListItemView &); - UILabel sLabel; UIImageView sNextImage; AlipayTransListItem sItemInfo; diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransListView.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransListView.h index b54cc8adb..ff2e9e2db 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransListView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransListView.h @@ -20,7 +20,6 @@ #include "components/icon_adapter.h" #include "AlipayPresenter.h" #include "AppViewIDs.h" -#include "components/ui_label_ext.h" #include"language/font/ui_resource_string.h" #include "UiConfig.h" #include "AlipayTransListAdapter.h" @@ -34,8 +33,8 @@ static const uint8_t ALIPAY_TRANS_LIST_ITEM_LEN = 20; class AlipayTransListAdapter; class AlipayTransList : public UIViewGroup { public: - AlipayTransList(AlipayPresenter *presenter); - virtual ~AlipayTransList(); + explicit AlipayTransList(AlipayPresenter *presenter); + ~AlipayTransList() override; bool InitListView(); void AlipayTransListUpdate(); diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransRes.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransRes.h index 7650b2a3e..d66184c04 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransRes.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransRes.h @@ -17,8 +17,8 @@ namespace OHOS { class AlipayTransRes : public UIViewGroup { public: - AlipayTransRes(AlipayPresenter *presenter); - virtual ~AlipayTransRes(); + explicit AlipayTransRes(AlipayPresenter *presenter); + ~AlipayTransRes() override; bool InitResView(uint32_t index); void AlipayTransRefreshRes(void); private: diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransTips.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransTips.h index 85a707a02..af903d205 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransTips.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayTrans/AlipayTransTips.h @@ -17,8 +17,8 @@ namespace OHOS { class AlipayTransTips : public UIViewGroup { public: - AlipayTransTips(AlipayPresenter *presenter); - virtual ~AlipayTransTips(); + explicit AlipayTransTips(AlipayPresenter *presenter); + ~AlipayTransTips() override; bool InitTipsView(uint32_t index); void AlipayTransRefreshTips(void); private: diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayUnbind.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayUnbind.h index 24bb88462..8c1514696 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayUnbind.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayUnbind.h @@ -17,8 +17,8 @@ namespace OHOS { class AlipayUnbind : public UIViewGroup { public: - AlipayUnbind(AlipayPresenter *presenter); - virtual ~AlipayUnbind(); + explicit AlipayUnbind(AlipayPresenter *presenter); + ~AlipayUnbind() override; bool InitView(); private: diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayUnbindFinish.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayUnbindFinish.h index d265880f1..488eceecc 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayUnbindFinish.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayUnbindFinish.h @@ -18,8 +18,8 @@ namespace OHOS { class AlipayUnbindFinish : public UIViewGroup { public: - AlipayUnbindFinish(AlipayPresenter *presenter); - virtual ~AlipayUnbindFinish(); + explicit AlipayUnbindFinish(AlipayPresenter *presenter); + ~AlipayUnbindFinish() override; bool InitView(); private: diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBarCode.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBarCode.cpp index c5740edde..5e8723d58 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBarCode.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBarCode.cpp @@ -231,21 +231,21 @@ bool AlipayBarCode::InitView() SetStyle(STYLE_BACKGROUND_COLOR, 0xff1677ff); SetStyle(STYLE_BACKGROUND_OPA, 0xff); - if (AlipayInitLabel() == false) { + if (!AlipayInitLabel()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBarCode::InitView AlipayInitLabel() false"); return false; } - if (AlipayInitButton() == false) { + if (!AlipayInitButton()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBarCode::InitView AlipayInitButton() false"); return false; } - if (AlipayInitBarcode() == false) { + if (!AlipayInitBarcode()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBarCode::InitView AlipayInitQrcode() false"); return false; } - if (AlipayInitImage() == false) { + if (!AlipayInitImage()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBarCode::InitView AlipayInitImage() false"); return false; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBind.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBind.cpp index 6b1e55848..780949585 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBind.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBind.cpp @@ -101,12 +101,12 @@ bool AlipayBind::InitView() SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION); SetStyle(STYLE_BACKGROUND_COLOR, Color::White().full); - if (AlipayInitLabel() == false) { + if (!AlipayInitLabel()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBind::InitView AlipayInitLabel() false"); return false; } - if (AlipayInitImage() == false) { + if (!AlipayInitImage()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBind::InitView AlipayInitImage() false"); return false; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBindAni.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBindAni.cpp index c3f7390e2..4574cb9f5 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBindAni.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBindAni.cpp @@ -116,11 +116,11 @@ bool AlipayBindAni::InitView() SetTouchable(true); SetOnDragListener(presenter_); SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION); - if (AlipayInitLabel() == false) { + if (!AlipayInitLabel()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBindAni::InitView AlipayInitLabel() false"); return false; } - if (AlipayInitImageAni() == false) { + if (!AlipayInitImageAni()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBindAni::InitView AlipayInitImageAni() false"); return false; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBindRes.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBindRes.cpp index 9a6bd4c0c..0a331982b 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBindRes.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBindRes.cpp @@ -118,11 +118,11 @@ bool AlipayBindRes::InitView() SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION); const char *resStr = EXIT_LABEL_TEXT_SEC; - if (AlipayInitLabel(resStr) == false) { + if (!AlipayInitLabel(resStr)) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBindRes::InitView AlipayInitLabel() false"); return false; } - if (AlipayInitImage(PNG_ALIPAY_BIND_SUCCESS) == false) { + if (!AlipayInitImage(PNG_ALIPAY_BIND_SUCCESS)) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBindRes::InitView AlipayInitImage() false"); return false; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayExitBind.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayExitBind.cpp index 08944b8d7..edf88e323 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayExitBind.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayExitBind.cpp @@ -131,14 +131,14 @@ bool AlipayExitBind::InitSimilarButton(int16 num, int16 alipayX, int16 alipayY, bool AlipayExitBind::AlipayInitButton() { - if (InitSimilarButton(ALIPAY_SET_ZERO, EXIT_BUTTON_EXIT_X, EXIT_BUTTON_EXIT_Y, EXIT_BUTTON_TEXT_FIRST, - ALIPAY_INTER_EXIT) == false) { + if (!InitSimilarButton(ALIPAY_SET_ZERO, EXIT_BUTTON_EXIT_X, EXIT_BUTTON_EXIT_Y, EXIT_BUTTON_TEXT_FIRST, + ALIPAY_INTER_EXIT)) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayExitBind::AlipayInitButton new alipayButton[ALIPAY_SET_ZERO] fail"); return false; } - if (InitSimilarButton(ALIPAY_SET_ONE, EXIT_BUTTON_BIND_X, EXIT_BUTTON_BIND_Y, EXIT_BUTTON_TEXT_SECOND, - ALIPAY_BIND_CONTINUE) == false) { + if (!InitSimilarButton(ALIPAY_SET_ONE, EXIT_BUTTON_BIND_X, EXIT_BUTTON_BIND_Y, EXIT_BUTTON_TEXT_SECOND, + ALIPAY_BIND_CONTINUE)) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayExitBind::AlipayInitButton new alipayButton[ALIPAY_SET_ONE] fail"); return false; @@ -154,11 +154,11 @@ bool AlipayExitBind::InitView() SetOnDragListener(presenter_); SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION); - if (AlipayInitLabel() == false) { + if (!AlipayInitLabel()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayExitBind::InitView AlipayInitLabel() false"); return false; } - if (AlipayInitButton() == false) { + if (!AlipayInitButton()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayExitBind::InitView AlipayInitButton() false"); return false; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayHelp.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayHelp.cpp index aec899fcf..7914369bb 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayHelp.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayHelp.cpp @@ -101,12 +101,12 @@ bool AlipayHelp::InitView() SetStyle(STYLE_BACKGROUND_COLOR, 0xff1677ff); SetStyle(STYLE_BACKGROUND_OPA, 0xff); - if (AlipayInitLabel() == false) { + if (!AlipayInitLabel()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayHelp::InitView AlipayInitImage() false"); return false; } - if (AlipayInitImage() == false) { + if (!AlipayInitImage()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayHelp::InitView AlipayInitImage() false"); return false; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayList/AlipayListView.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayList/AlipayListView.cpp index c1f508b90..0a2f65fd2 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayList/AlipayListView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayList/AlipayListView.cpp @@ -91,7 +91,7 @@ bool AlipayList::InitListView() SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full); SetStyle(STYLE_BACKGROUND_OPA, UN_OPACITY); - if (AlipayInitList() == false) { + if (!AlipayInitList()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayList::InitView AlipayInitList() false"); return false; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayMainView.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayMainView.cpp index 25e3d5c6f..0f2034009 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayMainView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayMainView.cpp @@ -83,8 +83,11 @@ void AlipayMainView::OnStart() group = container[startView]; alipayWhichInter = startView; - RootView::GetInstance()->Add(container[startView]); - + if (group == nullptr) { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::OnSetUpView group null error!"); + return; + } + container_ = group; return; } @@ -92,15 +95,6 @@ void AlipayMainView::OnSetUpView() { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlipayMainView::OnSetUpView"); View::OnSetUpView(); - - if (group == nullptr) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::OnSetUpView group null error!"); - return; - } - - RootView::GetInstance()->Add(group); - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RootView::GetInstance()->Add"); - // show timerView Draw(); } @@ -117,12 +111,6 @@ void AlipayMainView::OnStop() { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlipayMainView::OnStop"); View::OnStop(); - if (container_ != nullptr) { - container_->RemoveAll(); - delete container_; - container_ = nullptr; - } - group->RemoveAll(); RootView::GetInstance()->ClearOnKeyActListener(); RootView::GetInstance()->RemoveAll(); return; @@ -283,7 +271,7 @@ bool AlipayMainView::ChangePayView(int16 thisView) WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangePayView alipayPayCode null error!"); return false; } - if (alipayPayCode->InitView() == false) { + if (!alipayPayCode->InitView()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangePayView InitView null error!"); return false; } @@ -310,7 +298,7 @@ bool AlipayMainView::ChangeSettingView(int16 thisView) WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeSettingView alipayPayCode null error!"); return false; } - if (alipaySetting->InitView() == false) { + if (!alipaySetting->InitView()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeSettingView InitView null error!"); return false; } @@ -333,7 +321,7 @@ bool AlipayMainView::ChangeHelpView(int16 thisView) WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeHelpView alipayHelp null error!"); return false; } - if (alipayHelp->InitView() == false) { + if (!alipayHelp->InitView()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeHelpView InitView null error!"); return false; } @@ -356,7 +344,7 @@ bool AlipayMainView::ChangeBindAniView(int16 thisView) WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeBindAniView alipayBindAni null error!"); return false; } - if (alipayBindAni->InitView() == false) { + if (!alipayBindAni->InitView()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeBindAniView InitView null error!"); return false; } @@ -379,7 +367,7 @@ bool AlipayMainView::ChangeBindExitView(int16 thisView) WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeBindExitView alipayExitBind null error!"); return false; } - if (alipayExitBind->InitView() == false) { + if (!alipayExitBind->InitView()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeBindExitView InitView null error!"); return false; } @@ -402,7 +390,7 @@ bool AlipayMainView::ChangeBindResView(int16 thisView) WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeBindResView alipayBindRes null error!"); return false; } - if (alipayBindRes->InitView() == false) { + if (!alipayBindRes->InitView()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeBindResView InitView null error!"); return false; } @@ -432,7 +420,7 @@ bool AlipayMainView::ChangeUnbindView(int16 thisView) "AlipayMainView::ChangeUnbindView alipayExitBindSetting null error!"); return false; } - if (alipayExitBindSetting->InitView() == false) { + if (!alipayExitBindSetting->InitView()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeUnbindView InitView null error!"); return false; } @@ -457,7 +445,7 @@ bool AlipayMainView::ChangeUnbindFinishView(int16 thisView) "AlipayMainView::ChangeUnbindFinishView alipayUnbindFinish null error!"); return false; } - if (alipayUnbindFinish->InitView() == false) { + if (!alipayUnbindFinish->InitView()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeUnbindFinishView InitView null error!"); return false; } @@ -481,7 +469,7 @@ bool AlipayMainView::ChangeBindView(int16 thisView) WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeBindView alipayBind null error!"); return false; } - if (alipayBind->InitView() == false) { + if (!alipayBind->InitView()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeBindView InitView null error!"); return false; } @@ -504,7 +492,7 @@ bool AlipayMainView::ChangeTransView(int16 thisView) WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeTransView alipayTransCode null error!"); return false; } - if (alipayTransCode->InitView() == false) { + if (!alipayTransCode->InitView()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeTransView InitView null error!"); return false; } @@ -527,7 +515,7 @@ bool AlipayMainView::ChangeTransListView(int16 thisView) WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeTransListView alipayTransList null error!"); return false; } - if (alipayTransList->InitListView() == false) { + if (!alipayTransList->InitListView()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeTransListView InitView null error!"); return false; } @@ -551,7 +539,7 @@ bool AlipayMainView::ChangeTransEnableView(int16 thisView) "AlipayMainView::ChangeTransEnableView alipayTransEnable null error!"); return false; } - if (alipayTransEnable->InitView() == false) { + if (!alipayTransEnable->InitView()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeTransEnableView InitView null error!"); return false; } @@ -574,7 +562,7 @@ bool AlipayMainView::ChangeTransTipsView(int16 thisView) WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeTransTipsView alipayTransTips null error!"); return false; } - if (alipayTransTips->InitTipsView(presenter_->AlipayGetSwitchIndex()) == false) { + if (!alipayTransTips->InitTipsView(presenter_->AlipayGetSwitchIndex())) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeTransTipsView InitView null error!"); return false; } @@ -597,7 +585,7 @@ bool AlipayMainView::ChangeTransResView(int16 thisView) WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeTransResView alipayTransRes null error!"); return false; } - if (alipayTransRes->InitResView(presenter_->AlipayGetSwitchIndex()) == false) { + if (!alipayTransRes->InitResView(presenter_->AlipayGetSwitchIndex())) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeTransResView InitView null error!"); return false; } @@ -621,7 +609,7 @@ bool AlipayMainView::ChangeGetTransListView(int16 thisView) "AlipayMainView::ChangeGetTransListView alipayGetTransList null error!"); return false; } - if (alipayGetTransList->InitGetView(presenter_->AlipayGetSwitchIndex()) == false) { + if (!alipayGetTransList->InitGetView(presenter_->AlipayGetSwitchIndex())) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeGetTransListView InitView null error!"); return false; } @@ -644,7 +632,7 @@ bool AlipayMainView::ChangeTransAniView(int16 thisView) WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeTransProcessView alipayTransAni null error!"); return false; } - if (alipayTransAni->InitView() == false) { + if (!alipayTransAni->InitView()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeTransProcessView InitView null error!"); return false; } @@ -668,7 +656,7 @@ bool AlipayMainView::ChangeBarCodeView(int16 thisView) WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeBarView alipayPayCode null error!"); return false; } - if (alipayBarCode->InitView() == false) { + if (!alipayBarCode->InitView()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeBarView InitView null error!"); return false; } @@ -695,7 +683,7 @@ bool AlipayMainView::ChangeListView(int16 thisView) WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeListView alipayList null error!"); return false; } - if (alipayList->InitListView() == false) { + if (!alipayList->InitListView()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeListView InitView null error!"); return false; } @@ -742,7 +730,7 @@ bool AlipayMainView::ClickFunc(int16 interface) for (int i = 0; i < funcSize; i++) { if (interface == ViewMapper[i].viewId) { bool jug = (this->*(ViewMapper[i].func))(interface); - if (jug == false) { + if (!jug) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainAlarmView:: ChangeInterFace[%d] false", interface); return false; } @@ -758,6 +746,7 @@ static const int16 DestroyMapper[] = { ALIPAY_GET_TRANS_LIST_VIEW, ALIPAY_TRANS_VIEW, ALIPAY_TRANS_LIST_VIEW, + ALIPAY_SETTING_VIEW, }; void AlipayMainView::DestroyTempView(int16 hideView) @@ -785,6 +774,9 @@ void AlipayMainView::DestroyTempView(int16 hideView) } else if (hideView == ALIPAY_TRANS_LIST_VIEW) { delete alipayTransList; alipayTransList = nullptr; + } else if (hideView == ALIPAY_SETTING_VIEW) { + delete alipaySetting; + alipaySetting = nullptr; } } @@ -802,7 +794,7 @@ void AlipayMainView::ChangeView(int16 hideView, int16 showView) return; } interListen = hideView; - if (ClickFunc(showView) == false) { + if (!ClickFunc(showView)) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeView ClickFunc error"); return; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayModel.cpp index 3b83d609d..8fac4ef02 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayModel.cpp @@ -82,9 +82,9 @@ void AlipayBindTimerCallBack(void *argument) bool AlipayModel::AlipayStartBind(void) { - if (bindTimerId == NULL) { - bindTimerId = osTimerNew(AlipayBindTimerCallBack, osTimerPeriodic, (void *)0, NULL); - if (bindTimerId == NULL) { + if (bindTimerId == nullptr) { + bindTimerId = osTimerNew(AlipayBindTimerCallBack, osTimerPeriodic, (void *)0, nullptr); + if (bindTimerId == nullptr) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlipayModel::AlipayStartBind Create timer fail."); return false; } @@ -111,10 +111,10 @@ void AlipaySwitchTimerCallBackProc(void *argument) } int16 alipayLis = AlipayModel::GetInstance()->GetAlipayInterLis(); int16 bindState = AlipayModel::GetInstance()->AlipayGetBindFlag(); - if (alipayLis == ALIPAY_BIND_RES_VIEW && bindState == true) { + if (alipayLis == ALIPAY_BIND_RES_VIEW && bindState) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ALIPAY_BIND_RES_VIEW bindState true in."); AlipayMainView::GetInstance()->ChangeView(ALIPAY_BIND_RES_VIEW, ALIPAY_LIST_VIEW); - } else if (alipayLis == ALIPAY_BIND_RES_VIEW && bindState == false) { + } else if (alipayLis == ALIPAY_BIND_RES_VIEW && (!bindState)) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ALIPAY_BIND_RES_VIEW bindState false in."); AlipayMainView::GetInstance()->ChangeView(ALIPAY_BIND_RES_VIEW, ALIPAY_BIND_VIEW); } else if (alipayLis == ALIPAY_PAY_VIEW) { @@ -146,9 +146,9 @@ void AlipaySwitchTimerCallBack(void *argument) bool AlipayModel::AlipayStartSwitchTimer(uint16_t time) { - if (switchTimerId == NULL) { - switchTimerId = osTimerNew(AlipaySwitchTimerCallBack, osTimerOnce, (void *)0, NULL); - if (switchTimerId == NULL) { + if (switchTimerId == nullptr) { + switchTimerId = osTimerNew(AlipaySwitchTimerCallBack, osTimerOnce, (void *)0, nullptr); + if (switchTimerId == nullptr) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayModel::AlipayStartSwitchTimer Create timer fail."); return false; } @@ -167,7 +167,7 @@ bool AlipayModel::AlipayStartSwitchTimer(uint16_t time) void AlipayModel::AlipayStopSwitchTimer() { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlipayModel::AlipayStopSwitchTimer stop timer."); - if (switchTimerId != NULL) { + if (switchTimerId != nullptr) { osTimerStop(switchTimerId); } return; @@ -228,7 +228,7 @@ void AlipayModel::AlipayUnbind(void) void AlipayModel::AlipayStopBindTimer(void) { - if (bindTimerId == NULL) { + if (bindTimerId == nullptr) { return; } int32_t ret = osTimerStop(bindTimerId); @@ -273,10 +273,10 @@ int32_t AlipayModel::AlipayGetLocalTranslist() int32_t AlipayModel::AlipayGetOnlineTranslist() { cardInfo_ = AlipayTransGetCardList(); - mc_alipay_trans_card_info_t *onLineList = NULL; + mc_alipay_trans_card_info_t *onLineList = nullptr; onLineList = (mc_alipay_trans_card_info_t *)malloc(sizeof(mc_alipay_trans_card_info_t) * ALIPAY_TRANS_CARD_MAX_LENGTH); - if (onLineList == NULL) { + if (onLineList == nullptr) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlipayModel::AlipayGetOnlineTranslist alloc fail."); return -1; } @@ -295,7 +295,7 @@ int32_t AlipayModel::AlipayGetOnlineTranslist() cardSum_ = onLineNum; } free(onLineList); - onLineList = NULL; + onLineList = nullptr; return ret; } @@ -311,7 +311,7 @@ int32_t AlipayModel::AlipayCheckTransCard(uint32_t index) mc_alipay_tans_card_status_t cardStatus = { 0 }; int32_t ret = alipayApi->check_trans_cartstatus(&cardInfo_[index], &cardStatus); WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlipayModel::AlipayCheckTransCard in:%u.", ret); - if (cardStatus.card_exits == true && cardStatus.remain_use_count >= ALIPAY_TRANS_CARD_MIN_VALID_NUM) { + if (cardStatus.card_exits && cardStatus.remain_use_count >= ALIPAY_TRANS_CARD_MIN_VALID_NUM) { return 0; } return -1; @@ -362,9 +362,9 @@ void AlipayTransGetListsTimerCallBack(void *argument) bool AlipayModel::AlipayTransStartGetListsTimer(void) { - if (transTimerId == NULL) { - transTimerId = osTimerNew(AlipayTransGetListsTimerCallBack, osTimerPeriodic, (void *)0, NULL); - if (transTimerId == NULL) { + if (transTimerId == nullptr) { + transTimerId = osTimerNew(AlipayTransGetListsTimerCallBack, osTimerPeriodic, (void *)0, nullptr); + if (transTimerId == nullptr) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlipayModel::AlipayTransStartGetLists Create timer fail."); return false; } @@ -379,7 +379,7 @@ bool AlipayModel::AlipayTransStartGetListsTimer(void) } void AlipayModel::AlipayTransStopGetListsTimer(void) { - if (transTimerId == NULL) { + if (transTimerId == nullptr) { return; } int32_t ret = osTimerStop(transTimerId); @@ -482,7 +482,7 @@ int32_t AlipayModel::AlipayTransGetCardNum(void) bool AlipayModel::AlipayInitModel(void) { transCode_ = (uint8_t *)malloc(ALIPAY_TRANS_CODE_MAX_LEN); - if (transCode_ == NULL) { + if (transCode_ == nullptr) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayModel::AlipayInitModel transCode_ alloc failure."); return false; } @@ -499,9 +499,9 @@ bool AlipayModel::AlipayInitModel(void) void AlipayModel::AlipayDeinitModel(void) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlipayModel::AlipayDeinitModel in."); - if (transCode_ != NULL) { + if (transCode_ != nullptr) { free(transCode_); - transCode_ = NULL; + transCode_ = nullptr; } svr_alipay_deinit_trans_context(); return; diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayPayCode.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayPayCode.cpp index ad73a51d7..79e738f0f 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayPayCode.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayPayCode.cpp @@ -206,20 +206,20 @@ bool AlipayPayCode::InitView() SetStyle(STYLE_BACKGROUND_COLOR, 0xff1677ff); SetStyle(STYLE_BACKGROUND_OPA, 0xff); - if (AlipayInitLabel() == false) { + if (!AlipayInitLabel()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayPayCode::InitView AlipayInitLabel() false"); return false; } - if (AlipayInitImage() == false) { + if (!AlipayInitImage()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayPayCode::InitView AlipayInitImage() false"); return false; } - if (AlipayInitQrcode() == false) { + if (!AlipayInitQrcode()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayPayCode::InitView AlipayInitQrcode() false"); return false; } - if (AlipayInitButton() == false) { + if (!AlipayInitButton()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayPayCode::InitView AlipayInitButton() false"); return false; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayPresenter.cpp index 1f0624837..e530e1c54 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayPresenter.cpp @@ -57,7 +57,7 @@ void AlipayPresenter::OnStart() /* -------------------------------------------------------------------------- */ alipayMode_->AlipayExitLpm(); - if (alipayMode_->AlipayInitModel() == false) { + if (!alipayMode_->AlipayInitModel()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayPresenter::OnStart AlipayInitModel fail."); NativeAbility::GetInstance().ChangeSlice(VIEW_APPLIST); return; diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipaySetting.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipaySetting.cpp index 4b2527bc8..c889eff58 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipaySetting.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipaySetting.cpp @@ -154,11 +154,11 @@ bool AlipaySetting::InitView() SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION); SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full); - if (AlipayInitLabel() == false) { + if (!AlipayInitLabel()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipaySetting::InitView AlipayInitLabel() false"); return false; } - if (AlipayInitButton() == false) { + if (!AlipayInitButton()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipaySetting::InitView AlipayInitButton() false"); return false; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayGetTransList.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayGetTransList.cpp index 5776b782c..0bdadd009 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayGetTransList.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayGetTransList.cpp @@ -129,14 +129,14 @@ bool AlipayGetTransList::InitSimilarButton(int16 num, int16 alipayX, int16 alipa bool AlipayGetTransList::AlipayInitButton(uint32_t index) { - if (InitSimilarButton(ALIPAY_SET_ZERO, EXIT_BUTTON_EXIT_X, EXIT_BUTTON_EXIT_Y, - g_AlipayTransGetListMapper[index].label_left, g_AlipayTransGetListMapper[index].button_left) == false) { + if (!InitSimilarButton(ALIPAY_SET_ZERO, EXIT_BUTTON_EXIT_X, EXIT_BUTTON_EXIT_Y, + g_AlipayTransGetListMapper[index].label_left, g_AlipayTransGetListMapper[index].button_left)) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayGetTransList::AlipayInitButton new alipayButton[ALIPAY_SET_ZERO] fail"); return false; } - if (InitSimilarButton(ALIPAY_SET_ONE, EXIT_BUTTON_BIND_X, EXIT_BUTTON_BIND_Y, - g_AlipayTransGetListMapper[index].label_right, g_AlipayTransGetListMapper[index].button_right) == false) { + if (!InitSimilarButton(ALIPAY_SET_ONE, EXIT_BUTTON_BIND_X, EXIT_BUTTON_BIND_Y, + g_AlipayTransGetListMapper[index].label_right, g_AlipayTransGetListMapper[index].button_right)) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayGetTransList::AlipayInitButton new alipayButton[ALIPAY_SET_ONE] fail"); return false; @@ -153,11 +153,11 @@ bool AlipayGetTransList::InitGetView(uint32_t index) SetOnDragListener(presenter_); SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION); - if (AlipayInitLabel(index) == false) { + if (!AlipayInitLabel(index)) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayGetTransList::InitView AlipayInitLabel false"); return false; } - if (AlipayInitButton(index) == false) { + if (!AlipayInitButton(index)) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayGetTransList::InitView AlipayInitButton false"); return false; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransAni.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransAni.cpp index cb34a5936..37adb66e5 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransAni.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransAni.cpp @@ -122,11 +122,11 @@ bool AlipayTransAni::InitView() SetOnDragListener(presenter_); SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION); - if (AlipayInitLabel() == false) { + if (!AlipayInitLabel()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransAni::InitView AlipayInitLabel() false"); return false; } - if (AlipayInitImageAni() == false) { + if (!AlipayInitImageAni()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransAni::InitView AlipayInitImageAni() false"); return false; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransCode.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransCode.cpp index 784472dc8..2f0459546 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransCode.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransCode.cpp @@ -121,16 +121,16 @@ bool AlipayTransCode::InitView() SetStyle(STYLE_BACKGROUND_COLOR, 0xff1677ff); SetStyle(STYLE_BACKGROUND_OPA, 0xff); - if (AlipayInitLabel() == false) { + if (!AlipayInitLabel()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransCode::InitView AlipayInitLabel() false"); return false; } - if (AlipayInitQrcode() == false) { + if (!AlipayInitQrcode()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransCode::InitView AlipayInitQrcode() false"); return false; } - if (AlipayInitButton() == false) { + if (!AlipayInitButton()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransCode::InitView AlipayInitButton() false"); return false; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransEnable.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransEnable.cpp index 967d6168e..8b42995ba 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransEnable.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransEnable.cpp @@ -111,12 +111,12 @@ bool AlipayTransEnable::InitView() SetStyle(STYLE_BACKGROUND_COLOR, 0xff1677ff); SetStyle(STYLE_BACKGROUND_OPA, 0xff); - if (AlipayInitLabel() == false) { + if (!AlipayInitLabel()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransEnable::InitView AlipayInitLabel() false"); return false; } - if (AlipayInitQrcode() == false) { + if (!AlipayInitQrcode()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransEnable::InitView AlipayInitQrcode() false"); return false; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransListView.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransListView.cpp index bab33701c..b77752179 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransListView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransListView.cpp @@ -126,12 +126,12 @@ bool AlipayTransList::InitListView() SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full); SetStyle(STYLE_BACKGROUND_OPA, UN_OPACITY); - if (AlipayInitList() == false) { + if (!AlipayInitList()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransList::InitView AlipayInitList() false"); return false; } - if (AlipayInitButton() == false) { + if (!AlipayInitButton()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransList::InitView AlipayInitButton() false"); return false; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransRes.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransRes.cpp index e0fed12da..c7b5558b2 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransRes.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransRes.cpp @@ -178,16 +178,16 @@ bool AlipayTransRes::InitResView(uint32_t index) SetOnDragListener(presenter_); SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION); - if (AlipayInitLabel(g_AlipayTransResMapper[index].str) == false) { + if (!AlipayInitLabel(g_AlipayTransResMapper[index].str)) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransRes::InitView AlipayInitLabel() false"); return false; } - if (AlipayInitImage(PNG_ALIPAY_BIND_FAILURE) == false) { + if (!AlipayInitImage(PNG_ALIPAY_BIND_FAILURE)) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransRes::InitView AlipayInitImage() false"); return false; } - if (AlipayInitButton(index) == false) { + if (!AlipayInitButton(index)) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransRes::InitView AlipayInitButton() false"); return false; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransTips.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransTips.cpp index 2f92fed70..11706660a 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransTips.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransTips.cpp @@ -154,16 +154,16 @@ bool AlipayTransTips::InitTipsView(uint32_t index) SetOnDragListener(presenter_); SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION); - if (AlipayInitLabel(g_AlipayTransTipsMapper[index].str) == false) { + if (!AlipayInitLabel(g_AlipayTransTipsMapper[index].str)) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransTips::InitView AlipayInitLabel() false"); return false; } - if (AlipayInitImage(PNG_ALIPAY_BIND_FAILURE) == false) { + if (!AlipayInitImage(PNG_ALIPAY_BIND_FAILURE)) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransTips::InitView AlipayInitImage() false"); return false; } - if (AlipayInitButton(index) == false) { + if (!AlipayInitButton(index)) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransTips::InitView AlipayInitButton() false"); return false; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayUnbind.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayUnbind.cpp index 5c6d18580..2c081cae3 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayUnbind.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayUnbind.cpp @@ -130,13 +130,13 @@ bool AlipayUnbind::InitSimilarButton(int16 num, int16 alipayX, int16 alipayY, co bool AlipayUnbind::AlipayInitButton() { - if (InitSimilarButton(ALIPAY_SET_ZERO, EXIT_BUTTON_EXIT_X, EXIT_BUTTON_EXIT_Y, UNBIND_BUTTON_TEXT_FIRST, - ALIPAY_SETTING_UNBIND) == false) { + if (!InitSimilarButton(ALIPAY_SET_ZERO, EXIT_BUTTON_EXIT_X, EXIT_BUTTON_EXIT_Y, UNBIND_BUTTON_TEXT_FIRST, + ALIPAY_SETTING_UNBIND)) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayUnbind::AlipayInitButton new alipayButton[ALIPAY_SET_ZERO] fail"); return false; } - if (InitSimilarButton(ALIPAY_SET_ONE, EXIT_BUTTON_BIND_X, EXIT_BUTTON_BIND_Y, UNBIND_BUTTON_TEXT_SECOND, - ALIPAY_SETTING_CANCEL) == false) { + if (!InitSimilarButton(ALIPAY_SET_ONE, EXIT_BUTTON_BIND_X, EXIT_BUTTON_BIND_Y, UNBIND_BUTTON_TEXT_SECOND, + ALIPAY_SETTING_CANCEL)) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayUnbind::AlipayInitButton new alipayButton[ALIPAY_SET_ONE] fail"); return false; } @@ -152,11 +152,11 @@ bool AlipayUnbind::InitView() SetOnDragListener(presenter_); SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION); - if (AlipayInitLabel() == false) { + if (!AlipayInitLabel()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayUnbind::InitView AlipayInitLabel() false"); return false; } - if (AlipayInitButton() == false) { + if (!AlipayInitButton()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayUnbind::InitView AlipayInitButton() false"); return false; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayUnbindFinish.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayUnbindFinish.cpp index b7f49404b..817d90bf3 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayUnbindFinish.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayUnbindFinish.cpp @@ -126,11 +126,11 @@ bool AlipayUnbindFinish::InitView() SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION); SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full); - if (AlipayInitLabel() == false) { + if (!AlipayInitLabel()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayUnbindFinish::InitView AlipayInitLabel() false"); return false; } - if (AlipayInitButton() == false) { + if (!AlipayInitButton()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayUnbindFinish::InitView AlipayInitButton() false"); return false; }