今天报一个bug,自动关机提示界面已经提示,但是一直不关机,打印log看到关机命令已经下发了,但是就是不关机,这是什么原因呢?
经过同事的帮助,发现关机命令下发了很多次,并且下发的间隔很短,而我原本的设计想法是提示关机,等待两秒后下发关机命令,想必是这里出问题了,不应该下发很多次。查看log发现,电量查询定时器多次调用batteryTimerTimeOut的showAlertWgt,但一直没有调用showAlertWgt里面的延时关机的定时器,直到log的最后却有很多次调用。
[1970-01-01 08:06:13.503] [batteryTimerTimeOut]: batteryTimerTimeOut index = 0,poweroff flag = 1,vol = 10,index = 0
[1970-01-01 08:06:15.505] [batteryTimerTimeOut]: batteryTimerTimeOut index = 0,poweroff flag = 1,vol = 10,index = 0
[1970-01-01 08:06:17.505] [batteryTimerTimeOut]: batteryTimerTimeOut index = 0,poweroff flag = 1,vol = 10,index = 0
[1970-01-01 08:06:19.504] [batteryTimerTimeOut]: batteryTimerTimeOut index = 0,poweroff flag = 1,vol = 10,index = 0
[1970-01-01 08:06:21.506] [batteryTimerTimeOut]: batteryTimerTimeOut index = 0,poweroff flag = 1,vol = 10,index = 0
[1970-01-01 08:06:23.505] [batteryTimerTimeO

最低0.47元/天 解锁文章
1484

被折叠的 条评论
为什么被折叠?



