try{
screenOn = intent.getBooleanExtra("screen_state", false);
rotation = intent.getStringExtra("rotation");
orientation = intent.getStringExtra("orientation");
}catch(Exception e){}
if (!screenOn) {
} else {
if(rotationChecker){
Log.e("TAG","String orientationRotation above unlock");
UnLocker();
}
rotationChecker=true;
//
//
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Log.e("TAG","String orientationRotation in run");
// TODO Auto-generated method stub
rotationChecker=false;
}
}, TIME_DELAYED);
我想在time_delayed和rotationchecker
为真时调用解锁函数,但我的代码无效。我需要能够跟踪最后方向和最后一次旋转的代码,并与TIME_DELAYED值内的新旋转和方向值进行比较然后它应该调用解锁功能