Skip to content

Commit 270c0ea

Browse files
committed
feat: adjust suspend state constants order
1. Reordered suspend state constants to maintain logical grouping 2. Moved suspendStateLidClose constant to be grouped with other lid- related states 3. Changed order from: Unknown, LidOpen, Finish, Wakeup, Prepare, LidClose, ButtonClick 4. New order: Unknown, LidOpen, LidClose, Finish, Wakeup, Prepare, ButtonClick 5. This improves code readability by keeping related lid states together Influence: 1. Verify that all suspend state transitions still work correctly 2. Test lid open/close detection functionality 3. Ensure suspend/resume operations function properly 4. Check that button click detection remains unaffected fix: 调整挂起状态常量顺序 1. 重新排序挂起状态常量以保持逻辑分组 2. 将 suspendStateLidClose 常量移动到与其他盖子相关状态一起 3. 顺序从:Unknown, LidOpen, Finish, Wakeup, Prepare, LidClose, ButtonClick 4. 新顺序:Unknown, LidOpen, LidClose, Finish, Wakeup, Prepare, ButtonClick 5. 通过将相关的盖子状态放在一起提高代码可读性 Influence: 1. 验证所有挂起状态转换是否仍然正常工作 2. 测试盖子开/关检测功能 3. 确保挂起/恢复操作正常运行 4. 检查按钮点击检测是否不受影响 PMS: TASK-387589
1 parent cf95a1e commit 270c0ea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

session/power1/manager_events.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ import (
1616
const (
1717
suspendStateUnknown = iota + 1
1818
suspendStateLidOpen
19+
suspendStateLidClose
1920
suspendStateFinish
2021
suspendStateWakeup
2122
suspendStatePrepare
22-
suspendStateLidClose
2323
suspendStateButtonClick
2424
)
2525

0 commit comments

Comments
 (0)