Revert "remove redundant code in screenoff method"

This reverts commit 99f8b43d216f55e0c30be799903eb6037d67b844.