在Runtimetest中,reboot测试项完成后继续测试video测试,但是reboot后屏幕是锁定状态,只能后台播放video。上网查找方法,可以用如下方法解决:
mKeyguard = (KeyguardManager) getSystemService(Context.KEYGUARD_SERVICE);
mKeylock = mKeyguard.newKeyguardLock("");
在Runtimetest中,reboot测试项完成后继续测试video测试,但是reboot后屏幕是锁定状态,只能后台播放video。上网查找方法,可以用如下方法解决:
mKeyguard = (KeyguardManager) getSystemService(Context.KEYGUARD_SERVICE);
mKeylock = mKeyguard.newKeyguardLock("");