## 判断锁屏状态 adb shell dumpsys window policy | findstr isStatusBarKeyguard
## 判断亮灭屏状态 adb shell dumpsys window policy | findstr ScreenOn
def handling_screen_status():
    "检查屏幕状态,并作出处理"
    order = 'adb shell dumpsys window policy | findstr isStatusBarKeyguard' #可以直接指定APP吗?
    pi = subprocess.Popen(order, shell=True)
    # print(str(pi))
    if "isStatusBarKeyguard=true" in str(pi):   #状态值不能接收,怎么实现?
        powerkey()

 

这里学习下:

https://blog.csdn.net/u013948858/article/details/80424430

posted on 2018-08-17 18:15  你猜我猜你猜我猜不猜  阅读(107)  评论(0编辑  收藏  举报