From: SnickerSun Date: Thu, 14 Dec 2023 11:50:34 +0000 (+0800) Subject: 修改日志打印,受WEARABLE_LOG_DEBUG宏控制 X-Git-Tag: release_V1.2.70_20241020_135402~1401 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=d224a84273958f30515bbe1a5fa19ad0714bf1f4;p=mirrors%2FFD230.git 修改日志打印,受WEARABLE_LOG_DEBUG宏控制 --- diff --git a/code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmPresenter.cpp b/code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmPresenter.cpp index e0e157403..091024a41 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmPresenter.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmPresenter.cpp @@ -445,7 +445,7 @@ bool AlarmPresenter::OnClick(UIView &view, const ClickEvent &event) bool AlarmPresenter::OnKeyAct(UIView& view, const KeyEvent& event) { uint16 keyID = event.GetKeyId(); - printf("into key!\n"); + WEARABLE_LOGD("","into key! keyID %u\n",keyID); #if 0 //如果是power键就返回上一级 if (keyID == static_cast(ZliteKeyCode::ZLITE_KEY_POWER)) diff --git a/code/sdk/application/wearable/nativeapp/nativeui/alarm/src/MainAlarmView.cpp b/code/sdk/application/wearable/nativeapp/nativeui/alarm/src/MainAlarmView.cpp index 7afe988f0..3fcb8d118 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/alarm/src/MainAlarmView.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/alarm/src/MainAlarmView.cpp @@ -455,7 +455,7 @@ bool MainAlarmView::ChangeMaxClock(int16_t thisView) void MainAlarmView::DropView(UIView& view) { - printf("into DropView!\n"); + WEARABLE_LOGD("","into DropView!\n"); if (&view == container[CHANGE_INTERFACE_CONFIG]) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainAlarmView::DropView::container[CHANGE_INTERFACE_CONFIG]"); diff --git a/code/sdk/application/wearable/nativeapp/nativeui/bloodoxygen/src/BloodOxygenPresenter.cpp b/code/sdk/application/wearable/nativeapp/nativeui/bloodoxygen/src/BloodOxygenPresenter.cpp index fc125f0b8..dc519e14e 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/bloodoxygen/src/BloodOxygenPresenter.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/bloodoxygen/src/BloodOxygenPresenter.cpp @@ -99,9 +99,9 @@ bool BloodOxygenPresenter::OnClick(UIView& view, const ClickEvent& event) //增加按键事件 bool BloodOxygenPresenter::OnKeyAct(UIView& view, const KeyEvent& event) { - printf("into the view is: %s\n", typeid(view).name()); + WEARABLE_LOGD("","into the view is: %s\n", typeid(view).name()); uint16 keyID = event.GetKeyId(); - printf("into key!\n"); + WEARABLE_LOGD("","into key! keyID %u\n",keyID); #if 0 //如果是power键就返回上一级 if (keyID == static_cast(ZliteKeyCode::ZLITE_KEY_POWER)) diff --git a/code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/BluetoothPresenter.cpp b/code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/BluetoothPresenter.cpp index 243b705f4..7cd3fc91c 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/BluetoothPresenter.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/BluetoothPresenter.cpp @@ -221,7 +221,7 @@ bool BluetoothPresenter::OnClick(UIView &view, const ClickEvent &event) bool BluetoothPresenter::OnKeyAct(UIView& view, const KeyEvent& event) { uint16 keyID = event.GetKeyId(); - printf("into key!\n"); + WEARABLE_LOGD("","into key! keyID %u\n",keyID); #if 0 //如果是power键就返回上一级 if (keyID == static_cast(ZliteKeyCode::ZLITE_KEY_POWER)) diff --git a/code/sdk/application/wearable/nativeapp/nativeui/compass/src/MainCompassPresenter.cpp b/code/sdk/application/wearable/nativeapp/nativeui/compass/src/MainCompassPresenter.cpp index bc83d8348..cc0a91178 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/compass/src/MainCompassPresenter.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/compass/src/MainCompassPresenter.cpp @@ -7,6 +7,7 @@ #include "CompassView.h" #include "MainCompassPresenter.h" #include "MainCompassView.h" +#include "wearable_log.h" namespace OHOS { static MainCompassPresenter *g_pMainView = nullptr; @@ -50,7 +51,7 @@ bool MainCompassPresenter::OnDrag(UIView& view, const DragEvent& event) bool MainCompassPresenter::OnKeyAct(UIView& view, const KeyEvent& event) { uint16 keyID = event.GetKeyId(); - printf("into key!\n"); + WEARABLE_LOGD("","into key! keyID %u\n",keyID); #if 0 //如果是power键就返回上一级 if (keyID == static_cast(ZliteKeyCode::ZLITE_KEY_POWER)) diff --git a/code/sdk/application/wearable/nativeapp/nativeui/connectnewphone/src/ConnectPhonePresenter.cpp b/code/sdk/application/wearable/nativeapp/nativeui/connectnewphone/src/ConnectPhonePresenter.cpp index 46e9fe9d1..636626132 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/connectnewphone/src/ConnectPhonePresenter.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/connectnewphone/src/ConnectPhonePresenter.cpp @@ -133,7 +133,7 @@ bool ConnectPhonePresenter::OnDrag(UIView& view, const DragEvent& event) bool ConnectPhonePresenter::OnKeyAct(UIView& view, const KeyEvent& event) { uint16 keyID = event.GetKeyId(); - printf("into key!\n"); + WEARABLE_LOGD("","into key! keyID %u\n",keyID); #if 0 //如果是power键就返回上一级 if (keyID == static_cast(ZliteKeyCode::ZLITE_KEY_POWER)) diff --git a/code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/IndoorWalkPresenter.cpp b/code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/IndoorWalkPresenter.cpp index a3eedab22..24d3e25c8 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/IndoorWalkPresenter.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/IndoorWalkPresenter.cpp @@ -277,7 +277,7 @@ bool IndoorWalkPresenter::OnDrag(UIView& view, const DragEvent& event) bool IndoorWalkPresenter::OnKeyAct(UIView &view, const KeyEvent &event) { uint16 keyID = event.GetKeyId(); - printf("into key!\n"); + WEARABLE_LOGD("","into key! keyID %u\n",keyID); #if 0 //如果是power键就返回上一级 if (keyID == static_cast(ZliteKeyCode::ZLITE_KEY_POWER)) diff --git a/code/sdk/application/wearable/nativeapp/nativeui/main/src/PullUpDownView.cpp b/code/sdk/application/wearable/nativeapp/nativeui/main/src/PullUpDownView.cpp index 61730b7e5..ff5b0590a 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/main/src/PullUpDownView.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/main/src/PullUpDownView.cpp @@ -279,7 +279,7 @@ void PullUpDownView::InitViewInfo(void) bool PullUpDownView::InitView() { - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "PullUpDownView::InitDropDownView caller:%p", caller); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "PullUpDownView::InitDropDownView \n"); clickListener = (UIView::OnClickListener *)OHOS::MainPresenterSample::GetInstance(); InitViewImg(); diff --git a/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/src/VocassistPresenter.cpp b/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/src/VocassistPresenter.cpp index 4704df467..83d7edc9a 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/src/VocassistPresenter.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/src/VocassistPresenter.cpp @@ -128,7 +128,7 @@ bool VocassistPresenter::OnDrag(UIView& view, const DragEvent& event) bool VocassistPresenter::OnKeyAct(UIView& view, const KeyEvent& event) { uint16 keyID = event.GetKeyId(); - printf("into key!\n"); + WEARABLE_LOGD("","into key! keyID %u\n",keyID); #if 0 //如果是power键就返回上一级 if (keyID == static_cast(ZliteKeyCode::ZLITE_KEY_POWER)) diff --git a/code/sdk/application/wearable/nativeapp/nativeui/phoneservice/src/PhoneService.cpp b/code/sdk/application/wearable/nativeapp/nativeui/phoneservice/src/PhoneService.cpp index ee7e94204..052695d76 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/phoneservice/src/PhoneService.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/phoneservice/src/PhoneService.cpp @@ -550,9 +550,9 @@ static void CatBdAddr(const bd_addr_t *bdAddr) { #if WEARABLEOG_DEBUG_ENABLE for (unsigned char i = 0; i < BD_ADDR_LEN; i++) { - printf("%X", bdAddr->addr[i]); + WEARABLE_LOGD("","%X", bdAddr->addr[i]); } - printf(""); + WEARABLE_LOGD("",""); #else UNUSED(bdAddr); #endif @@ -1011,9 +1011,9 @@ static void CatPhoneNumber(char *number, unsigned char len) { #if WEARABLEOG_DEBUG_ENABLE for (unsigned char i = 0; i < len; i++) { - printf("%c", *(number + i)); + WEARABLE_LOGD("","%c", *(number + i)); } - printf(""); + WEARABLE_LOGD("",""); #else UNUSED(number); UNUSED(len); diff --git a/code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersPresenter.cpp b/code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersPresenter.cpp index 2ad0889ab..c240f6e43 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersPresenter.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersPresenter.cpp @@ -930,9 +930,9 @@ void PlayerOnDragListener::OnDragChangView(const DragEvent& event, int16_t hideV //增加按键事件 bool PlayerOnDragListener::OnKeyAct(UIView& view, const KeyEvent& event) { - printf("into the view is: %s\n", typeid(view).name()); + WEARABLE_LOGD("","into the view is: %s\n", typeid(view).name()); uint16 keyID = event.GetKeyId(); - printf("into key!\n"); + WEARABLE_LOGD("","into key! keyID %u\n",keyID); #if 0 //如果是power键就返回上一级 if (keyID == static_cast(ZliteKeyCode::ZLITE_KEY_POWER)) diff --git a/code/sdk/application/wearable/nativeapp/nativeui/settings/src/SettingPresenter.cpp b/code/sdk/application/wearable/nativeapp/nativeui/settings/src/SettingPresenter.cpp index e4a932ffe..78ca04f03 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/settings/src/SettingPresenter.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/settings/src/SettingPresenter.cpp @@ -60,7 +60,7 @@ namespace OHOS { bool SettingPresenter::OnKeyAct(UIView& view, const KeyEvent& event) { uint16 keyID = event.GetKeyId(); - printf("into key!\n"); + WEARABLE_LOGD("","into key! keyID %u\n",keyID); #if 0 //如果是power键就返回上一级 if (keyID == static_cast(ZliteKeyCode::ZLITE_KEY_POWER)) diff --git a/code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempPresenter.cpp b/code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempPresenter.cpp index 04850baef..376f9c93c 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempPresenter.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempPresenter.cpp @@ -70,7 +70,7 @@ bool TempPresenter::OnDrag(UIView& view, const DragEvent& event) bool TempPresenter::OnKeyAct(UIView& view, const KeyEvent& event) { uint16 keyID = event.GetKeyId(); - printf("into key!\n"); + WEARABLE_LOGD("","into key! keyID %u\n",keyID); #if 0 //如果是power键就返回上一级 if (keyID == static_cast(ZliteKeyCode::ZLITE_KEY_POWER)) diff --git a/code/sdk/application/wearable/ohos_deps/wearable_log.h b/code/sdk/application/wearable/ohos_deps/wearable_log.h index 573763392..47b6fd080 100755 --- a/code/sdk/application/wearable/ohos_deps/wearable_log.h +++ b/code/sdk/application/wearable/ohos_deps/wearable_log.h @@ -12,7 +12,7 @@ extern "C" { #endif #endif - +// #define WEARABLE_LOG_DEBUG #ifdef USE_DIAG_LOG #include "soc_diag_util.h" #include "log_oam_logger.h"