remove redundant code in screenoff method