提交 7245f045 编写于 作者: O openharmony_ci 提交者: Gitee

!440 增加rotate 关键流程log

Merge pull request !440 from guyuanzhang/log
......@@ -582,11 +582,11 @@ void UISwipeView::Vibrator()
VibratorFunc vibratorFunc = VibratorManager::GetInstance()->GetVibratorFunc();
if (vibratorFunc != nullptr && isRotating_) {
if (!loop_ && (curIndex_ == 0 || curIndex_ == childrenNum_ - 1)) {
vibratorFunc(VibratorType::VIBRATOR_TYPE_THREE);
GRAPHIC_LOGI("UISwipeView::Vibrator calls TYPE_THREE vibrator");
vibratorFunc(VibratorType::VIBRATOR_TYPE_THREE);
} else {
vibratorFunc(VibratorType::VIBRATOR_TYPE_ONE);
GRAPHIC_LOGI("UISwipeView::Vibrator calls TYPE_ONE vibrator");
vibratorFunc(VibratorType::VIBRATOR_TYPE_ONE);
}
}
}
......
......@@ -26,18 +26,14 @@ namespace OHOS {
* @since 5.0
* @version 3.0
*/
enum class VibratorType {
VIBRATOR_TYPE_ONE,
VIBRATOR_TYPE_TWO,
VIBRATOR_TYPE_THREE
};
enum class VibratorType { VIBRATOR_TYPE_ONE, VIBRATOR_TYPE_TWO, VIBRATOR_TYPE_THREE };
/**
* @brief vibrator function.
*
* @param vibratorType vibrator type.
*/
typedef void(*VibratorFunc)(VibratorType vibratorType);
typedef void (*VibratorFunc)(VibratorType vibratorType);
class VibratorManager {
public:
......@@ -52,6 +48,7 @@ public:
void RegisterVibratorFunc(VibratorFunc vibratorFunc)
{
GRAPHIC_LOGI("VibratorManager::RegisterVibratorFunc");
vibratorFunc_ = vibratorFunc;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册