/*定时器到期时的处理*/
static void QRCodeView_TimerCallbackProc(int data)
{
- if (uapi_get_screen_state() == 0) // 如果在亮屏状态
+ // if (uapi_get_screen_state() == 0) // 如果在亮屏状态
{
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "uapi_get_screen_state() == 0");
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "uapi_get_screen_state() == 0");
if (WatchQRCodeView::GetInstance())
{
WatchQRCodeView::GetInstance()->update_label();
WatchQRCodeView::refresh_time = UPDATETIME_OUT;
}
}
- else
- {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "uapi_get_screen_state() == 1");
- WatchQRCodeView::refresh_time -= 2;
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "%d", WatchQRCodeView::refresh_time);
- if (WatchQRCodeView::refresh_time <= 0) // 息屏状态下超时删除定时器
- {
- if (WatchQRCodeView::GetInstance())
- {
- GraphicService::GetInstance()->PostGraphicEvent(std::bind(&WatchQRCodeView::stop_refresh_timer, WatchQRCodeView::GetInstance()));
- }
- }
- else
- {
- if (WatchQRCodeView::GetInstance())
- {
- WatchQRCodeView::GetInstance()->update_label();
- }
- }
- }
+ // else
+ // {
+ // WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "uapi_get_screen_state() == 1");
+ // WatchQRCodeView::refresh_time -= 2;
+ // WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "%d", WatchQRCodeView::refresh_time);
+ // if (WatchQRCodeView::refresh_time <= 0) // 息屏状态下超时删除定时器
+ // {
+ // if (WatchQRCodeView::GetInstance())
+ // {
+ // GraphicService::GetInstance()->PostGraphicEvent(std::bind(&WatchQRCodeView::stop_refresh_timer, WatchQRCodeView::GetInstance()));
+ // }
+ // }
+ // else
+ // {
+ // if (WatchQRCodeView::GetInstance())
+ // {
+ // WatchQRCodeView::GetInstance()->update_label();
+ // }
+ // }
+ // }
return;
}